From 35872aef5b496feaccf30d2ebfcf742758efe247 Mon Sep 17 00:00:00 2001 From: ouvreboite <{actor}@users.noreply.github.com> Date: Wed, 31 Jul 2024 14:52:01 +0000 Subject: [PATCH] [240731] Automatic update of SDK. --- .../.openapi-generator/FILES | 258 - sdks/marketingsolutions_2023-04/README.md | 215 - .../api/openapi.yaml | 5599 ------- .../docs/AdSetGeoLocation.md | 16 - .../docs/AdSetTargeting.md | 16 - .../docs/Audience.md | 16 - .../docs/AudienceAttributes.md | 20 - .../docs/DeleteAudienceResponse.md | 16 - .../docs/GetAudiencesResponse.md | 16 - .../docs/NewAudience.md | 15 - .../docs/NewAudienceAttributes.md | 15 - .../docs/NewAudienceResponse.md | 16 - .../docs/PatchAdSet.md | 18 - .../docs/ReadAdSet.md | 42 - .../docs/ReadAdSetBidding.md | 49 - .../docs/ReplaceAudience.md | 15 - .../docs/ReplaceAudienceResponse.md | 16 - .../api/marketingsolutions/v2023_04/JSON.java | 503 - .../v2023_04/api/AudienceApi.java | 869 - .../model/DeleteAudienceResponse.java | 382 - .../v2023_04/model/GetAudiencesResponse.java | 395 - .../model/ReplaceAudienceResponse.java | 382 - sdks/marketingsolutions_2023-07/README.md | 8 +- .../api/openapi.yaml | 17 +- sdks/marketingsolutions_2023-07/build.gradle | 4 +- .../docs/ApplicationSummaryModel.md | 2 +- .../docs/ApplicationSummaryModelResource.md | 2 +- .../docs/ApplicationSummaryModelResponse.md | 2 +- .../docs/CommonProblem.md | 4 +- .../docs/ContactlistAmendmentAttributes.md | 1 + .../v2023_07/ApiClient.java | 2 +- .../model/ApplicationSummaryModel.java | 2 +- .../ApplicationSummaryModelResource.java | 2 +- .../ApplicationSummaryModelResponse.java | 2 +- .../v2023_07/model/CommonProblem.java | 4 +- .../model/ContactlistAmendmentAttributes.java | 4 +- sdks/marketingsolutions_2023-10/README.md | 8 +- .../api/openapi.yaml | 17 +- sdks/marketingsolutions_2023-10/build.gradle | 4 +- .../docs/ApplicationSummaryModel.md | 2 +- .../docs/ApplicationSummaryModelResource.md | 2 +- .../docs/ApplicationSummaryModelResponse.md | 2 +- .../docs/CommonProblem.md | 4 +- .../docs/ContactlistAmendmentAttributes.md | 1 + .../v2023_10/ApiClient.java | 2 +- .../model/ApplicationSummaryModel.java | 2 +- .../ApplicationSummaryModelResource.java | 2 +- .../ApplicationSummaryModelResponse.java | 2 +- .../v2023_10/model/CommonProblem.java | 4 +- .../model/ContactlistAmendmentAttributes.java | 4 +- sdks/marketingsolutions_2024-01/README.md | 8 +- .../api/openapi.yaml | 17 +- sdks/marketingsolutions_2024-01/build.gradle | 4 +- .../docs/ApplicationSummaryModel.md | 2 +- .../docs/ApplicationSummaryModelResource.md | 2 +- .../docs/ApplicationSummaryModelResponse.md | 2 +- .../docs/CommonProblem.md | 4 +- .../docs/ContactlistAmendmentAttributes.md | 1 + .../v2024_01/ApiClient.java | 2 +- .../model/ApplicationSummaryModel.java | 2 +- .../ApplicationSummaryModelResource.java | 2 +- .../ApplicationSummaryModelResponse.java | 2 +- .../v2024_01/model/CommonProblem.java | 4 +- .../model/ContactlistAmendmentAttributes.java | 4 +- sdks/marketingsolutions_2024-04/README.md | 8 +- .../api/openapi.yaml | 17 +- sdks/marketingsolutions_2024-04/build.gradle | 4 +- .../docs/ApplicationSummaryModel.md | 2 +- .../docs/ApplicationSummaryModelResource.md | 2 +- .../docs/ApplicationSummaryModelResponse.md | 2 +- .../docs/CommonProblem.md | 4 +- .../docs/ContactlistAmendmentAttributes.md | 1 + .../v2024_04/ApiClient.java | 2 +- .../model/ApplicationSummaryModel.java | 2 +- .../ApplicationSummaryModelResource.java | 2 +- .../ApplicationSummaryModelResponse.java | 2 +- .../v2024_04/model/CommonProblem.java | 4 +- .../model/ContactlistAmendmentAttributes.java | 4 +- .../.github/workflows/maven.yml | 0 .../.gitignore | 0 .../.openapi-generator/FILES | 544 + .../.openapi-generator/VERSION | 0 sdks/marketingsolutions_2024-07/README.md | 388 + .../api/openapi.yaml | 13799 ++++++++++++++++ .../build.gradle | 6 +- sdks/marketingsolutions_2024-07/docs/Ad.md | 30 + .../docs/AdListResponse.md | 16 + .../docs/AdResource.md | 16 + .../docs/AdResponse.md} | 6 +- .../docs/AdSetAudienceLinkEntityV1.md} | 6 +- .../docs/AdSetAudienceLinkEntityV1Resource.md | 16 + .../docs/AdSetAudienceLinkEntityV1Response.md | 16 + .../docs/AdSetAudienceLinkInputEntityV1.md | 14 + .../docs/AdSetCategoryBid.md | 0 .../docs/AdSetCategoryBidListResponse.md | 0 .../docs/AdSetCategoryBidResource.md | 0 .../docs/AdSetDeliveryLimitationsV24Q1.md} | 2 +- .../docs/AdSetDisplayMultiplier.md | 0 .../AdSetDisplayMultiplierListResponse.md | 0 .../docs/AdSetDisplayMultiplierResource.md | 0 .../docs/AdSetFrequencyCappingV24Q1.md} | 2 +- .../docs/AdSetGeoLocationV24Q1.md | 16 + .../docs/AdSetSearchFilterV24Q1.md} | 2 +- .../docs/AdSetSearchRequestV24Q1.md} | 4 +- .../docs/AdSetTargetingRuleV24Q1.md} | 2 +- .../docs/AdSetTargetingV24Q1.md | 16 + .../docs/AdWrite.md | 29 + .../docs/AdWriteRequest.md} | 6 +- .../docs/AdWriteResource.md | 16 + .../docs/AdaptiveAttributes.md | 44 + .../docs/AdaptiveColors.md | 19 + .../docs/AdaptiveWriteAttributes.md | 44 + .../docs/AdvertiserApi.md | 20 +- .../docs/AlgebraNodeV1.md | 17 + .../docs/AnalyticsApi.md | 74 +- .../docs/ApplicationSummaryModel.md | 2 +- .../docs/ApplicationSummaryModelResource.md | 2 +- .../docs/ApplicationSummaryModelResponse.md | 2 +- .../docs/AudienceApi.md | 1598 ++ .../docs/AudienceBulkCreateInputV1.md | 14 + .../docs/AudienceBulkDeleteInputV1.md | 14 + .../docs/AudienceBulkUpdateInputV1.md | 14 + .../AudienceComputeSizeEntityV1Resource.md | 16 + .../docs/AudienceComputeSizesInputV1.md | 14 + .../docs/AudienceCreateEntityV1.md | 17 + .../docs/AudienceCreateEntityV1Resource.md | 15 + .../docs/AudienceDeleteEntityV1Resource.md | 16 + .../docs/AudienceEntityV1.md | 20 + ...yV1AudienceSearchMetadataV1ListResponse.md | 17 + .../docs/AudienceEntityV1ListResponse.md | 16 + .../docs/AudienceEntityV1Resource.md | 16 + .../docs/AudienceError.md | 0 .../docs/AudienceEstimateSizeEntityV1.md | 15 + .../AudienceEstimateSizeEntityV1Resource.md | 15 + .../docs/AudienceEstimateSizeInputV1.md | 14 + .../docs/AudienceIdEntityV1ListResponse.md | 16 + .../docs/AudienceIdEntityV1Resource.md | 16 + .../docs/AudienceNameDescription.md | 0 .../docs/AudienceSearchEntityV1.md | 17 + .../docs/AudienceSearchEntityV1Resource.md | 15 + .../docs/AudienceSearchInputV1.md | 14 + .../docs/AudienceSearchMetadataV1.md | 16 + .../docs/AudienceSegmentBulkCreateInputV1.md | 14 + .../docs/AudienceSegmentBulkDeleteInputV1.md | 14 + .../docs/AudienceSegmentBulkUpdateInputV1.md | 14 + ...ienceSegmentComputeSizeEntityV1Resource.md | 16 + .../AudienceSegmentComputeSizesInputV1.md | 14 + .../docs/AudienceSegmentCreateEntityV1.md | 22 + .../AudienceSegmentCreateEntityV1Resource.md | 15 + .../AudienceSegmentDeleteEntityV1Resource.md | 16 + .../docs/AudienceSegmentEntityV1.md | 41 + ...enceSegmentSearchMetadataV1ListResponse.md | 17 + .../AudienceSegmentEntityV1ListResponse.md | 16 + .../docs/AudienceSegmentEntityV1Resource.md | 16 + .../AudienceSegmentEstimateSizeInputV1.md | 14 + .../AudienceSegmentIdEntityV1ListResponse.md | 16 + .../docs/AudienceSegmentIdEntityV1Resource.md | 16 + .../docs/AudienceSegmentSearchEntityV1.md | 31 + .../AudienceSegmentSearchEntityV1Resource.md | 15 + .../docs/AudienceSegmentSearchInputV1.md | 14 + .../docs/AudienceSegmentSearchMetadataV1.md | 16 + .../docs/AudienceSegmentSizeEntityV1.md | 14 + ...AudienceSegmentSizeEntityV1ListResponse.md | 16 + .../AudienceSegmentSizeEntityV1Resource.md | 16 + .../AudienceSegmentSizeEstimationEntityV1.md | 16 + ...ceSegmentSizeEstimationEntityV1Resource.md | 15 + .../docs/AudienceSegmentSizeEstimationV1.md | 14 + ...AudienceSegmentSizeEstimationV1Resource.md | 15 + ...AudienceSegmentSizeEstimationV1Response.md | 16 + .../docs/AudienceSegmentUpdateEntityV1.md | 20 + .../AudienceSegmentUpdateEntityV1Resource.md | 16 + .../docs/AudienceSizeEntityV1.md | 14 + .../docs/AudienceSizeEntityV1ListResponse.md | 16 + .../docs/AudienceSizeEntityV1Resource.md | 16 + .../docs/AudienceSizeEstimationV1.md | 14 + .../docs/AudienceSizeEstimationV1Resource.md | 15 + .../docs/AudienceSizeEstimationV1Response.md | 16 + .../docs/AudienceUpdateEntityV1.md | 16 + .../docs/AudienceUpdateEntityV1Resource.md | 16 + .../docs/AudienceWarning.md | 0 .../docs/BasicAudienceDefinition.md | 0 .../docs/BehavioralV1.md | 29 + .../docs/CampaignApi.md | 559 +- .../docs/CampaignSearchFiltersV23Q1.md} | 2 +- .../docs/CampaignSearchRequestV23Q1.md} | 4 +- .../docs/CampaignSpendLimitV23Q1.md} | 2 +- .../docs/CampaignV23Q1.md} | 11 +- .../docs/CampaignV23Q1ListResponse.md | 16 + .../docs/CampaignV23Q1Resource.md} | 6 +- .../docs/CampaignV23Q1Response.md | 16 + .../docs/CommonProblem.md | 4 +- .../docs/ContactListStatisticsEntityV1.md | 16 + .../ContactListStatisticsEntityV1Resource.md | 16 + .../ContactListStatisticsEntityV1Response.md | 16 + .../docs/ContactListV1.md | 14 + .../docs/ContactlistAmendment.md | 0 .../docs/ContactlistAmendmentAttributes.md | 1 + .../docs/ContactlistAmendmentRequest.md | 0 .../docs/ContactlistOperation.md | 0 .../docs/ContactlistOperationAttributes.md | 0 .../marketingsolutions_2024-07/docs/Coupon.md | 27 + .../docs/CouponListResponse.md | 16 + .../docs/CouponResource.md | 16 + .../docs/CouponResponse.md | 16 + .../docs/CouponSupportedSizes.md | 15 + .../docs/CouponSupportedSizesResource.md | 16 + .../docs/CouponSupportedSizesResponse.md | 16 + .../docs/CreateAdSetBiddingV24Q1.md | 31 + .../docs/CreateAdSetBudgetV24Q1.md | 63 + .../docs/CreateAdSetGeoLocationV24Q1.md | 16 + .../docs/CreateAdSetScheduleV24Q1.md | 15 + .../docs/CreateAdSetTargetingV24Q1.md | 16 + .../docs/CreateAdSetV24Q1.md | 50 + .../docs/CreateAdSetV24Q1Request.md | 14 + .../docs/CreateAdSetV24Q1Resource.md | 15 + .../docs/CreateCampaign.md | 27 + .../docs/CreateCampaignRequest.md | 14 + .../docs/CreateCampaignResource.md | 15 + .../docs/CreateCampaignSpendLimit.md | 36 + .../docs/CreateCoupon.md | 33 + .../docs/CreateCouponRequest.md | 14 + .../docs/CreateCouponResource.md | 16 + .../docs/CreateImageSlide.md | 16 + .../docs/Creative.md | 24 + .../docs/CreativeApi.md | 1617 ++ .../docs/CreativeListResponse.md | 16 + .../docs/CreativeResource.md | 16 + .../docs/CreativeResponse.md | 16 + .../docs/CreativeWrite.md | 32 + .../docs/CreativeWriteRequest.md | 14 + .../docs/CreativeWriteResource.md | 16 + .../docs/CriteoApiError.md | 0 .../docs/CriteoApiWarning.md | 0 .../docs/DeleteAudienceContactListResponse.md | 0 .../docs/DynamicAttributes.md | 29 + .../docs/DynamicWriteAttributes.md | 29 + .../docs/EntityOfPortfolioMessage.md | 0 .../docs/ErrorCodeResponse.md | 0 .../docs/GatewayApi.md | 20 +- .../docs/GetPortfolioResponse.md | 0 .../docs/HtmlTagAttributes.md | 14 + .../docs/HtmlTagWriteAttributes.md | 14 + .../docs/ImageAttributes.md | 15 + .../docs/ImageSet.md | 15 + .../docs/ImageSetBase64.md | 15 + .../docs/ImageShape.md | 25 + .../docs/ImageSlide.md | 16 + .../docs/ImageWriteAttributes.md | 15 + .../InMarketAudienceSegmentBrandEntityV1.md | 15 + ...udienceSegmentBrandEntityV1ListResponse.md | 16 + ...ketAudienceSegmentBrandEntityV1Resource.md | 16 + ...InMarketAudienceSegmentInterestEntityV1.md | 14 + ...enceSegmentInterestEntityV1ListResponse.md | 16 + ...AudienceSegmentInterestEntityV1Resource.md | 16 + .../docs/InMarketCreateV1.md | 49 + .../docs/InMarketSizeEstimationV1.md | 49 + .../docs/InMarketUpdateV1.md | 40 + .../docs/InMarketV1.md | 52 + .../docs/LocationCreateV1.md | 15 + .../docs/LocationSizeEstimationV1.md | 15 + .../docs/LocationUpdateV1.md | 24 + .../docs/LocationV1.md | 25 + .../docs/LookalikeCreateV1.md | 15 + .../docs/LookalikeUpdateV1.md | 14 + .../docs/LookalikeV1.md | 15 + .../docs/ModifyAudienceResponse.md | 0 .../docs/NillableAdSetTargetingRuleV24Q1.md} | 4 +- .../NillableAdSetTargetingRuleV24Q1Value.md} | 2 +- .../docs/NillableDateTime.md | 0 .../docs/NillableDecimal.md | 0 .../docs/NillableGenderV1.md | 23 + .../docs/NillableInt32.md | 14 + .../docs/NillableString.md | 14 + .../docs/PatchAdSetBiddingV24Q1.md} | 2 +- .../docs/PatchAdSetBudgetV24Q1.md} | 3 +- .../docs/PatchAdSetCategoryBid.md | 0 .../docs/PatchAdSetCategoryBidListRequest.md | 0 .../docs/PatchAdSetCategoryBidResource.md | 0 ...PatchAdSetCategoryBidResultListResponse.md | 0 .../PatchAdSetCategoryBidResultResource.md | 0 .../docs/PatchAdSetDisplayMultiplier.md | 0 .../PatchAdSetDisplayMultiplierListRequest.md | 0 .../PatchAdSetDisplayMultiplierResource.md | 0 ...dSetDisplayMultiplierResultListResponse.md | 0 ...tchAdSetDisplayMultiplierResultResource.md | 0 .../docs/PatchAdSetSchedulingV24Q1.md} | 2 +- .../docs/PatchAdSetV24Q1.md | 18 + .../docs/PatchCampaign.md | 0 .../docs/PatchCampaignListRequest.md | 0 .../docs/PatchCampaignSpendLimit.md | 0 .../docs/PatchCampaignWriteResource.md | 0 .../docs/PatchResultCampaignListResponse.md | 0 .../docs/PatchResultCampaignReadResource.md | 0 .../docs/PlacementsReportQueryDataMessage.md | 0 .../PlacementsReportQueryEntityMessage.md | 0 .../docs/PlacementsReportQueryMessage.md | 0 .../docs/PointOfInterestV1.md | 16 + .../docs/PortfolioMessage.md | 0 .../docs/ProblemDetails.md | 0 .../docs/ProblemsDetails.md | 0 .../docs/ProspectingCreateV1.md | 25 + .../docs/ProspectingUpdateV1.md | 25 + .../docs/ProspectingV1.md | 26 + .../docs/ReadAdSetBiddingV24Q1.md | 31 + .../docs/ReadAdSetBudgetV24Q1.md} | 5 +- .../docs/ReadAdSetScheduleV24Q1.md} | 2 +- .../docs/ReadAdSetV24Q1.md | 71 + .../docs/ReadModelAdSetId.md | 0 .../docs/ReadModelAdSetIdV24Q1.md} | 4 +- .../docs/ReadModelReadAdSetV24Q1.md} | 4 +- .../docs/RequestsAdSetId.md | 0 .../docs/RequestsPatchAdSetV24Q1.md} | 4 +- .../docs/ResponseReadAdSetV24Q1.md} | 4 +- .../docs/ResponsesAdSetId.md | 0 .../docs/ResponsesAdSetIdV24Q1.md} | 4 +- .../docs/ResponsesReadAdSetV24Q1.md} | 4 +- .../docs/RetargetingCreateV1.md | 26 + .../docs/RetargetingUpdateV1.md | 26 + .../docs/RetargetingV1.md | 27 + sdks/marketingsolutions_2024-07/docs/Size.md | 15 + .../docs/StatisticsReportQueryMessage.md | 0 sdks/marketingsolutions_2024-07/docs/Tag.md | 15 + .../TransactionsReportQueryDataMessage.md | 0 .../TransactionsReportQueryEntityMessage.md | 0 .../docs/TransactionsReportQueryMessage.md | 0 .../docs/TransparencyQueryMessage.md | 0 .../docs/TransparencyReportAttributes.md | 0 .../docs/TransparencyReportDataMessage.md | 0 .../docs/TransparencyReportEntityMessage.md | 0 .../docs/TransparencyReportFile.md | 0 .../docs/UpdateCoupon.md | 15 + .../docs/UpdateCouponRequest.md | 14 + .../docs/UpdateCouponResource.md | 16 + .../docs/VideoDetail.md | 26 + .../docs/WriteModelAdSetId.md | 0 .../docs/WriteModelPatchAdSetV24Q1.md} | 4 +- .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradlew | 0 .../gradlew.bat | 0 .../settings.gradle | 0 .../v2024_07}/ApiCallback.java | 4 +- .../v2024_07}/ApiClient.java | 50 +- .../v2024_07}/ApiClientBuilder.java | 2 +- .../v2024_07}/ApiException.java | 4 +- .../v2024_07}/ApiResponse.java | 4 +- .../v2024_07}/Configuration.java | 4 +- .../v2024_07}/GzipRequestInterceptor.java | 4 +- .../api/marketingsolutions/v2024_07/JSON.java | 645 + .../marketingsolutions/v2024_07}/Pair.java | 4 +- .../v2024_07}/ProgressRequestBody.java | 4 +- .../v2024_07}/ProgressResponseBody.java | 4 +- .../v2024_07}/ServerConfiguration.java | 2 +- .../v2024_07}/ServerVariable.java | 2 +- .../v2024_07}/StringUtil.java | 4 +- .../v2024_07}/api/AdvertiserApi.java | 24 +- .../v2024_07}/api/AnalyticsApi.java | 40 +- .../v2024_07/api/AudienceApi.java | 2519 +++ .../v2024_07}/api/CampaignApi.java | 725 +- .../v2024_07/api/CreativeApi.java | 2551 +++ .../v2024_07}/api/GatewayApi.java | 24 +- .../v2024_07}/auth/ApiKeyAuth.java | 8 +- .../v2024_07}/auth/Authentication.java | 8 +- .../v2024_07}/auth/HttpBasicAuth.java | 8 +- .../v2024_07}/auth/HttpBearerAuth.java | 8 +- .../v2024_07}/auth/OAuth.java | 8 +- .../v2024_07}/auth/OAuthFlow.java | 4 +- .../v2024_07}/auth/OAuthOkHttpClient.java | 2 +- .../v2024_07}/auth/RetryingOAuth.java | 6 +- .../model/AbstractOpenApiSchema.java | 6 +- .../marketingsolutions/v2024_07/model/Ad.java | 533 + .../v2024_07/model/AdListResponse.java | 393 + .../v2024_07/model/AdResource.java | 358 + .../v2024_07/model/AdResponse.java | 375 + .../model/AdSetAudienceLinkEntityV1.java | 292 + .../AdSetAudienceLinkEntityV1Resource.java | 358 + .../AdSetAudienceLinkEntityV1Response.java | 375 + .../model/AdSetAudienceLinkInputEntityV1.java | 282 + .../v2024_07}/model/AdSetCategoryBid.java | 6 +- .../model/AdSetCategoryBidListResponse.java | 10 +- .../model/AdSetCategoryBidResource.java | 8 +- .../model/AdSetDeliveryLimitationsV24Q1.java} | 72 +- .../model/AdSetDisplayMultiplier.java | 6 +- .../AdSetDisplayMultiplierListResponse.java | 10 +- .../model/AdSetDisplayMultiplierResource.java | 8 +- .../model/AdSetFrequencyCappingV24Q1.java} | 62 +- .../model/AdSetGeoLocationV24Q1.java} | 92 +- .../model/AdSetSearchFilterV24Q1.java} | 72 +- .../model/AdSetSearchRequestV24Q1.java} | 68 +- .../model/AdSetTargetingRuleV24Q1.java} | 64 +- .../v2024_07/model/AdSetTargetingV24Q1.java} | 96 +- .../v2024_07/model/AdWrite.java | 542 + .../v2024_07/model/AdWriteRequest.java} | 70 +- .../v2024_07/model/AdWriteResource.java | 358 + .../v2024_07/model/AdaptiveAttributes.java | 828 + .../v2024_07/model/AdaptiveColors.java | 453 + .../model/AdaptiveWriteAttributes.java | 804 + .../v2024_07/model/AlgebraNodeV1.java | 429 + .../model/ApplicationSummaryModel.java | 8 +- .../ApplicationSummaryModelResource.java | 10 +- .../ApplicationSummaryModelResponse.java | 12 +- .../model/AudienceBulkCreateInputV1.java | 314 + .../model/AudienceBulkDeleteInputV1.java | 314 + .../model/AudienceBulkUpdateInputV1.java | 314 + .../AudienceComputeSizeEntityV1Resource.java | 353 + .../model/AudienceComputeSizesInputV1.java | 314 + .../model/AudienceCreateEntityV1.java} | 166 +- .../model/AudienceCreateEntityV1Resource.java | 326 + .../model/AudienceDeleteEntityV1Resource.java | 353 + .../v2024_07/model/AudienceEntityV1.java} | 283 +- ...1AudienceSearchMetadataV1ListResponse.java | 427 + .../model/AudienceEntityV1ListResponse.java | 393 + .../model/AudienceEntityV1Resource.java | 358 + .../v2024_07}/model/AudienceError.java | 6 +- .../model/AudienceEstimateSizeEntityV1.java | 321 + .../AudienceEstimateSizeEntityV1Resource.java | 326 + .../model/AudienceEstimateSizeInputV1.java | 282 + .../model/AudienceIdEntityV1ListResponse.java | 393 + .../model/AudienceIdEntityV1Resource.java | 353 + .../model/AudienceNameDescription.java | 6 +- .../model/AudienceSearchEntityV1.java | 426 + .../model/AudienceSearchEntityV1Resource.java | 326 + .../v2024_07/model/AudienceSearchInputV1.java | 282 + .../model/AudienceSearchMetadataV1.java | 347 + .../AudienceSegmentBulkCreateInputV1.java | 314 + .../AudienceSegmentBulkDeleteInputV1.java | 314 + .../AudienceSegmentBulkUpdateInputV1.java | 314 + ...nceSegmentComputeSizeEntityV1Resource.java | 353 + .../AudienceSegmentComputeSizesInputV1.java | 314 + .../model/AudienceSegmentCreateEntityV1.java | 564 + ...AudienceSegmentCreateEntityV1Resource.java | 326 + ...AudienceSegmentDeleteEntityV1Resource.java | 353 + .../model/AudienceSegmentEntityV1.java | 744 + ...ceSegmentSearchMetadataV1ListResponse.java | 427 + .../AudienceSegmentEntityV1ListResponse.java | 393 + .../AudienceSegmentEntityV1Resource.java | 358 + .../AudienceSegmentEstimateSizeInputV1.java | 282 + ...AudienceSegmentIdEntityV1ListResponse.java | 393 + .../AudienceSegmentIdEntityV1Resource.java | 353 + .../model/AudienceSegmentSearchEntityV1.java | 444 + ...AudienceSegmentSearchEntityV1Resource.java | 326 + .../model/AudienceSegmentSearchInputV1.java | 282 + .../AudienceSegmentSearchMetadataV1.java | 347 + .../model/AudienceSegmentSizeEntityV1.java | 289 + ...dienceSegmentSizeEntityV1ListResponse.java | 393 + .../AudienceSegmentSizeEntityV1Resource.java | 358 + ...AudienceSegmentSizeEstimationEntityV1.java | 356 + ...SegmentSizeEstimationEntityV1Resource.java | 326 + .../AudienceSegmentSizeEstimationV1.java | 289 + ...dienceSegmentSizeEstimationV1Resource.java | 326 + ...dienceSegmentSizeEstimationV1Response.java | 375 + .../model/AudienceSegmentUpdateEntityV1.java | 496 + ...AudienceSegmentUpdateEntityV1Resource.java | 358 + .../v2024_07/model/AudienceSizeEntityV1.java | 289 + .../AudienceSizeEntityV1ListResponse.java | 393 + .../model/AudienceSizeEntityV1Resource.java | 358 + .../model/AudienceSizeEstimationV1.java | 289 + .../AudienceSizeEstimationV1Resource.java | 326 + .../AudienceSizeEstimationV1Response.java | 375 + .../model/AudienceUpdateEntityV1.java | 360 + .../model/AudienceUpdateEntityV1Resource.java | 358 + .../v2024_07}/model/AudienceWarning.java | 6 +- .../model/BasicAudienceDefinition.java | 8 +- .../v2024_07/model/BehavioralV1.java | 444 + .../model/CampaignSearchFiltersV23Q1.java} | 66 +- .../model/CampaignSearchRequestV23Q1.java} | 68 +- .../model/CampaignSpendLimitV23Q1.java} | 68 +- .../v2024_07/model/CampaignV23Q1.java} | 120 +- .../model/CampaignV23Q1ListResponse.java | 393 + .../v2024_07/model/CampaignV23Q1Resource.java | 358 + .../v2024_07/model/CampaignV23Q1Response.java | 375 + .../v2024_07}/model/CommonProblem.java | 10 +- .../model/ContactListStatisticsEntityV1.java | 347 + ...ContactListStatisticsEntityV1Resource.java | 358 + ...ContactListStatisticsEntityV1Response.java | 375 + .../v2024_07/model/ContactListV1.java | 289 + .../v2024_07}/model/ContactlistAmendment.java | 8 +- .../model/ContactlistAmendmentAttributes.java | 10 +- .../model/ContactlistAmendmentRequest.java | 8 +- .../v2024_07}/model/ContactlistOperation.java | 8 +- .../model/ContactlistOperationAttributes.java | 6 +- .../v2024_07/model/Coupon.java | 721 + .../v2024_07/model/CouponListResponse.java | 393 + .../v2024_07/model/CouponResource.java | 358 + .../v2024_07/model/CouponResponse.java | 375 + .../v2024_07/model/CouponSupportedSizes.java | 344 + .../model/CouponSupportedSizesResource.java | 358 + .../model/CouponSupportedSizesResponse.java | 375 + .../model/CreateAdSetBiddingV24Q1.java | 390 + .../model/CreateAdSetBudgetV24Q1.java | 631 + .../model/CreateAdSetGeoLocationV24Q1.java | 348 + .../model/CreateAdSetScheduleV24Q1.java | 327 + .../model/CreateAdSetTargetingV24Q1.java | 356 + .../v2024_07/model/CreateAdSetV24Q1.java | 697 + .../model/CreateAdSetV24Q1Request.java | 282 + .../model/CreateAdSetV24Q1Resource.java | 326 + .../v2024_07/model/CreateCampaign.java | 436 + .../v2024_07/model/CreateCampaignRequest.java | 282 + .../model/CreateCampaignResource.java | 326 + .../model/CreateCampaignSpendLimit.java | 459 + .../v2024_07/model/CreateCoupon.java | 687 + .../v2024_07/model/CreateCouponRequest.java | 282 + .../v2024_07/model/CreateCouponResource.java} | 142 +- .../v2024_07/model/CreateImageSlide.java | 361 + .../v2024_07/model/Creative.java | 631 + .../v2024_07/model/CreativeListResponse.java} | 93 +- .../v2024_07/model/CreativeResource.java | 358 + .../v2024_07/model/CreativeResponse.java} | 78 +- .../v2024_07/model/CreativeWrite.java | 585 + .../v2024_07/model/CreativeWriteRequest.java | 282 + .../v2024_07/model/CreativeWriteResource.java | 358 + .../v2024_07}/model/CriteoApiError.java | 6 +- .../v2024_07}/model/CriteoApiWarning.java | 6 +- .../DeleteAudienceContactListResponse.java | 12 +- .../v2024_07/model/DynamicAttributes.java | 562 + .../model/DynamicWriteAttributes.java | 553 + .../model/EntityOfPortfolioMessage.java | 8 +- .../v2024_07}/model/ErrorCodeResponse.java | 10 +- .../v2024_07}/model/GetPortfolioResponse.java | 12 +- .../v2024_07/model/HtmlTagAttributes.java | 314 + .../model/HtmlTagWriteAttributes.java} | 136 +- .../v2024_07/model/ImageAttributes.java | 335 + .../v2024_07/model/ImageSet.java | 347 + .../v2024_07/model/ImageSetBase64.java | 342 + .../v2024_07/model/ImageShape.java | 371 + .../v2024_07/model/ImageSlide.java | 361 + .../v2024_07/model/ImageWriteAttributes.java | 332 + .../InMarketAudienceSegmentBrandEntityV1.java | 321 + ...ienceSegmentBrandEntityV1ListResponse.java | 393 + ...tAudienceSegmentBrandEntityV1Resource.java | 358 + ...MarketAudienceSegmentInterestEntityV1.java | 292 + ...ceSegmentInterestEntityV1ListResponse.java | 393 + ...dienceSegmentInterestEntityV1Resource.java | 358 + .../v2024_07/model/InMarketCreateV1.java | 645 + .../model/InMarketSizeEstimationV1.java | 645 + .../v2024_07/model/InMarketUpdateV1.java | 592 + .../v2024_07/model/InMarketV1.java | 643 + .../v2024_07/model/LocationCreateV1.java | 333 + .../model/LocationSizeEstimationV1.java | 333 + .../v2024_07/model/LocationUpdateV1.java | 420 + .../v2024_07/model/LocationV1.java | 422 + .../v2024_07/model/LookalikeCreateV1.java | 329 + .../v2024_07/model/LookalikeUpdateV1.java | 289 + .../v2024_07/model/LookalikeV1.java | 321 + .../model/ModifyAudienceResponse.java | 12 +- .../NillableAdSetTargetingRuleV24Q1.java} | 68 +- ...NillableAdSetTargetingRuleV24Q1Value.java} | 66 +- .../v2024_07}/model/NillableDateTime.java | 6 +- .../v2024_07}/model/NillableDecimal.java | 6 +- .../v2024_07/model/NillableGenderV1.java | 339 + .../v2024_07/model/NillableInt32.java | 289 + .../v2024_07/model/NillableString.java | 292 + .../model/PatchAdSetBiddingV24Q1.java} | 60 +- .../model/PatchAdSetBudgetV24Q1.java} | 80 +- .../model/PatchAdSetCategoryBid.java | 6 +- .../PatchAdSetCategoryBidListRequest.java | 8 +- .../model/PatchAdSetCategoryBidResource.java | 8 +- ...tchAdSetCategoryBidResultListResponse.java | 10 +- .../PatchAdSetCategoryBidResultResource.java | 6 +- .../model/PatchAdSetDisplayMultiplier.java | 6 +- ...atchAdSetDisplayMultiplierListRequest.java | 8 +- .../PatchAdSetDisplayMultiplierResource.java | 8 +- ...etDisplayMultiplierResultListResponse.java | 10 +- ...hAdSetDisplayMultiplierResultResource.java | 6 +- .../model/PatchAdSetSchedulingV24Q1.java} | 64 +- .../v2024_07/model/PatchAdSetV24Q1.java} | 114 +- .../v2024_07}/model/PatchCampaign.java | 8 +- .../model/PatchCampaignListRequest.java | 8 +- .../model/PatchCampaignSpendLimit.java | 8 +- .../model/PatchCampaignWriteResource.java | 8 +- .../PatchResultCampaignListResponse.java | 10 +- .../PatchResultCampaignReadResource.java | 6 +- .../PlacementsReportQueryDataMessage.java | 8 +- .../PlacementsReportQueryEntityMessage.java | 8 +- .../model/PlacementsReportQueryMessage.java | 6 +- .../v2024_07/model/PointOfInterestV1.java | 350 + .../v2024_07}/model/PortfolioMessage.java | 6 +- .../v2024_07}/model/ProblemDetails.java | 6 +- .../v2024_07}/model/ProblemsDetails.java | 8 +- .../v2024_07/model/ProspectingCreateV1.java | 405 + .../v2024_07/model/ProspectingUpdateV1.java | 406 + .../v2024_07/model/ProspectingV1.java | 399 + .../model/ReadAdSetBiddingV24Q1.java} | 178 +- .../v2024_07/model/ReadAdSetBudgetV24Q1.java} | 89 +- .../model/ReadAdSetScheduleV24Q1.java} | 72 +- .../v2024_07/model/ReadAdSetV24Q1.java} | 312 +- .../v2024_07}/model/ReadModelAdSetId.java | 6 +- .../v2024_07/model/ReadModelAdSetIdV24Q1.java | 345 + .../model/ReadModelReadAdSetV24Q1.java} | 74 +- .../v2024_07}/model/RequestsAdSetId.java | 8 +- .../model/RequestsPatchAdSetV24Q1.java} | 70 +- .../model/ResponseReadAdSetV24Q1.java} | 76 +- .../v2024_07}/model/ResponsesAdSetId.java | 10 +- .../v2024_07/model/ResponsesAdSetIdV24Q1.java | 378 + .../model/ResponsesReadAdSetV24Q1.java} | 74 +- .../v2024_07/model/RetargetingCreateV1.java} | 237 +- .../v2024_07/model/RetargetingUpdateV1.java | 399 + .../v2024_07/model/RetargetingV1.java | 401 + .../v2024_07/model/Size.java | 318 + .../model/StatisticsReportQueryMessage.java | 6 +- .../v2024_07/model/Tag.java | 326 + .../TransactionsReportQueryDataMessage.java | 8 +- .../TransactionsReportQueryEntityMessage.java | 8 +- .../model/TransactionsReportQueryMessage.java | 6 +- .../model/TransparencyQueryMessage.java | 6 +- .../model/TransparencyReportAttributes.java | 8 +- .../model/TransparencyReportDataMessage.java | 8 +- .../TransparencyReportEntityMessage.java | 8 +- .../model/TransparencyReportFile.java | 6 +- .../v2024_07/model/UpdateCoupon.java | 332 + .../v2024_07/model/UpdateCouponRequest.java | 282 + .../v2024_07/model/UpdateCouponResource.java | 358 + .../v2024_07/model/VideoDetail.java | 401 + .../v2024_07}/model/WriteModelAdSetId.java | 6 +- .../model/WriteModelPatchAdSetV24Q1.java} | 76 +- .../v2024_07}/ExampleApplication.java | 18 +- .../v2024_07}/GatewayApiTest.java | 18 +- .../.openapi-generator/FILES | 14 + sdks/marketingsolutions_preview/README.md | 19 +- .../api/openapi.yaml | 534 +- sdks/marketingsolutions_preview/build.gradle | 4 +- .../docs/ApplicationSummaryModel.md | 2 +- .../docs/ApplicationSummaryModelResource.md | 2 +- .../docs/ApplicationSummaryModelResponse.md | 2 +- .../docs/CommonProblem.md | 4 +- .../docs/ContactlistAmendmentAttributes.md | 1 + ...ctlistWithAttributesAmendmentAttributes.md | 1 + .../docs/CreateProductFilterRequest.md | 14 + .../docs/ProductFilterConfig.md | 15 + .../docs/RecoApi.md | 372 + ...eCollectionOutcomeOfProductFilterConfig.md | 16 + ...sourceInputOfCreateProductFilterRequest.md | 14 + ...lueResourceOfCreateProductFilterRequest.md | 15 + .../ValueResourceOfProductFilterConfig.md | 15 + ...lueResourceOutcomeOfProductFilterConfig.md | 16 + .../marketingsolutions/preview/ApiClient.java | 2 +- .../api/marketingsolutions/preview/JSON.java | 7 + .../preview/api/RecoApi.java | 551 + .../model/ApplicationSummaryModel.java | 2 +- .../ApplicationSummaryModelResource.java | 2 +- .../ApplicationSummaryModelResponse.java | 2 +- .../preview/model/CommonProblem.java | 4 +- .../model/ContactlistAmendmentAttributes.java | 4 +- ...listWithAttributesAmendmentAttributes.java | 4 +- .../model/CreateProductFilterRequest.java | 292 + .../preview/model/ProductFilterConfig.java} | 130 +- ...ollectionOutcomeOfProductFilterConfig.java | 393 + ...urceInputOfCreateProductFilterRequest.java | 282 + ...eResourceOfCreateProductFilterRequest.java | 326 + .../ValueResourceOfProductFilterConfig.java | 326 + ...eResourceOutcomeOfProductFilterConfig.java | 375 + .../.openapi-generator/FILES | 422 - .../docs/Balance202110PagedListResponse.md | 17 - .../docs/ExternalBalance202110.md | 35 - .../.openapi-generator/FILES | 4 + sdks/retailmedia_2023-07/README.md | 14 +- sdks/retailmedia_2023-07/api/openapi.yaml | 174 +- sdks/retailmedia_2023-07/build.gradle | 4 +- sdks/retailmedia_2023-07/docs/AccountsApi.md | 102 + .../docs/ApplicationSummaryModel.md | 2 +- .../docs/ApplicationSummaryModelResource.md | 2 +- .../docs/ApplicationSummaryModelResponse.md | 2 +- .../docs/AsyncCampaignsReport.md | 2 + .../docs/AsyncLineItemsReport.md | 2 + sdks/retailmedia_2023-07/docs/BalanceApi.md | 200 + sdks/retailmedia_2023-07/docs/CampaignApi.md | 306 +- .../retailmedia_2023-07/docs/CommonProblem.md | 4 +- .../docs/ExternalBalance202110.md | 12 + .../docs/JsonApiPageResponseOfAccount.md | 2 +- .../docs/JsonApiPageResponseOfBrand.md | 2 +- .../docs/JsonApiPageResponseOfRetailer.md | 2 +- .../api/retailmedia/v2023_07/ApiClient.java | 2 +- .../retailmedia/v2023_07/api/AccountsApi.java | 215 + .../retailmedia/v2023_07/api/BalanceApi.java | 371 + .../retailmedia/v2023_07/api/CampaignApi.java | 473 +- .../model/ApplicationSummaryModel.java | 2 +- .../ApplicationSummaryModelResource.java | 2 +- .../ApplicationSummaryModelResponse.java | 2 +- .../v2023_07/model/AsyncCampaignsReport.java | 4 + .../v2023_07/model/AsyncLineItemsReport.java | 4 + .../v2023_07/model/CommonProblem.java | 4 +- .../v2023_07/model/ExternalBalance202110.java | 88 +- .../model/JsonApiPageResponseOfAccount.java | 9 +- .../model/JsonApiPageResponseOfBrand.java | 9 +- .../model/JsonApiPageResponseOfRetailer.java | 9 +- .../.openapi-generator/FILES | 4 + sdks/retailmedia_2023-10/README.md | 24 +- sdks/retailmedia_2023-10/api/openapi.yaml | 215 +- sdks/retailmedia_2023-10/build.gradle | 4 +- sdks/retailmedia_2023-10/docs/AccountsApi.md | 102 + .../docs/ApplicationSummaryModel.md | 2 +- .../docs/ApplicationSummaryModelResource.md | 2 +- .../docs/ApplicationSummaryModelResponse.md | 2 +- .../docs/AsyncCampaignsReport.md | 2 + .../docs/AsyncLineItemsReport.md | 2 + .../docs/AsyncRevenueReport.md | 18 +- sdks/retailmedia_2023-10/docs/BalanceApi.md | 666 + sdks/retailmedia_2023-10/docs/CampaignApi.md | 942 +- .../retailmedia_2023-10/docs/CommonProblem.md | 4 +- .../docs/ExternalBalanceResponse.md | 12 + .../docs/JsonApiPageResponseOfAccount.md | 2 +- .../docs/JsonApiPageResponseOfBrand.md | 2 +- .../docs/JsonApiPageResponseOfRetailer.md | 2 +- .../api/retailmedia/v2023_10/ApiClient.java | 2 +- .../retailmedia/v2023_10/api/AccountsApi.java | 215 + .../retailmedia/v2023_10/api/BalanceApi.java | 1051 ++ .../retailmedia/v2023_10/api/CampaignApi.java | 2885 +--- .../model/ApplicationSummaryModel.java | 2 +- .../ApplicationSummaryModelResource.java | 2 +- .../ApplicationSummaryModelResponse.java | 2 +- .../v2023_10/model/AsyncCampaignsReport.java | 4 + .../v2023_10/model/AsyncLineItemsReport.java | 4 + .../v2023_10/model/AsyncRevenueReport.java | 102 +- .../v2023_10/model/CommonProblem.java | 4 +- .../model/ExternalBalanceResponse.java | 88 +- .../model/JsonApiPageResponseOfAccount.java | 9 +- .../model/JsonApiPageResponseOfBrand.java | 9 +- .../model/JsonApiPageResponseOfRetailer.java | 9 +- .../.openapi-generator/FILES | 4 + sdks/retailmedia_2024-01/README.md | 24 +- sdks/retailmedia_2024-01/api/openapi.yaml | 217 +- sdks/retailmedia_2024-01/build.gradle | 4 +- sdks/retailmedia_2024-01/docs/AccountsApi.md | 102 + .../docs/ApplicationSummaryModel.md | 2 +- .../docs/ApplicationSummaryModelResource.md | 2 +- .../docs/ApplicationSummaryModelResponse.md | 2 +- .../docs/AsyncCampaignsReport.md | 2 + .../docs/AsyncLineItemsReport.md | 2 + .../docs/AsyncRevenueReport.md | 18 +- sdks/retailmedia_2024-01/docs/BalanceApi.md | 666 + sdks/retailmedia_2024-01/docs/CampaignApi.md | 958 +- .../retailmedia_2024-01/docs/CommonProblem.md | 4 +- .../docs/ExternalBalanceResponse.md | 12 + .../docs/JsonApiPageResponseOfAccount.md | 2 +- .../docs/JsonApiPageResponseOfBrand.md | 2 +- .../docs/JsonApiPageResponseOfRetailer.md | 2 +- .../api/retailmedia/v2024_01/ApiClient.java | 2 +- .../retailmedia/v2024_01/api/AccountsApi.java | 215 + .../retailmedia/v2024_01/api/BalanceApi.java | 1051 ++ .../retailmedia/v2024_01/api/CampaignApi.java | 3027 ++-- .../model/ApplicationSummaryModel.java | 2 +- .../ApplicationSummaryModelResource.java | 2 +- .../ApplicationSummaryModelResponse.java | 2 +- .../v2024_01/model/AsyncCampaignsReport.java | 4 + .../v2024_01/model/AsyncLineItemsReport.java | 4 + .../v2024_01/model/AsyncRevenueReport.java | 102 +- .../v2024_01/model/CommonProblem.java | 4 +- .../model/ExternalBalanceResponse.java | 88 +- .../model/JsonApiPageResponseOfAccount.java | 9 +- .../model/JsonApiPageResponseOfBrand.java | 9 +- .../model/JsonApiPageResponseOfRetailer.java | 9 +- .../.openapi-generator/FILES | 2 + sdks/retailmedia_2024-04/README.md | 24 +- sdks/retailmedia_2024-04/api/openapi.yaml | 223 +- sdks/retailmedia_2024-04/build.gradle | 4 +- sdks/retailmedia_2024-04/docs/AccountsApi.md | 102 +- .../docs/ApplicationSummaryModel.md | 2 +- .../docs/ApplicationSummaryModelResource.md | 2 +- .../docs/ApplicationSummaryModelResponse.md | 2 +- .../docs/AsyncCampaignsReport.md | 2 + .../docs/AsyncLineItemsReport.md | 2 + .../docs/AsyncRevenueReport.md | 18 +- sdks/retailmedia_2024-04/docs/BalanceApi.md | 666 + sdks/retailmedia_2024-04/docs/CampaignApi.md | 962 +- .../retailmedia_2024-04/docs/CommonProblem.md | 4 +- .../docs/ExternalBalanceResponse.md | 12 + .../docs/JsonApiPageResponseOfAccount.md | 2 +- .../docs/JsonApiPageResponseOfBrand.md | 2 +- .../docs/JsonApiPageResponseOfRetailer.md | 2 +- .../api/retailmedia/v2024_04/ApiClient.java | 2 +- .../retailmedia/v2024_04/api/AccountsApi.java | 156 +- .../retailmedia/v2024_04/api/BalanceApi.java | 1051 ++ .../retailmedia/v2024_04/api/CampaignApi.java | 3097 ++-- .../model/ApplicationSummaryModel.java | 2 +- .../ApplicationSummaryModelResource.java | 2 +- .../ApplicationSummaryModelResponse.java | 2 +- .../v2024_04/model/AsyncCampaignsReport.java | 4 + .../v2024_04/model/AsyncLineItemsReport.java | 4 + .../v2024_04/model/AsyncRevenueReport.java | 102 +- .../v2024_04/model/CommonProblem.java | 4 +- .../model/ExternalBalanceResponse.java | 88 +- .../model/JsonApiPageResponseOfAccount.java | 9 +- .../model/JsonApiPageResponseOfBrand.java | 9 +- .../model/JsonApiPageResponseOfRetailer.java | 9 +- .../.github/workflows/maven.yml | 0 .../.gitignore | 0 .../.openapi-generator/FILES | 522 + .../.openapi-generator/VERSION | 0 .../README.md | 224 +- .../api/openapi.yaml | 13211 +++++++++------ .../build.gradle | 6 +- .../docs/AccountsApi.md} | 269 +- .../docs/AddFundsToBalanceRequest.md | 14 + .../docs/AddRemoveKeywordModel.md | 0 .../docs/AddRemoveKeywordsModel.md | 0 .../docs/AddRemoveKeywordsModelRequest.md | 0 .../docs/AddRemoveKeywordsModelResource.md | 0 .../AddToBasketIdsUpdateModel202110Request.md | 0 .../docs/AddToBasketTarget202110Request.md | 0 .../docs/AddToBasketTarget202110Response.md | 0 .../docs/AnalyticsApi.md | 166 +- .../docs/ApplicationSummaryModel.md | 2 +- .../docs/ApplicationSummaryModelResource.md | 2 +- .../docs/ApplicationSummaryModelResponse.md | 2 +- .../docs/ApprovalStatusModel.md | 0 .../docs/Asset.md | 0 .../docs/AssetResource.md | 0 .../docs/AssetResponse.md | 0 .../docs/AsyncCampaignsReport.md | 2 + .../docs/AsyncCampaignsReportRequest.md | 0 .../docs/AsyncCampaignsReportResource.md | 0 .../docs/AsyncLineItemsReport.md | 2 + .../docs/AsyncLineItemsReportRequest.md | 0 .../docs/AsyncLineItemsReportResource.md | 0 .../docs/AsyncReportResponse.md | 0 .../docs/AsyncRevenueReport.md | 250 + .../docs/AsyncRevenueReportRequest.md | 14 + .../docs/AsyncRevenueReportResource.md | 15 + .../docs/AuctionLineItemCreateModelRequest.md | 0 .../docs/AuctionLineItemPagedListResponse.md | 0 .../docs/AuctionLineItemResponse.md | 0 .../docs/AuctionLineItemUpdateModelRequest.md | 0 .../docs/AudienceApi.md | 74 +- .../AudienceIdsUpdateModel202110Request.md | 0 .../docs/AudienceTarget202110Request.md | 0 .../docs/AudienceTarget202110Response.md | 0 sdks/retailmedia_2024-07/docs/BalanceApi.md | 762 + .../docs/BalanceCampaign202110ListRequest.md | 0 .../BalanceCampaign202110PagedListResponse.md | 0 .../docs/BalanceHistoryChangeDataCaptureV1.md | 36 + .../docs/BalanceResponse.md | 16 + .../docs/BalanceResponsePagedListResponse.md | 17 + .../docs/CampaignApi.md | 1712 +- .../docs/CampaignAttributesV202301.md | 0 .../docs/CampaignBudgetOverrides.md | 15 + .../docs/CampaignDailyBudgetOverride.md | 27 + .../docs/CampaignMonthlyBudgetOverride.md | 27 + .../docs/CampaignV202301.md | 0 .../docs/Category202204.md | 0 .../docs/Category202204ListResponse.md | 0 .../docs/ChangeDatesOfBalanceRequest.md | 14 + .../docs/ChangeDetailsV1.md | 16 + .../docs/ChoiceOption.md | 0 .../docs/ChoiceVariableSpecification.md | 0 .../docs/ChoiceVariableValue.md | 0 .../docs/ColorVariableValue.md | 0 .../docs/CommonError.md | 0 .../docs/CommonLineItemPagedListResponse.md | 0 .../docs/CommonLineItemResponse.md | 0 .../docs/CommonProblem.md | 4 +- .../docs/CommonWarning.md | 0 .../docs/CreateBalanceRequest.md | 14 + .../docs/Creative202110.md | 0 .../docs/Creative202110ListResponse.md | 0 .../docs/Creative202210.md | 0 .../docs/Creative202210ListResponse.md | 0 .../docs/Creative202210Response.md | 0 .../docs/CreativeCreateModel202207.md | 0 .../docs/CreativeUpdateModel202207.md | 0 .../docs/DailyLineItemBudgetOverride.md | 27 + .../docs/EditableCampaignAttributesV202301.md | 0 .../docs/ExternalAccount.md | 0 .../docs/ExternalAddFundsToBalance.md | 16 + ...ExternalAddToBasketIdsUpdateModel202110.md | 0 .../docs/ExternalAddToBasketTarget202110.md | 0 .../docs/ExternalAuctionLineItem.md | 0 .../ExternalAuctionLineItemCreateModel.md | 0 .../ExternalAuctionLineItemUpdateModel.md | 0 .../ExternalAudienceIdsUpdateModel202110.md | 0 .../docs/ExternalAudienceTarget202110.md | 0 .../docs/ExternalBalanceResponse.md | 70 + .../docs/ExternalBrand.md | 0 .../docs/ExternalCatalogRequest.md | 0 .../docs/ExternalCatalogStatus.md | 0 .../docs/ExternalChangeDatesOfBalance.md | 16 + .../docs/ExternalCommonLineItem.md | 0 .../docs/ExternalCreateBalance.md | 31 + .../docs/ExternalKeywordTarget202110.md | 0 .../docs/ExternalLineItemCapping202110.md | 0 .../docs/ExternalLineItemPage202110.md | 0 .../ExternalLineItemPageCategory202110.md | 0 .../docs/ExternalPreferredLineItem202110.md | 0 ...ernalPreferredLineItemCreateModel202110.md | 0 ...ernalPreferredLineItemUpdateModel202110.md | 0 .../docs/ExternalPromotedProduct202110.md | 0 .../docs/ExternalRetailer.md | 0 .../docs/ExternalRetailerPages202110.md | 0 .../docs/ExternalStoreIdsUpdateModel202110.md | 0 .../docs/ExternalStoreTarget202110.md | 0 .../docs/ExternalUpdateBalanceModel.md | 19 + .../docs/FilesVariableValue.md | 0 .../docs/FilesVariablesSpecification.md | 0 .../docs/GatewayApi.md | 20 +- .../docs/HyperlinkVariableValue.md | 0 .../docs/InputKeywordsModel.md | 0 ...putResourceOfAuctionLineItemCreateModel.md | 0 ...rceOfPreferredLineItemCreateModel202110.md | 0 ...aignAttributesV202301AndCampaignV202301.md | 0 ...piBodyWithIdOfInt64AndAccountAndAccount.md | 0 ...sonApiBodyWithIdOfInt64AndBrandAndBrand.md | 0 ...t64AndCampaignV202301AndCampaignV202301.md | 0 ...OfInt64AndCatalogStatusAndCatalogStatus.md | 0 ...BidMultipliersAndLineItemBidMultipliers.md | 0 ...BodyWithIdOfInt64AndRetailerAndRetailer.md | 0 ...aignAttributesV202301AndCampaignV202301.md | 0 ...houtIdOfCatalogRequestAndCatalogRequest.md | 0 .../docs/JsonApiPageResponseOfAccount.md | 2 +- .../docs/JsonApiPageResponseOfBrand.md | 2 +- .../JsonApiPageResponseOfCampaignV202301.md | 0 .../docs/JsonApiPageResponseOfRetailer.md | 2 +- .../docs/JsonApiRequestOfCatalogRequest.md | 0 .../JsonApiSingleResponseOfCampaignV202301.md | 0 .../JsonApiSingleResponseOfCatalogStatus.md | 0 ...iSingleResponseOfLineItemBidMultipliers.md | 0 .../docs/KeywordDataModel.md | 0 .../docs/KeywordTarget202110Request.md | 0 .../docs/KeywordTarget202110Response.md | 0 .../docs/KeywordsModel.md | 0 .../docs/KeywordsModelResource.md | 0 .../docs/KeywordsModelResponse.md | 0 .../docs/LineItemBidMultipliers.md | 0 .../docs/LineItemBidMultipliersRequest.md | 0 .../docs/LineItemBidMultipliersResponse.md | 0 .../docs/LineItemBudgetOverrides.md | 15 + .../docs/MatchTypeModel.md | 0 sdks/retailmedia_2024-07/docs/Metadata.md | 16 + .../docs/MonthlyLineItemBudegetOverride.md | 27 + .../docs/NegotiationStateModel.md | 0 .../docs/PageMetadata.md | 0 ...ageOfBalanceHistoryChangeDataCaptureV1.md} | 4 +- .../docs/PageTypeEnvironment.md | 0 .../docs/PostCampaignV202301.md | 0 ...referredLineItem202110PagedListResponse.md | 0 .../docs/PreferredLineItem202110Response.md | 0 ...eferredLineItemCreateModel202110Request.md | 0 ...eferredLineItemUpdateModel202110Request.md | 0 .../docs/ProblemDetails.md | 0 .../docs/PromotedProduct202110ListRequest.md | 0 .../PromotedProduct202110PagedListResponse.md | 0 .../docs/ProposalStatusModel.md | 0 .../docs/ProposalStatusModelResource.md | 0 .../docs/ProposalStatusModelResponse.md | 0 .../docs/PutCampaignV202301.md | 0 .../docs/ReportOutcome.md | 0 .../docs/ResourceOfAddFundsToBalance.md | 16 + .../docs/ResourceOfAuctionLineItem.md | 0 .../ResourceOfAuctionLineItemUpdateModel.md | 0 .../docs/ResourceOfBalanceCampaign202110.md | 0 .../docs/ResourceOfBalanceResponse.md | 16 + .../docs/ResourceOfCategory202204.md | 0 .../docs/ResourceOfChangeDatesOfBalance.md | 16 + .../docs/ResourceOfCommonLineItem.md | 0 .../docs/ResourceOfCreateBalance.md | 16 + .../docs/ResourceOfCreative202110.md | 0 .../docs/ResourceOfCreative202210.md | 0 .../docs/ResourceOfLineItemBidMultipliers.md | 0 .../docs/ResourceOfPreferredLineItem202110.md | 0 ...rceOfPreferredLineItemUpdateModel202110.md | 0 .../docs/ResourceOfPromotedProduct202110.md | 0 .../docs/ResourceOfRetailMediaAccount.md | 0 .../docs/ResourceOfTemplate.md | 0 .../docs/ResourceOfUpdateBalanceModel.md | 16 + .../docs/ResourceOutcome.md | 0 .../ResourceOutcomeOfRetailMediaAccount.md | 0 .../docs/RetailMediaAccount.md | 0 .../docs/RetailMediaBrandAccountCreation.md | 0 .../docs/RetailMediaBrands.md | 0 .../docs/RetailMediaSeller.md | 0 .../docs/RetailMediaSellerAccountCreation.md | 0 .../docs/ReviewStateModel.md | 0 .../docs/RmLegacyAudienceCreateEntityV1.md | 0 .../RmLegacyAudienceCreateEntityV1Resource.md | 0 .../RmLegacyAudienceCreateEntityV1Response.md | 0 .../docs/RmLegacyAudienceCreateEntityV2.md | 0 .../RmLegacyAudienceCreateEntityV2Resource.md | 0 .../RmLegacyAudienceCreateEntityV2Response.md | 0 .../RmLegacyAudienceCreateInputEntityV1.md | 0 .../RmLegacyAudienceCreateInputEntityV2.md | 0 .../docs/RmLegacyAudienceGetEntityV1.md | 0 ...RmLegacyAudienceGetEntityV1ListResponse.md | 0 .../RmLegacyAudienceGetEntityV1Resource.md | 0 .../docs/RmLegacyAudienceGetEntityV2.md | 0 ...RmLegacyAudienceGetEntityV2ListResponse.md | 0 .../RmLegacyAudienceGetEntityV2Resource.md | 0 .../RmLegacyAudienceUserBehaviorCreateV2.md | 0 .../RmLegacyAudienceUserBehaviorDetailsV2.md | 0 .../docs/RmLegacySegmentCustomerList.md | 0 .../RmLegacySegmentUserBehaviorCreateV2.md | 0 .../docs/RmLegacySegmentUserBehaviorV1.md | 0 .../docs/RmLegacySegmentUserBehaviorV2.md | 0 .../docs/RmcaCommonProblem.md | 0 .../docs/Section.md | 0 .../docs/SetBidModel.md | 0 .../docs/SetBidsModel.md | 0 .../docs/SetBidsModelRequest.md | 0 .../docs/SetBidsModelResource.md | 0 .../docs/StatusResponse.md | 0 .../docs/StatusResponseResource.md | 0 .../docs/StoreIdsUpdateModel202110Request.md | 0 .../docs/StoreTarget202110Request.md | 0 .../docs/StoreTarget202110Response.md | 0 .../docs/Template.md | 0 .../docs/TemplateListResponse.md | 0 .../docs/TemplateResponse.md | 0 .../docs/TemplateVariable.md | 0 .../docs/TemplateVariableValue.md | 0 .../docs/TextVariableSpecification.md | 0 .../docs/TextVariableValue.md | 0 .../docs/UpdateBalanceModelRequest.md | 14 + ...ourceCollectionInputOfRetailMediaSeller.md | 0 ...rceCollectionOutcomeOfRetailMediaSeller.md | 0 ...eResourceInputOfCampaignBudgetOverrides.md | 14 + ...eResourceInputOfLineItemBudgetOverrides.md | 14 + ...eInputOfRetailMediaBrandAccountCreation.md | 0 .../ValueResourceInputOfRetailMediaBrands.md | 0 ...InputOfRetailMediaSellerAccountCreation.md | 0 .../ValueResourceOfCampaignBudgetOverrides.md | 15 + .../ValueResourceOfLineItemBudgetOverrides.md | 15 + ...sourceOfRetailMediaBrandAccountCreation.md | 0 .../docs/ValueResourceOfRetailMediaBrands.md | 0 .../docs/ValueResourceOfRetailMediaSeller.md | 0 ...ourceOfRetailMediaSellerAccountCreation.md | 0 ...esourceOutcomeOfCampaignBudgetOverrides.md | 16 + ...esourceOutcomeOfLineItemBudgetOverrides.md | 16 + ...sourceOfAddToBasketIdsUpdateModel202110.md | 0 ...ueTypeResourceOfAddToBasketTarget202110.md | 0 ...eResourceOfAudienceIdsUpdateModel202110.md | 0 ...ValueTypeResourceOfAudienceTarget202110.md | 0 .../ValueTypeResourceOfKeywordTarget202110.md | 0 ...TypeResourceOfStoreIdsUpdateModel202110.md | 0 .../ValueTypeResourceOfStoreTarget202110.md | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradlew | 0 .../gradlew.bat | 0 .../settings.gradle | 0 .../retailmedia/v2024_07}/ApiCallback.java | 4 +- .../api/retailmedia/v2024_07}/ApiClient.java | 50 +- .../v2024_07}/ApiClientBuilder.java | 2 +- .../retailmedia/v2024_07}/ApiException.java | 4 +- .../retailmedia/v2024_07}/ApiResponse.java | 4 +- .../retailmedia/v2024_07}/Configuration.java | 4 +- .../v2024_07}/GzipRequestInterceptor.java | 4 +- .../api/retailmedia/v2024_07}/JSON.java | 416 +- .../api/retailmedia/v2024_07}/Pair.java | 4 +- .../v2024_07}/ProgressRequestBody.java | 4 +- .../v2024_07}/ProgressResponseBody.java | 4 +- .../v2024_07}/ServerConfiguration.java | 2 +- .../retailmedia/v2024_07}/ServerVariable.java | 2 +- .../api/retailmedia/v2024_07}/StringUtil.java | 4 +- .../retailmedia/v2024_07/api/AccountsApi.java | 877 + .../v2024_07}/api/AnalyticsApi.java | 173 +- .../v2024_07}/api/AudienceApi.java | 40 +- .../retailmedia/v2024_07/api/BalanceApi.java | 1199 ++ .../v2024_07}/api/CampaignApi.java | 1335 +- .../retailmedia/v2024_07}/api/GatewayApi.java | 24 +- .../v2024_07}/auth/ApiKeyAuth.java | 8 +- .../v2024_07}/auth/Authentication.java | 8 +- .../v2024_07}/auth/HttpBasicAuth.java | 8 +- .../v2024_07}/auth/HttpBearerAuth.java | 8 +- .../api/retailmedia/v2024_07}/auth/OAuth.java | 8 +- .../retailmedia/v2024_07}/auth/OAuthFlow.java | 4 +- .../v2024_07}/auth/OAuthOkHttpClient.java | 2 +- .../v2024_07}/auth/RetryingOAuth.java | 6 +- .../model/AbstractOpenApiSchema.java | 6 +- .../model/AddFundsToBalanceRequest.java | 282 + .../model/AddRemoveKeywordModel.java | 8 +- .../model/AddRemoveKeywordsModel.java | 8 +- .../model/AddRemoveKeywordsModelRequest.java | 8 +- .../model/AddRemoveKeywordsModelResource.java | 8 +- ...ddToBasketIdsUpdateModel202110Request.java | 8 +- .../model/AddToBasketTarget202110Request.java | 8 +- .../AddToBasketTarget202110Response.java | 10 +- .../model/ApplicationSummaryModel.java | 8 +- .../ApplicationSummaryModelResource.java | 10 +- .../ApplicationSummaryModelResponse.java | 12 +- .../v2024_07}/model/ApprovalStatusModel.java | 4 +- .../retailmedia/v2024_07}/model/Asset.java | 6 +- .../v2024_07}/model/AssetResource.java | 8 +- .../v2024_07}/model/AssetResponse.java | 10 +- .../v2024_07}/model/AsyncCampaignsReport.java | 10 +- .../model/AsyncCampaignsReportRequest.java | 8 +- .../model/AsyncCampaignsReportResource.java | 8 +- .../v2024_07}/model/AsyncLineItemsReport.java | 10 +- .../model/AsyncLineItemsReportRequest.java | 8 +- .../model/AsyncLineItemsReportResource.java | 8 +- .../v2024_07}/model/AsyncReportResponse.java | 10 +- .../v2024_07/model/AsyncRevenueReport.java | 1702 ++ .../model/AsyncRevenueReportRequest.java | 282 + .../model/AsyncRevenueReportResource.java | 326 + .../AuctionLineItemCreateModelRequest.java | 8 +- .../AuctionLineItemPagedListResponse.java | 12 +- .../model/AuctionLineItemResponse.java | 10 +- .../AuctionLineItemUpdateModelRequest.java | 8 +- .../AudienceIdsUpdateModel202110Request.java | 8 +- .../model/AudienceTarget202110Request.java | 8 +- .../model/AudienceTarget202110Response.java | 10 +- .../BalanceCampaign202110ListRequest.java | 8 +- ...alanceCampaign202110PagedListResponse.java | 12 +- .../BalanceHistoryChangeDataCaptureV1.java | 419 + .../v2024_07/model/BalanceResponse.java | 363 + .../BalanceResponsePagedListResponse.java} | 100 +- .../model/CampaignAttributesV202301.java | 6 +- .../model/CampaignBudgetOverrides.java | 274 + .../model/CampaignDailyBudgetOverride.java | 366 + .../model/CampaignMonthlyBudgetOverride.java | 366 + .../v2024_07}/model/CampaignV202301.java | 6 +- .../v2024_07}/model/Category202204.java | 6 +- .../model/Category202204ListResponse.java | 10 +- .../model/ChangeDatesOfBalanceRequest.java | 282 + .../v2024_07/model/ChangeDetailsV1.java | 279 + .../v2024_07}/model/ChoiceOption.java | 8 +- .../model/ChoiceVariableSpecification.java | 8 +- .../v2024_07}/model/ChoiceVariableValue.java | 6 +- .../v2024_07}/model/ColorVariableValue.java | 6 +- .../v2024_07}/model/CommonError.java | 6 +- .../CommonLineItemPagedListResponse.java | 12 +- .../model/CommonLineItemResponse.java | 10 +- .../v2024_07}/model/CommonProblem.java | 10 +- .../v2024_07}/model/CommonWarning.java | 6 +- .../v2024_07/model/CreateBalanceRequest.java | 282 + .../v2024_07}/model/Creative202110.java | 6 +- .../model/Creative202110ListResponse.java | 10 +- .../v2024_07}/model/Creative202210.java | 10 +- .../model/Creative202210ListResponse.java | 10 +- .../model/Creative202210Response.java | 10 +- .../model/CreativeCreateModel202207.java | 8 +- .../model/CreativeUpdateModel202207.java | 8 +- .../model/DailyLineItemBudgetOverride.java | 365 + .../EditableCampaignAttributesV202301.java | 6 +- .../v2024_07}/model/ExternalAccount.java | 6 +- .../model/ExternalAddFundsToBalance.java | 350 + ...ternalAddToBasketIdsUpdateModel202110.java | 6 +- .../ExternalAddToBasketTarget202110.java | 6 +- .../model/ExternalAuctionLineItem.java | 6 +- .../ExternalAuctionLineItemCreateModel.java | 6 +- .../ExternalAuctionLineItemUpdateModel.java | 6 +- .../ExternalAudienceIdsUpdateModel202110.java | 6 +- .../model/ExternalAudienceTarget202110.java | 6 +- .../model/ExternalBalanceResponse.java | 932 ++ .../v2024_07}/model/ExternalBrand.java | 6 +- .../model/ExternalCatalogRequest.java | 6 +- .../model/ExternalCatalogStatus.java | 6 +- .../model/ExternalChangeDatesOfBalance.java | 349 + .../model/ExternalCommonLineItem.java | 6 +- .../model/ExternalCreateBalance.java} | 322 +- .../model/ExternalKeywordTarget202110.java | 6 +- .../model/ExternalLineItemCapping202110.java | 6 +- .../model/ExternalLineItemPage202110.java | 8 +- .../ExternalLineItemPageCategory202110.java | 6 +- .../ExternalPreferredLineItem202110.java | 10 +- ...nalPreferredLineItemCreateModel202110.java | 10 +- ...nalPreferredLineItemUpdateModel202110.java | 10 +- .../model/ExternalPromotedProduct202110.java | 6 +- .../v2024_07}/model/ExternalRetailer.java | 6 +- .../model/ExternalRetailerPages202110.java | 6 +- .../ExternalStoreIdsUpdateModel202110.java | 6 +- .../model/ExternalStoreTarget202110.java | 6 +- .../model/ExternalUpdateBalanceModel.java | 447 + .../v2024_07}/model/FilesVariableValue.java | 6 +- .../model/FilesVariablesSpecification.java | 6 +- .../model/HyperlinkVariableValue.java | 6 +- .../v2024_07}/model/InputKeywordsModel.java | 6 +- ...tResourceOfAuctionLineItemCreateModel.java | 8 +- ...eOfPreferredLineItemCreateModel202110.java | 8 +- ...gnAttributesV202301AndCampaignV202301.java | 8 +- ...BodyWithIdOfInt64AndAccountAndAccount.java | 8 +- ...nApiBodyWithIdOfInt64AndBrandAndBrand.java | 8 +- ...4AndCampaignV202301AndCampaignV202301.java | 8 +- ...Int64AndCatalogStatusAndCatalogStatus.java | 8 +- ...dMultipliersAndLineItemBidMultipliers.java | 8 +- ...dyWithIdOfInt64AndRetailerAndRetailer.java | 8 +- ...gnAttributesV202301AndCampaignV202301.java | 8 +- ...utIdOfCatalogRequestAndCatalogRequest.java | 8 +- .../model/JsonApiPageResponseOfAccount.java | 23 +- .../model/JsonApiPageResponseOfBrand.java | 23 +- .../JsonApiPageResponseOfCampaignV202301.java | 14 +- .../model/JsonApiPageResponseOfRetailer.java | 23 +- .../model/JsonApiRequestOfCatalogRequest.java | 8 +- ...sonApiSingleResponseOfCampaignV202301.java | 12 +- .../JsonApiSingleResponseOfCatalogStatus.java | 12 +- ...ingleResponseOfLineItemBidMultipliers.java | 12 +- .../v2024_07}/model/KeywordDataModel.java | 12 +- .../model/KeywordTarget202110Request.java | 8 +- .../model/KeywordTarget202110Response.java | 10 +- .../v2024_07}/model/KeywordsModel.java | 8 +- .../model/KeywordsModelResource.java | 8 +- .../model/KeywordsModelResponse.java | 10 +- .../model/LineItemBidMultipliers.java | 6 +- .../model/LineItemBidMultipliersRequest.java | 8 +- .../model/LineItemBidMultipliersResponse.java | 10 +- .../model/LineItemBudgetOverrides.java | 274 + .../v2024_07}/model/MatchTypeModel.java | 4 +- .../retailmedia/v2024_07/model/Metadata.java | 281 + .../model/MonthlyLineItemBudegetOverride.java | 366 + .../model/NegotiationStateModel.java | 4 +- .../v2024_07}/model/PageMetadata.java | 6 +- ...geOfBalanceHistoryChangeDataCaptureV1.java | 261 + .../v2024_07}/model/PageTypeEnvironment.java | 6 +- .../v2024_07}/model/PostCampaignV202301.java | 8 +- ...ferredLineItem202110PagedListResponse.java | 12 +- .../PreferredLineItem202110Response.java | 10 +- ...erredLineItemCreateModel202110Request.java | 8 +- ...erredLineItemUpdateModel202110Request.java | 8 +- .../v2024_07}/model/ProblemDetails.java | 6 +- .../PromotedProduct202110ListRequest.java | 8 +- ...romotedProduct202110PagedListResponse.java | 12 +- .../v2024_07}/model/ProposalStatusModel.java | 10 +- .../model/ProposalStatusModelResource.java | 8 +- .../model/ProposalStatusModelResponse.java | 10 +- .../v2024_07}/model/PutCampaignV202301.java | 8 +- .../v2024_07}/model/ReportOutcome.java | 8 +- .../model/ResourceOfAddFundsToBalance.java | 358 + .../model/ResourceOfAuctionLineItem.java | 8 +- .../ResourceOfAuctionLineItemUpdateModel.java | 8 +- .../ResourceOfBalanceCampaign202110.java | 6 +- .../model/ResourceOfBalanceResponse.java | 358 + .../model/ResourceOfCategory202204.java | 8 +- .../model/ResourceOfChangeDatesOfBalance.java | 358 + .../model/ResourceOfCommonLineItem.java | 8 +- .../model/ResourceOfCreateBalance.java | 358 + .../model/ResourceOfCreative202110.java | 8 +- .../model/ResourceOfCreative202210.java | 8 +- .../ResourceOfLineItemBidMultipliers.java | 8 +- .../ResourceOfPreferredLineItem202110.java | 8 +- ...eOfPreferredLineItemUpdateModel202110.java | 8 +- .../ResourceOfPromotedProduct202110.java | 8 +- .../model/ResourceOfRetailMediaAccount.java | 8 +- .../v2024_07}/model/ResourceOfTemplate.java | 8 +- .../model/ResourceOfUpdateBalanceModel.java | 358 + .../v2024_07}/model/ResourceOutcome.java | 8 +- .../ResourceOutcomeOfRetailMediaAccount.java | 10 +- .../v2024_07}/model/RetailMediaAccount.java | 6 +- .../RetailMediaBrandAccountCreation.java | 6 +- .../v2024_07}/model/RetailMediaBrands.java | 6 +- .../v2024_07}/model/RetailMediaSeller.java | 6 +- .../RetailMediaSellerAccountCreation.java | 8 +- .../v2024_07}/model/ReviewStateModel.java | 4 +- .../model/RmLegacyAudienceCreateEntityV1.java | 6 +- ...mLegacyAudienceCreateEntityV1Resource.java | 8 +- ...mLegacyAudienceCreateEntityV1Response.java | 10 +- .../model/RmLegacyAudienceCreateEntityV2.java | 8 +- ...mLegacyAudienceCreateEntityV2Resource.java | 8 +- ...mLegacyAudienceCreateEntityV2Response.java | 10 +- .../RmLegacyAudienceCreateInputEntityV1.java | 8 +- .../RmLegacyAudienceCreateInputEntityV2.java | 8 +- .../model/RmLegacyAudienceGetEntityV1.java | 10 +- ...LegacyAudienceGetEntityV1ListResponse.java | 10 +- .../RmLegacyAudienceGetEntityV1Resource.java | 8 +- .../model/RmLegacyAudienceGetEntityV2.java | 10 +- ...LegacyAudienceGetEntityV2ListResponse.java | 10 +- .../RmLegacyAudienceGetEntityV2Resource.java | 8 +- .../RmLegacyAudienceUserBehaviorCreateV2.java | 8 +- ...RmLegacyAudienceUserBehaviorDetailsV2.java | 8 +- .../model/RmLegacySegmentCustomerList.java | 6 +- .../RmLegacySegmentUserBehaviorCreateV2.java | 6 +- .../model/RmLegacySegmentUserBehaviorV1.java | 6 +- .../model/RmLegacySegmentUserBehaviorV2.java | 6 +- .../v2024_07}/model/RmcaCommonProblem.java | 6 +- .../retailmedia/v2024_07}/model/Section.java | 8 +- .../v2024_07}/model/SetBidModel.java | 6 +- .../v2024_07}/model/SetBidsModel.java | 8 +- .../v2024_07}/model/SetBidsModelRequest.java | 8 +- .../v2024_07}/model/SetBidsModelResource.java | 8 +- .../v2024_07}/model/StatusResponse.java | 6 +- .../model/StatusResponseResource.java | 8 +- .../StoreIdsUpdateModel202110Request.java | 8 +- .../model/StoreTarget202110Request.java | 8 +- .../model/StoreTarget202110Response.java | 10 +- .../retailmedia/v2024_07}/model/Template.java | 8 +- .../v2024_07}/model/TemplateListResponse.java | 10 +- .../v2024_07}/model/TemplateResponse.java | 10 +- .../v2024_07}/model/TemplateVariable.java | 12 +- .../model/TemplateVariableValue.java | 16 +- .../model/TextVariableSpecification.java | 6 +- .../v2024_07}/model/TextVariableValue.java | 6 +- .../model/UpdateBalanceModelRequest.java | 282 + ...rceCollectionInputOfRetailMediaSeller.java | 8 +- ...eCollectionOutcomeOfRetailMediaSeller.java | 10 +- ...esourceInputOfCampaignBudgetOverrides.java | 207 + ...esourceInputOfLineItemBudgetOverrides.java | 207 + ...nputOfRetailMediaBrandAccountCreation.java | 8 +- ...ValueResourceInputOfRetailMediaBrands.java | 8 +- ...putOfRetailMediaSellerAccountCreation.java | 8 +- ...alueResourceOfCampaignBudgetOverrides.java | 251 + ...alueResourceOfLineItemBudgetOverrides.java | 251 + ...urceOfRetailMediaBrandAccountCreation.java | 8 +- .../ValueResourceOfRetailMediaBrands.java | 8 +- .../ValueResourceOfRetailMediaSeller.java | 8 +- ...rceOfRetailMediaSellerAccountCreation.java | 8 +- ...ourceOutcomeOfCampaignBudgetOverrides.java | 300 + ...ourceOutcomeOfLineItemBudgetOverrides.java | 300 + ...urceOfAddToBasketIdsUpdateModel202110.java | 8 +- ...TypeResourceOfAddToBasketTarget202110.java | 8 +- ...esourceOfAudienceIdsUpdateModel202110.java | 8 +- ...lueTypeResourceOfAudienceTarget202110.java | 8 +- ...alueTypeResourceOfKeywordTarget202110.java | 8 +- ...peResourceOfStoreIdsUpdateModel202110.java | 8 +- .../ValueTypeResourceOfStoreTarget202110.java | 8 +- .../v2024_07}/ExampleApplication.java | 18 +- .../retailmedia/v2024_07}/GatewayApiTest.java | 18 +- .../.openapi-generator/FILES | 146 +- sdks/retailmedia_preview/README.md | 102 +- sdks/retailmedia_preview/api/openapi.yaml | 4165 +++-- sdks/retailmedia_preview/build.gradle | 4 +- sdks/retailmedia_preview/docs/AccountsApi.md | 396 +- .../docs/AddFundsToBalanceV2.md | 16 + .../docs/AddFundsToBalanceV2Request.md | 14 + .../docs/ApplicationSummaryModel.md | 2 +- .../docs/ApplicationSummaryModelResource.md | 2 +- .../docs/ApplicationSummaryModelResponse.md | 2 +- .../docs/AsyncAccountsReport.md | 2 + .../docs/AsyncCampaignsReport.md | 2 + .../docs/AsyncLineItemsReport.md | 2 + sdks/retailmedia_preview/docs/AudienceApi.md | 479 + sdks/retailmedia_preview/docs/BalanceApi.md | 666 + .../docs/BalanceHistoryChangeDataCaptureV1.md | 36 + .../docs/BalanceResponseV2.md | 69 + .../docs/BalanceResponseV2Response.md | 16 + sdks/retailmedia_preview/docs/CampaignApi.md | 219 +- .../docs/ChangeDatesOfBalanceV2.md | 16 + .../docs/ChangeDatesOfBalanceV2Request.md | 14 + .../docs/ChangeDetailsV1.md | 16 + .../{ChangeDetails.md => ChangeDetailsV2.md} | 2 +- .../retailmedia_preview/docs/CommonProblem.md | 4 +- .../docs/CreateBalanceV2.md | 30 + .../docs/CreateBalanceV2Request.md | 14 + .../docs/ExternalCatalogStatus.md | 32 + .../docs/GrantConsentInput.md | 2 +- .../docs/GrantConsentModel.md | 2 +- .../docs/GrantConsentModelValueResource.md | 2 +- ...sertionOrderHistoryChangeDataCaptureV2.md} | 8 +- ...OfInt64AndCatalogStatusAndCatalogStatus.md | 16 + ...erCatalogRequestAndSellerCatalogRequest.md | 15 + .../docs/JsonApiPageResponseOfAccount.md | 2 +- .../docs/JsonApiPageResponseOfBrand.md | 2 +- .../docs/JsonApiPageResponseOfRetailer.md | 2 +- .../JsonApiRequestOfSellerCatalogRequest.md | 14 + .../JsonApiSingleResponseOfCatalogStatus.md | 16 + .../docs/NillableString.md | 14 + ...PageOfBalanceHistoryChangeDataCaptureV1.md | 15 + ...nsertionOrderHistoryChangeDataCaptureV2.md | 15 + ...rceCollectionOutcomeOfBalanceResponseV2.md | 17 + .../docs/ResourceOfAddFundsToBalanceV2.md | 16 + .../docs/ResourceOfBalanceResponseV2.md | 16 + .../docs/ResourceOfChangeDatesOfBalanceV2.md | 16 + .../docs/ResourceOfCreateBalanceV2.md | 16 + .../docs/ResourceOfUpdateBalanceModelV2.md | 16 + ...tailMediaContactlistAmendmentAttributes.md | 12 +- .../RmAudienceSegmentBulkCreateInputV1.md | 14 + .../RmAudienceSegmentBulkDeleteInputV1.md | 14 + .../RmAudienceSegmentBulkUpdateInputV1.md | 14 + .../docs/RmAudienceSegmentCreateEntityV1.md | 17 + ...RmAudienceSegmentCreateEntityV1Resource.md | 15 + ...RmAudienceSegmentDeleteEntityV1Resource.md | 16 + .../docs/RmAudienceSegmentEntityV1.md | 41 + .../RmAudienceSegmentEntityV1ListResponse.md | 16 + .../docs/RmAudienceSegmentEntityV1Resource.md | 16 + ...enceSegmentSearchMetadataV1ListResponse.md | 17 + ...RmAudienceSegmentIdEntityV1ListResponse.md | 16 + .../RmAudienceSegmentIdEntityV1Resource.md | 16 + .../docs/RmAudienceSegmentSearchEntityV1.md | 15 + ...RmAudienceSegmentSearchEntityV1Resource.md | 15 + .../docs/RmAudienceSegmentSearchInputV1.md | 14 + .../docs/RmAudienceSegmentSearchMetadataV1.md | 16 + .../docs/RmAudienceSegmentUpdateEntityV1.md | 16 + ...RmAudienceSegmentUpdateEntityV1Resource.md | 16 + .../docs/RmContactListCreateV1.md | 25 + .../docs/RmContactListStatisticsEntityV1.md | 16 + ...RmContactListStatisticsEntityV1Resource.md | 16 + ...RmContactListStatisticsEntityV1Response.md | 16 + .../docs/RmContactListV1.md | 27 + .../docs/SellerCatalogRequest.md | 14 + .../docs/SellerIdentifier.md | 15 + .../docs/SkuDataPreview.md | 2 +- .../docs/SkuSlimDataPreview.md | 2 +- .../docs/SyncCampaignsReport.md | 2 + .../docs/SyncLineItemsReport.md | 2 + .../docs/UpdateBalanceModelV2.md | 18 + .../docs/UpdateBalanceModelV2Request.md | 14 + .../api/retailmedia/preview/ApiClient.java | 2 +- .../criteo/api/retailmedia/preview/JSON.java | 72 +- .../retailmedia/preview/api/AccountsApi.java | 610 +- .../retailmedia/preview/api/AudienceApi.java | 771 + .../retailmedia/preview/api/BalanceApi.java | 1098 ++ .../retailmedia/preview/api/CampaignApi.java | 346 +- .../preview/model/AddFundsToBalanceV2.java | 362 + .../model/AddFundsToBalanceV2Request.java | 282 + .../model/ApplicationSummaryModel.java | 2 +- .../ApplicationSummaryModelResource.java | 2 +- .../ApplicationSummaryModelResponse.java | 2 +- .../preview/model/AsyncAccountsReport.java | 4 + .../preview/model/AsyncCampaignsReport.java | 4 + .../preview/model/AsyncLineItemsReport.java | 4 + .../BalanceHistoryChangeDataCaptureV1.java | 419 + .../preview/model/BalanceResponseV2.java | 907 + .../model/BalanceResponseV2Response.java | 363 + .../preview/model/ChangeDatesOfBalanceV2.java | 356 + .../model/ChangeDatesOfBalanceV2Request.java | 282 + .../preview/model/ChangeDetailsV1.java | 279 + ...hangeDetails.java => ChangeDetailsV2.java} | 58 +- .../preview/model/CommonProblem.java | 4 +- .../preview/model/CreateBalanceV2.java | 541 + .../model/CreateBalanceV2Request.java} | 84 +- .../preview/model/ExternalCatalogStatus.java | 531 + .../preview/model/GrantConsentInput.java | 2 +- .../preview/model/GrantConsentModel.java | 2 +- .../model/GrantConsentModelValueResource.java | 2 +- ...rtionOrderHistoryChangeDataCaptureV2.java} | 80 +- ...nt64AndCatalogStatusAndCatalogStatus.java} | 137 +- ...CatalogRequestAndSellerCatalogRequest.java | 322 + .../model/JsonApiPageResponseOfAccount.java | 9 +- .../model/JsonApiPageResponseOfBrand.java | 9 +- .../model/JsonApiPageResponseOfRetailer.java | 9 +- .../JsonApiRequestOfSellerCatalogRequest.java | 282 + .../JsonApiSingleResponseOfCatalogStatus.java | 394 + .../preview/model/NillableString.java | 292 + ...geOfBalanceHistoryChangeDataCaptureV1.java | 261 + ...rtionOrderHistoryChangeDataCaptureV2.java} | 66 +- ...eCollectionOutcomeOfBalanceResponseV2.java | 415 + .../model/ResourceOfAddFundsToBalanceV2.java | 358 + .../model/ResourceOfBalanceResponseV2.java} | 132 +- .../ResourceOfChangeDatesOfBalanceV2.java | 358 + .../model/ResourceOfCreateBalanceV2.java | 358 + .../model/ResourceOfUpdateBalanceModelV2.java | 358 + ...ilMediaContactlistAmendmentAttributes.java | 12 +- .../RmAudienceSegmentBulkCreateInputV1.java | 314 + .../RmAudienceSegmentBulkDeleteInputV1.java | 314 + .../RmAudienceSegmentBulkUpdateInputV1.java | 314 + .../RmAudienceSegmentCreateEntityV1.java | 390 + ...AudienceSegmentCreateEntityV1Resource.java | 326 + ...AudienceSegmentDeleteEntityV1Resource.java | 353 + .../model/RmAudienceSegmentEntityV1.java | 652 + ...RmAudienceSegmentEntityV1ListResponse.java | 393 + .../RmAudienceSegmentEntityV1Resource.java | 358 + ...ceSegmentSearchMetadataV1ListResponse.java | 427 + ...AudienceSegmentIdEntityV1ListResponse.java | 393 + .../RmAudienceSegmentIdEntityV1Resource.java | 353 + .../RmAudienceSegmentSearchEntityV1.java | 344 + ...AudienceSegmentSearchEntityV1Resource.java | 326 + .../model/RmAudienceSegmentSearchInputV1.java | 282 + .../RmAudienceSegmentSearchMetadataV1.java | 347 + .../RmAudienceSegmentUpdateEntityV1.java | 355 + ...AudienceSegmentUpdateEntityV1Resource.java | 358 + .../preview/model/RmContactListCreateV1.java | 343 + .../RmContactListStatisticsEntityV1.java | 347 + ...ContactListStatisticsEntityV1Resource.java | 358 + ...ContactListStatisticsEntityV1Response.java | 375 + .../preview/model/RmContactListV1.java | 374 + .../preview/model/SellerCatalogRequest.java | 314 + .../preview/model/SellerIdentifier.java | 321 + .../preview/model/SkuDataPreview.java | 5 +- .../preview/model/SkuSlimDataPreview.java | 5 +- .../preview/model/SyncCampaignsReport.java | 4 + .../preview/model/SyncLineItemsReport.java | 4 + .../preview/model/UpdateBalanceModelV2.java | 420 + .../model/UpdateBalanceModelV2Request.java | 282 + 1457 files changed, 155954 insertions(+), 33594 deletions(-) delete mode 100644 sdks/marketingsolutions_2023-04/.openapi-generator/FILES delete mode 100644 sdks/marketingsolutions_2023-04/README.md delete mode 100644 sdks/marketingsolutions_2023-04/api/openapi.yaml delete mode 100644 sdks/marketingsolutions_2023-04/docs/AdSetGeoLocation.md delete mode 100644 sdks/marketingsolutions_2023-04/docs/AdSetTargeting.md delete mode 100644 sdks/marketingsolutions_2023-04/docs/Audience.md delete mode 100644 sdks/marketingsolutions_2023-04/docs/AudienceAttributes.md delete mode 100644 sdks/marketingsolutions_2023-04/docs/DeleteAudienceResponse.md delete mode 100644 sdks/marketingsolutions_2023-04/docs/GetAudiencesResponse.md delete mode 100644 sdks/marketingsolutions_2023-04/docs/NewAudience.md delete mode 100644 sdks/marketingsolutions_2023-04/docs/NewAudienceAttributes.md delete mode 100644 sdks/marketingsolutions_2023-04/docs/NewAudienceResponse.md delete mode 100644 sdks/marketingsolutions_2023-04/docs/PatchAdSet.md delete mode 100644 sdks/marketingsolutions_2023-04/docs/ReadAdSet.md delete mode 100644 sdks/marketingsolutions_2023-04/docs/ReadAdSetBidding.md delete mode 100644 sdks/marketingsolutions_2023-04/docs/ReplaceAudience.md delete mode 100644 sdks/marketingsolutions_2023-04/docs/ReplaceAudienceResponse.md delete mode 100644 sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/JSON.java delete mode 100644 sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/AudienceApi.java delete mode 100644 sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/DeleteAudienceResponse.java delete mode 100644 sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/GetAudiencesResponse.java delete mode 100644 sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudienceResponse.java rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/.github/workflows/maven.yml (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/.gitignore (100%) create mode 100644 sdks/marketingsolutions_2024-07/.openapi-generator/FILES rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/.openapi-generator/VERSION (100%) create mode 100644 sdks/marketingsolutions_2024-07/README.md create mode 100644 sdks/marketingsolutions_2024-07/api/openapi.yaml rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/build.gradle (97%) create mode 100644 sdks/marketingsolutions_2024-07/docs/Ad.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AdListResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AdResource.md rename sdks/{marketingsolutions_2023-04/docs/ResponseReadAdSet.md => marketingsolutions_2024-07/docs/AdResponse.md} (73%) rename sdks/{marketingsolutions_2023-04/docs/ReplaceAudienceRequest.md => marketingsolutions_2024-07/docs/AdSetAudienceLinkEntityV1.md} (51%) create mode 100644 sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkEntityV1Response.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkInputEntityV1.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/AdSetCategoryBid.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/AdSetCategoryBidListResponse.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/AdSetCategoryBidResource.md (100%) rename sdks/{marketingsolutions_2023-04/docs/AdSetDeliveryLimitations.md => marketingsolutions_2024-07/docs/AdSetDeliveryLimitationsV24Q1.md} (96%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/AdSetDisplayMultiplier.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/AdSetDisplayMultiplierListResponse.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/AdSetDisplayMultiplierResource.md (100%) rename sdks/{marketingsolutions_2023-04/docs/AdSetFrequencyCapping.md => marketingsolutions_2024-07/docs/AdSetFrequencyCappingV24Q1.md} (94%) create mode 100644 sdks/marketingsolutions_2024-07/docs/AdSetGeoLocationV24Q1.md rename sdks/{marketingsolutions_2023-04/docs/AdSetSearchFilter.md => marketingsolutions_2024-07/docs/AdSetSearchFilterV24Q1.md} (92%) rename sdks/{marketingsolutions_2023-04/docs/RequestAdSetSearch.md => marketingsolutions_2024-07/docs/AdSetSearchRequestV24Q1.md} (58%) rename sdks/{marketingsolutions_2023-04/docs/AdSetTargetingRule.md => marketingsolutions_2024-07/docs/AdSetTargetingRuleV24Q1.md} (94%) create mode 100644 sdks/marketingsolutions_2024-07/docs/AdSetTargetingV24Q1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AdWrite.md rename sdks/{marketingsolutions_2023-04/docs/NewAudienceRequest.md => marketingsolutions_2024-07/docs/AdWriteRequest.md} (50%) create mode 100644 sdks/marketingsolutions_2024-07/docs/AdWriteResource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AdaptiveAttributes.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AdaptiveColors.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AdaptiveWriteAttributes.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/AdvertiserApi.md (84%) create mode 100644 sdks/marketingsolutions_2024-07/docs/AlgebraNodeV1.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/AnalyticsApi.md (86%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/ApplicationSummaryModel.md (75%) rename sdks/{retailmedia_2023-04 => marketingsolutions_2024-07}/docs/ApplicationSummaryModelResource.md (79%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/ApplicationSummaryModelResponse.md (85%) create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceApi.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceBulkCreateInputV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceBulkDeleteInputV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceBulkUpdateInputV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceComputeSizeEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceComputeSizesInputV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceCreateEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceCreateEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceDeleteEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceEntityV1AudienceSearchMetadataV1ListResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceEntityV1ListResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceEntityV1Resource.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/AudienceError.md (100%) create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceEstimateSizeEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceEstimateSizeEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceEstimateSizeInputV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceIdEntityV1ListResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceIdEntityV1Resource.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/AudienceNameDescription.md (100%) create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSearchEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSearchEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSearchInputV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSearchMetadataV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentBulkCreateInputV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentBulkDeleteInputV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentBulkUpdateInputV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentComputeSizeEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentComputeSizesInputV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentCreateEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentCreateEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentDeleteEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1ListResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentEstimateSizeInputV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentIdEntityV1ListResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentIdEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchInputV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchMetadataV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEntityV1ListResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationV1Response.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentUpdateEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSegmentUpdateEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSizeEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSizeEntityV1ListResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSizeEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSizeEstimationV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSizeEstimationV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceSizeEstimationV1Response.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceUpdateEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/AudienceUpdateEntityV1Resource.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/AudienceWarning.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/BasicAudienceDefinition.md (100%) create mode 100644 sdks/marketingsolutions_2024-07/docs/BehavioralV1.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/CampaignApi.md (64%) rename sdks/{marketingsolutions_2023-04/docs/CampaignSearchFilters.md => marketingsolutions_2024-07/docs/CampaignSearchFiltersV23Q1.md} (90%) rename sdks/{marketingsolutions_2023-04/docs/CampaignSearchRequest.md => marketingsolutions_2024-07/docs/CampaignSearchRequestV23Q1.md} (56%) rename sdks/{marketingsolutions_2023-04/docs/CampaignSpendLimit.md => marketingsolutions_2024-07/docs/CampaignSpendLimitV23Q1.md} (96%) rename sdks/{marketingsolutions_2023-04/docs/Campaign.md => marketingsolutions_2024-07/docs/CampaignV23Q1.md} (56%) create mode 100644 sdks/marketingsolutions_2024-07/docs/CampaignV23Q1ListResponse.md rename sdks/{retailmedia_2023-04/docs/ResourceOfBalance202110.md => marketingsolutions_2024-07/docs/CampaignV23Q1Resource.md} (59%) create mode 100644 sdks/marketingsolutions_2024-07/docs/CampaignV23Q1Response.md rename sdks/{retailmedia_2023-04 => marketingsolutions_2024-07}/docs/CommonProblem.md (89%) create mode 100644 sdks/marketingsolutions_2024-07/docs/ContactListStatisticsEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/ContactListStatisticsEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/ContactListStatisticsEntityV1Response.md create mode 100644 sdks/marketingsolutions_2024-07/docs/ContactListV1.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/ContactlistAmendment.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/ContactlistAmendmentAttributes.md (95%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/ContactlistAmendmentRequest.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/ContactlistOperation.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/ContactlistOperationAttributes.md (100%) create mode 100644 sdks/marketingsolutions_2024-07/docs/Coupon.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CouponListResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CouponResource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CouponResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CouponSupportedSizes.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CouponSupportedSizesResource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CouponSupportedSizesResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateAdSetBiddingV24Q1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateAdSetBudgetV24Q1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateAdSetGeoLocationV24Q1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateAdSetScheduleV24Q1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateAdSetTargetingV24Q1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateAdSetV24Q1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateAdSetV24Q1Request.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateAdSetV24Q1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateCampaign.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateCampaignRequest.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateCampaignResource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateCampaignSpendLimit.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateCoupon.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateCouponRequest.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateCouponResource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreateImageSlide.md create mode 100644 sdks/marketingsolutions_2024-07/docs/Creative.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreativeApi.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreativeListResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreativeResource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreativeResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreativeWrite.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreativeWriteRequest.md create mode 100644 sdks/marketingsolutions_2024-07/docs/CreativeWriteResource.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/CriteoApiError.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/CriteoApiWarning.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/DeleteAudienceContactListResponse.md (100%) create mode 100644 sdks/marketingsolutions_2024-07/docs/DynamicAttributes.md create mode 100644 sdks/marketingsolutions_2024-07/docs/DynamicWriteAttributes.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/EntityOfPortfolioMessage.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/ErrorCodeResponse.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/GatewayApi.md (84%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/GetPortfolioResponse.md (100%) create mode 100644 sdks/marketingsolutions_2024-07/docs/HtmlTagAttributes.md create mode 100644 sdks/marketingsolutions_2024-07/docs/HtmlTagWriteAttributes.md create mode 100644 sdks/marketingsolutions_2024-07/docs/ImageAttributes.md create mode 100644 sdks/marketingsolutions_2024-07/docs/ImageSet.md create mode 100644 sdks/marketingsolutions_2024-07/docs/ImageSetBase64.md create mode 100644 sdks/marketingsolutions_2024-07/docs/ImageShape.md create mode 100644 sdks/marketingsolutions_2024-07/docs/ImageSlide.md create mode 100644 sdks/marketingsolutions_2024-07/docs/ImageWriteAttributes.md create mode 100644 sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentBrandEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentBrandEntityV1ListResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentBrandEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentInterestEntityV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentInterestEntityV1ListResponse.md create mode 100644 sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentInterestEntityV1Resource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/InMarketCreateV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/InMarketSizeEstimationV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/InMarketUpdateV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/InMarketV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/LocationCreateV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/LocationSizeEstimationV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/LocationUpdateV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/LocationV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/LookalikeCreateV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/LookalikeUpdateV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/LookalikeV1.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/ModifyAudienceResponse.md (100%) rename sdks/{marketingsolutions_2023-04/docs/NillableAdSetTargetingRule.md => marketingsolutions_2024-07/docs/NillableAdSetTargetingRuleV24Q1.md} (65%) rename sdks/{marketingsolutions_2023-04/docs/NillableAdSetTargetingRuleValue.md => marketingsolutions_2024-07/docs/NillableAdSetTargetingRuleV24Q1Value.md} (90%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/NillableDateTime.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/NillableDecimal.md (100%) create mode 100644 sdks/marketingsolutions_2024-07/docs/NillableGenderV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/NillableInt32.md create mode 100644 sdks/marketingsolutions_2024-07/docs/NillableString.md rename sdks/{marketingsolutions_2023-04/docs/PatchAdSetBidding.md => marketingsolutions_2024-07/docs/PatchAdSetBiddingV24Q1.md} (90%) rename sdks/{marketingsolutions_2023-04/docs/PatchAdSetBudget.md => marketingsolutions_2024-07/docs/PatchAdSetBudgetV24Q1.md} (96%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchAdSetCategoryBid.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchAdSetCategoryBidListRequest.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchAdSetCategoryBidResource.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchAdSetCategoryBidResultListResponse.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchAdSetCategoryBidResultResource.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchAdSetDisplayMultiplier.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchAdSetDisplayMultiplierListRequest.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchAdSetDisplayMultiplierResource.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchAdSetDisplayMultiplierResultListResponse.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchAdSetDisplayMultiplierResultResource.md (100%) rename sdks/{marketingsolutions_2023-04/docs/PatchAdSetScheduling.md => marketingsolutions_2024-07/docs/PatchAdSetSchedulingV24Q1.md} (91%) create mode 100644 sdks/marketingsolutions_2024-07/docs/PatchAdSetV24Q1.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchCampaign.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchCampaignListRequest.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchCampaignSpendLimit.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchCampaignWriteResource.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchResultCampaignListResponse.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PatchResultCampaignReadResource.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PlacementsReportQueryDataMessage.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PlacementsReportQueryEntityMessage.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PlacementsReportQueryMessage.md (100%) create mode 100644 sdks/marketingsolutions_2024-07/docs/PointOfInterestV1.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/PortfolioMessage.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/ProblemDetails.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/ProblemsDetails.md (100%) create mode 100644 sdks/marketingsolutions_2024-07/docs/ProspectingCreateV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/ProspectingUpdateV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/ProspectingV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/ReadAdSetBiddingV24Q1.md rename sdks/{marketingsolutions_2023-04/docs/ReadAdSetBudget.md => marketingsolutions_2024-07/docs/ReadAdSetBudgetV24Q1.md} (93%) rename sdks/{marketingsolutions_2023-04/docs/ReadAdSetSchedule.md => marketingsolutions_2024-07/docs/ReadAdSetScheduleV24Q1.md} (97%) create mode 100644 sdks/marketingsolutions_2024-07/docs/ReadAdSetV24Q1.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/ReadModelAdSetId.md (100%) rename sdks/{marketingsolutions_2023-04/docs/ReadModelReadAdSet.md => marketingsolutions_2024-07/docs/ReadModelAdSetIdV24Q1.md} (75%) rename sdks/{marketingsolutions_2023-04/docs/CampaignReadResource.md => marketingsolutions_2024-07/docs/ReadModelReadAdSetV24Q1.md} (72%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/RequestsAdSetId.md (100%) rename sdks/{marketingsolutions_2023-04/docs/RequestsPatchAdSet.md => marketingsolutions_2024-07/docs/RequestsPatchAdSetV24Q1.md} (52%) rename sdks/{marketingsolutions_2023-04/docs/CampaignResponse.md => marketingsolutions_2024-07/docs/ResponseReadAdSetV24Q1.md} (74%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/ResponsesAdSetId.md (100%) rename sdks/{marketingsolutions_2023-04/docs/ResponsesReadAdSet.md => marketingsolutions_2024-07/docs/ResponsesAdSetIdV24Q1.md} (71%) rename sdks/{marketingsolutions_2023-04/docs/CampaignListResponse.md => marketingsolutions_2024-07/docs/ResponsesReadAdSetV24Q1.md} (71%) create mode 100644 sdks/marketingsolutions_2024-07/docs/RetargetingCreateV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/RetargetingUpdateV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/RetargetingV1.md create mode 100644 sdks/marketingsolutions_2024-07/docs/Size.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/StatisticsReportQueryMessage.md (100%) create mode 100644 sdks/marketingsolutions_2024-07/docs/Tag.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/TransactionsReportQueryDataMessage.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/TransactionsReportQueryEntityMessage.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/TransactionsReportQueryMessage.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/TransparencyQueryMessage.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/TransparencyReportAttributes.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/TransparencyReportDataMessage.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/TransparencyReportEntityMessage.md (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/TransparencyReportFile.md (100%) create mode 100644 sdks/marketingsolutions_2024-07/docs/UpdateCoupon.md create mode 100644 sdks/marketingsolutions_2024-07/docs/UpdateCouponRequest.md create mode 100644 sdks/marketingsolutions_2024-07/docs/UpdateCouponResource.md create mode 100644 sdks/marketingsolutions_2024-07/docs/VideoDetail.md rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/docs/WriteModelAdSetId.md (100%) rename sdks/{marketingsolutions_2023-04/docs/WriteModelPatchAdSet.md => marketingsolutions_2024-07/docs/WriteModelPatchAdSetV24Q1.md} (72%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/gradle/wrapper/gradle-wrapper.jar (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/gradle/wrapper/gradle-wrapper.properties (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/gradlew (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/gradlew.bat (100%) rename sdks/{marketingsolutions_2023-04 => marketingsolutions_2024-07}/settings.gradle (100%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/ApiCallback.java (94%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/ApiClient.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/ApiClientBuilder.java (87%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/ApiException.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/ApiResponse.java (94%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/Configuration.java (90%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/GzipRequestInterceptor.java (96%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/JSON.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/Pair.java (91%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/ProgressRequestBody.java (94%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/ProgressResponseBody.java (94%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/ServerConfiguration.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/ServerVariable.java (93%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/StringUtil.java (95%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/api/AdvertiserApi.java (90%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/api/AnalyticsApi.java (95%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/AudienceApi.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/api/CampaignApi.java (70%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/CreativeApi.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/api/GatewayApi.java (90%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/auth/ApiKeyAuth.java (88%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/auth/Authentication.java (80%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/auth/HttpBasicAuth.java (84%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/auth/HttpBearerAuth.java (87%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/auth/OAuth.java (80%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/auth/OAuthFlow.java (84%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/auth/OAuthOkHttpClient.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/auth/RetryingOAuth.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/AbstractOpenApiSchema.java (95%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Ad.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdListResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdResource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1Response.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkInputEntityV1.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/AdSetCategoryBid.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/AdSetCategoryBidListResponse.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/AdSetCategoryBidResource.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDeliveryLimitations.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDeliveryLimitationsV24Q1.java} (86%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/AdSetDisplayMultiplier.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/AdSetDisplayMultiplierListResponse.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/AdSetDisplayMultiplierResource.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetFrequencyCapping.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetFrequencyCappingV24Q1.java} (84%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetGeoLocation.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetGeoLocationV24Q1.java} (74%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetSearchFilter.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetSearchFilterV24Q1.java} (83%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestAdSetSearch.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetSearchRequestV24Q1.java} (76%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetTargetingRule.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetTargetingRuleV24Q1.java} (84%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetTargeting.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetTargetingV24Q1.java} (74%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWrite.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceRequest.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWriteRequest.java} (78%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWriteResource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveAttributes.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveColors.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveWriteAttributes.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AlgebraNodeV1.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ApplicationSummaryModel.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ApplicationSummaryModelResource.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ApplicationSummaryModelResponse.java (97%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkCreateInputV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkDeleteInputV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkUpdateInputV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceComputeSizeEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceComputeSizesInputV1.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceAttributes.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceCreateEntityV1.java} (73%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceCreateEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceDeleteEntityV1Resource.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceAttributes.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1.java} (61%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1AudienceSearchMetadataV1ListResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1ListResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1Resource.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/AudienceError.java (99%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeInputV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceIdEntityV1ListResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceIdEntityV1Resource.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/AudienceNameDescription.java (98%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchInputV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchMetadataV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkCreateInputV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkDeleteInputV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkUpdateInputV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentComputeSizeEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentComputeSizesInputV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentCreateEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentCreateEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentDeleteEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1ListResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEstimateSizeInputV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentIdEntityV1ListResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentIdEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchInputV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchMetadataV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1ListResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1Response.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentUpdateEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentUpdateEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1ListResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1Response.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceUpdateEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceUpdateEntityV1Resource.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/AudienceWarning.java (99%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/BasicAudienceDefinition.java (98%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/BehavioralV1.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSearchFilters.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSearchFiltersV23Q1.java} (83%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSearchRequest.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSearchRequestV23Q1.java} (79%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSpendLimit.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSpendLimitV23Q1.java} (86%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/Campaign.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1.java} (77%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1ListResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1Response.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/CommonProblem.java (98%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1Response.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListV1.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ContactlistAmendment.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ContactlistAmendmentAttributes.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ContactlistAmendmentRequest.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ContactlistOperation.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ContactlistOperationAttributes.java (99%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Coupon.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponListResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponResource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizes.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizesResource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizesResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetBiddingV24Q1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetBudgetV24Q1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetGeoLocationV24Q1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetScheduleV24Q1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetTargetingV24Q1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1Request.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaign.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignRequest.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignResource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignSpendLimit.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCoupon.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCouponRequest.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignReadResource.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCouponResource.java} (79%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateImageSlide.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Creative.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignListResponse.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeListResponse.java} (82%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeResource.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignResponse.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeResponse.java} (83%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWrite.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWriteRequest.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWriteResource.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/CriteoApiError.java (99%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/CriteoApiWarning.java (99%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/DeleteAudienceContactListResponse.java (97%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DynamicAttributes.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DynamicWriteAttributes.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/EntityOfPortfolioMessage.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ErrorCodeResponse.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/GetPortfolioResponse.java (97%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/HtmlTagAttributes.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudience.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/HtmlTagWriteAttributes.java} (68%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageAttributes.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSet.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSetBase64.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageShape.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSlide.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageWriteAttributes.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1ListResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1ListResponse.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1Resource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketCreateV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketSizeEstimationV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketUpdateV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationCreateV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationSizeEstimationV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationUpdateV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeCreateV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeUpdateV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeV1.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ModifyAudienceResponse.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableAdSetTargetingRule.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableAdSetTargetingRuleV24Q1.java} (79%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableAdSetTargetingRuleValue.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableAdSetTargetingRuleV24Q1Value.java} (82%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/NillableDateTime.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/NillableDecimal.java (98%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableGenderV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableInt32.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableString.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetBidding.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetBiddingV24Q1.java} (82%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetBudget.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetBudgetV24Q1.java} (87%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchAdSetCategoryBid.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchAdSetCategoryBidListRequest.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchAdSetCategoryBidResource.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchAdSetCategoryBidResultListResponse.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchAdSetCategoryBidResultResource.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchAdSetDisplayMultiplier.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchAdSetDisplayMultiplierListRequest.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchAdSetDisplayMultiplierResource.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchAdSetDisplayMultiplierResultListResponse.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchAdSetDisplayMultiplierResultResource.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetScheduling.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetSchedulingV24Q1.java} (82%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSet.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetV24Q1.java} (75%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchCampaign.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchCampaignListRequest.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchCampaignSpendLimit.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchCampaignWriteResource.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchResultCampaignListResponse.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PatchResultCampaignReadResource.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PlacementsReportQueryDataMessage.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PlacementsReportQueryEntityMessage.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PlacementsReportQueryMessage.java (99%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PointOfInterestV1.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/PortfolioMessage.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ProblemDetails.java (99%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ProblemsDetails.java (97%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingCreateV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingUpdateV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingV1.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetBidding.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetBiddingV24Q1.java} (67%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetBudget.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetBudgetV24Q1.java} (86%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetSchedule.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetScheduleV24Q1.java} (85%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSet.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetV24Q1.java} (66%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ReadModelAdSetId.java (98%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelAdSetIdV24Q1.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadModelReadAdSet.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelReadAdSetV24Q1.java} (81%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/RequestsAdSetId.java (97%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestsPatchAdSet.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RequestsPatchAdSetV24Q1.java} (80%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponseReadAdSet.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponseReadAdSetV24Q1.java} (82%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/ResponsesAdSetId.java (97%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesAdSetIdV24Q1.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponsesReadAdSet.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesReadAdSetV24Q1.java} (83%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceResponse.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingCreateV1.java} (57%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingUpdateV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingV1.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Size.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/StatisticsReportQueryMessage.java (99%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Tag.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/TransactionsReportQueryDataMessage.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/TransactionsReportQueryEntityMessage.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/TransactionsReportQueryMessage.java (99%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/TransparencyQueryMessage.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/TransparencyReportAttributes.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/TransparencyReportDataMessage.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/TransparencyReportEntityMessage.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/TransparencyReportFile.java (98%) create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCoupon.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCouponRequest.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCouponResource.java create mode 100644 sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/VideoDetail.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07}/model/WriteModelAdSetId.java (98%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/WriteModelPatchAdSet.java => marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/WriteModelPatchAdSetV24Q1.java} (81%) rename sdks/{marketingsolutions_2023-04/src/test/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/test/java/com/criteo/api/marketingsolutions/v2024_07}/ExampleApplication.java (81%) rename sdks/{marketingsolutions_2023-04/src/test/java/com/criteo/api/marketingsolutions/v2023_04 => marketingsolutions_2024-07/src/test/java/com/criteo/api/marketingsolutions/v2024_07}/GatewayApiTest.java (81%) create mode 100644 sdks/marketingsolutions_preview/docs/CreateProductFilterRequest.md create mode 100644 sdks/marketingsolutions_preview/docs/ProductFilterConfig.md create mode 100644 sdks/marketingsolutions_preview/docs/ValueResourceCollectionOutcomeOfProductFilterConfig.md create mode 100644 sdks/marketingsolutions_preview/docs/ValueResourceInputOfCreateProductFilterRequest.md create mode 100644 sdks/marketingsolutions_preview/docs/ValueResourceOfCreateProductFilterRequest.md create mode 100644 sdks/marketingsolutions_preview/docs/ValueResourceOfProductFilterConfig.md create mode 100644 sdks/marketingsolutions_preview/docs/ValueResourceOutcomeOfProductFilterConfig.md create mode 100644 sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/CreateProductFilterRequest.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudience.java => marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ProductFilterConfig.java} (67%) create mode 100644 sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceCollectionOutcomeOfProductFilterConfig.java create mode 100644 sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceInputOfCreateProductFilterRequest.java create mode 100644 sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOfCreateProductFilterRequest.java create mode 100644 sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOfProductFilterConfig.java create mode 100644 sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOutcomeOfProductFilterConfig.java delete mode 100644 sdks/retailmedia_2023-04/.openapi-generator/FILES delete mode 100644 sdks/retailmedia_2023-04/docs/Balance202110PagedListResponse.md delete mode 100644 sdks/retailmedia_2023-04/docs/ExternalBalance202110.md create mode 100644 sdks/retailmedia_2023-07/docs/AccountsApi.md create mode 100644 sdks/retailmedia_2023-07/docs/BalanceApi.md create mode 100644 sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/api/AccountsApi.java create mode 100644 sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/api/BalanceApi.java create mode 100644 sdks/retailmedia_2023-10/docs/AccountsApi.md create mode 100644 sdks/retailmedia_2023-10/docs/BalanceApi.md create mode 100644 sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/api/AccountsApi.java create mode 100644 sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/api/BalanceApi.java create mode 100644 sdks/retailmedia_2024-01/docs/AccountsApi.md create mode 100644 sdks/retailmedia_2024-01/docs/BalanceApi.md create mode 100644 sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/api/AccountsApi.java create mode 100644 sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/api/BalanceApi.java create mode 100644 sdks/retailmedia_2024-04/docs/BalanceApi.md create mode 100644 sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/api/BalanceApi.java rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/.github/workflows/maven.yml (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/.gitignore (100%) create mode 100644 sdks/retailmedia_2024-07/.openapi-generator/FILES rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/.openapi-generator/VERSION (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/README.md (67%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/api/openapi.yaml (80%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/build.gradle (97%) rename sdks/{marketingsolutions_2023-04/docs/AudienceApi.md => retailmedia_2024-07/docs/AccountsApi.md} (53%) create mode 100644 sdks/retailmedia_2024-07/docs/AddFundsToBalanceRequest.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AddRemoveKeywordModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AddRemoveKeywordsModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AddRemoveKeywordsModelRequest.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AddRemoveKeywordsModelResource.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AddToBasketIdsUpdateModel202110Request.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AddToBasketTarget202110Request.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AddToBasketTarget202110Response.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AnalyticsApi.md (68%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ApplicationSummaryModel.md (75%) rename sdks/{marketingsolutions_2023-04 => retailmedia_2024-07}/docs/ApplicationSummaryModelResource.md (79%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ApplicationSummaryModelResponse.md (85%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ApprovalStatusModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/Asset.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AssetResource.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AssetResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AsyncCampaignsReport.md (97%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AsyncCampaignsReportRequest.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AsyncCampaignsReportResource.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AsyncLineItemsReport.md (97%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AsyncLineItemsReportRequest.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AsyncLineItemsReportResource.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AsyncReportResponse.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/AsyncRevenueReport.md create mode 100644 sdks/retailmedia_2024-07/docs/AsyncRevenueReportRequest.md create mode 100644 sdks/retailmedia_2024-07/docs/AsyncRevenueReportResource.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AuctionLineItemCreateModelRequest.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AuctionLineItemPagedListResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AuctionLineItemResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AuctionLineItemUpdateModelRequest.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AudienceApi.md (88%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AudienceIdsUpdateModel202110Request.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AudienceTarget202110Request.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/AudienceTarget202110Response.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/BalanceApi.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/BalanceCampaign202110ListRequest.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/BalanceCampaign202110PagedListResponse.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/BalanceHistoryChangeDataCaptureV1.md create mode 100644 sdks/retailmedia_2024-07/docs/BalanceResponse.md create mode 100644 sdks/retailmedia_2024-07/docs/BalanceResponsePagedListResponse.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/CampaignApi.md (84%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/CampaignAttributesV202301.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/CampaignBudgetOverrides.md create mode 100644 sdks/retailmedia_2024-07/docs/CampaignDailyBudgetOverride.md create mode 100644 sdks/retailmedia_2024-07/docs/CampaignMonthlyBudgetOverride.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/CampaignV202301.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/Category202204.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/Category202204ListResponse.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ChangeDatesOfBalanceRequest.md create mode 100644 sdks/retailmedia_2024-07/docs/ChangeDetailsV1.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ChoiceOption.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ChoiceVariableSpecification.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ChoiceVariableValue.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ColorVariableValue.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/CommonError.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/CommonLineItemPagedListResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/CommonLineItemResponse.md (100%) rename sdks/{marketingsolutions_2023-04 => retailmedia_2024-07}/docs/CommonProblem.md (89%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/CommonWarning.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/CreateBalanceRequest.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/Creative202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/Creative202110ListResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/Creative202210.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/Creative202210ListResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/Creative202210Response.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/CreativeCreateModel202207.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/CreativeUpdateModel202207.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/DailyLineItemBudgetOverride.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/EditableCampaignAttributesV202301.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalAccount.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ExternalAddFundsToBalance.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalAddToBasketIdsUpdateModel202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalAddToBasketTarget202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalAuctionLineItem.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalAuctionLineItemCreateModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalAuctionLineItemUpdateModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalAudienceIdsUpdateModel202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalAudienceTarget202110.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ExternalBalanceResponse.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalBrand.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalCatalogRequest.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalCatalogStatus.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ExternalChangeDatesOfBalance.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalCommonLineItem.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ExternalCreateBalance.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalKeywordTarget202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalLineItemCapping202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalLineItemPage202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalLineItemPageCategory202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalPreferredLineItem202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalPreferredLineItemCreateModel202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalPreferredLineItemUpdateModel202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalPromotedProduct202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalRetailer.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalRetailerPages202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalStoreIdsUpdateModel202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ExternalStoreTarget202110.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ExternalUpdateBalanceModel.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/FilesVariableValue.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/FilesVariablesSpecification.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/GatewayApi.md (85%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/HyperlinkVariableValue.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/InputKeywordsModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/InputResourceOfAuctionLineItemCreateModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/InputResourceOfPreferredLineItemCreateModel202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiBodyWithIdOfInt64AndAccountAndAccount.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiBodyWithIdOfInt64AndBrandAndBrand.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiPageResponseOfAccount.md (88%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiPageResponseOfBrand.md (88%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiPageResponseOfCampaignV202301.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiPageResponseOfRetailer.md (88%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiRequestOfCatalogRequest.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiSingleResponseOfCampaignV202301.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiSingleResponseOfCatalogStatus.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/JsonApiSingleResponseOfLineItemBidMultipliers.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/KeywordDataModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/KeywordTarget202110Request.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/KeywordTarget202110Response.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/KeywordsModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/KeywordsModelResource.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/KeywordsModelResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/LineItemBidMultipliers.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/LineItemBidMultipliersRequest.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/LineItemBidMultipliersResponse.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/LineItemBudgetOverrides.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/MatchTypeModel.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/Metadata.md create mode 100644 sdks/retailmedia_2024-07/docs/MonthlyLineItemBudegetOverride.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/NegotiationStateModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/PageMetadata.md (100%) rename sdks/{retailmedia_preview/docs/PageOfInsertionOrderHistoryChangeDataCapture.md => retailmedia_2024-07/docs/PageOfBalanceHistoryChangeDataCaptureV1.md} (58%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/PageTypeEnvironment.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/PostCampaignV202301.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/PreferredLineItem202110PagedListResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/PreferredLineItem202110Response.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/PreferredLineItemCreateModel202110Request.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/PreferredLineItemUpdateModel202110Request.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ProblemDetails.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/PromotedProduct202110ListRequest.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/PromotedProduct202110PagedListResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ProposalStatusModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ProposalStatusModelResource.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ProposalStatusModelResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/PutCampaignV202301.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ReportOutcome.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ResourceOfAddFundsToBalance.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ResourceOfAuctionLineItem.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ResourceOfAuctionLineItemUpdateModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ResourceOfBalanceCampaign202110.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ResourceOfBalanceResponse.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ResourceOfCategory202204.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ResourceOfChangeDatesOfBalance.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ResourceOfCommonLineItem.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ResourceOfCreateBalance.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ResourceOfCreative202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ResourceOfCreative202210.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ResourceOfLineItemBidMultipliers.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ResourceOfPreferredLineItem202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ResourceOfPreferredLineItemUpdateModel202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ResourceOfPromotedProduct202110.md (100%) rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/ResourceOfRetailMediaAccount.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ResourceOfTemplate.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ResourceOfUpdateBalanceModel.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ResourceOutcome.md (100%) rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/ResourceOutcomeOfRetailMediaAccount.md (100%) rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/RetailMediaAccount.md (100%) rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/RetailMediaBrandAccountCreation.md (100%) rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/RetailMediaBrands.md (100%) rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/RetailMediaSeller.md (100%) rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/RetailMediaSellerAccountCreation.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ReviewStateModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceCreateEntityV1.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceCreateEntityV1Resource.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceCreateEntityV1Response.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceCreateEntityV2.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceCreateEntityV2Resource.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceCreateEntityV2Response.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceCreateInputEntityV1.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceCreateInputEntityV2.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceGetEntityV1.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceGetEntityV1ListResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceGetEntityV1Resource.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceGetEntityV2.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceGetEntityV2ListResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceGetEntityV2Resource.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceUserBehaviorCreateV2.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacyAudienceUserBehaviorDetailsV2.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacySegmentCustomerList.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacySegmentUserBehaviorCreateV2.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacySegmentUserBehaviorV1.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmLegacySegmentUserBehaviorV2.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/RmcaCommonProblem.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/Section.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/SetBidModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/SetBidsModel.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/SetBidsModelRequest.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/SetBidsModelResource.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/StatusResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/StatusResponseResource.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/StoreIdsUpdateModel202110Request.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/StoreTarget202110Request.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/StoreTarget202110Response.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/Template.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/TemplateListResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/TemplateResponse.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/TemplateVariable.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/TemplateVariableValue.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/TextVariableSpecification.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/TextVariableValue.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/UpdateBalanceModelRequest.md rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/ValueResourceCollectionInputOfRetailMediaSeller.md (100%) rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/ValueResourceCollectionOutcomeOfRetailMediaSeller.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ValueResourceInputOfCampaignBudgetOverrides.md create mode 100644 sdks/retailmedia_2024-07/docs/ValueResourceInputOfLineItemBudgetOverrides.md rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/ValueResourceInputOfRetailMediaBrandAccountCreation.md (100%) rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/ValueResourceInputOfRetailMediaBrands.md (100%) rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/ValueResourceInputOfRetailMediaSellerAccountCreation.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ValueResourceOfCampaignBudgetOverrides.md create mode 100644 sdks/retailmedia_2024-07/docs/ValueResourceOfLineItemBudgetOverrides.md rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/ValueResourceOfRetailMediaBrandAccountCreation.md (100%) rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/ValueResourceOfRetailMediaBrands.md (100%) rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/ValueResourceOfRetailMediaSeller.md (100%) rename sdks/{retailmedia_preview => retailmedia_2024-07}/docs/ValueResourceOfRetailMediaSellerAccountCreation.md (100%) create mode 100644 sdks/retailmedia_2024-07/docs/ValueResourceOutcomeOfCampaignBudgetOverrides.md create mode 100644 sdks/retailmedia_2024-07/docs/ValueResourceOutcomeOfLineItemBudgetOverrides.md rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ValueTypeResourceOfAddToBasketTarget202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ValueTypeResourceOfAudienceIdsUpdateModel202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ValueTypeResourceOfAudienceTarget202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ValueTypeResourceOfKeywordTarget202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ValueTypeResourceOfStoreIdsUpdateModel202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/docs/ValueTypeResourceOfStoreTarget202110.md (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/gradle/wrapper/gradle-wrapper.jar (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/gradle/wrapper/gradle-wrapper.properties (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/gradlew (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/gradlew.bat (100%) rename sdks/{retailmedia_2023-04 => retailmedia_2024-07}/settings.gradle (100%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/ApiCallback.java (94%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/ApiClient.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/ApiClientBuilder.java (89%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/ApiException.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/ApiResponse.java (94%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/Configuration.java (91%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/GzipRequestInterceptor.java (96%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/JSON.java (60%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/Pair.java (91%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/ProgressRequestBody.java (94%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/ProgressResponseBody.java (95%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/ServerConfiguration.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/ServerVariable.java (94%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/StringUtil.java (95%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/AccountsApi.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/api/AnalyticsApi.java (77%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/api/AudienceApi.java (97%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/BalanceApi.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/api/CampaignApi.java (94%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/api/GatewayApi.java (90%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/auth/ApiKeyAuth.java (89%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/auth/Authentication.java (81%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/auth/HttpBasicAuth.java (86%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/auth/HttpBearerAuth.java (88%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/auth/OAuth.java (82%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/auth/OAuthFlow.java (84%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/auth/OAuthOkHttpClient.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/auth/RetryingOAuth.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AbstractOpenApiSchema.java (96%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddFundsToBalanceRequest.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AddRemoveKeywordModel.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AddRemoveKeywordsModel.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AddRemoveKeywordsModelRequest.java (96%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AddRemoveKeywordsModelResource.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AddToBasketIdsUpdateModel202110Request.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AddToBasketTarget202110Request.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AddToBasketTarget202110Response.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ApplicationSummaryModel.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ApplicationSummaryModelResource.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ApplicationSummaryModelResponse.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ApprovalStatusModel.java (94%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/Asset.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AssetResource.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AssetResponse.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AsyncCampaignsReport.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AsyncCampaignsReportRequest.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AsyncCampaignsReportResource.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AsyncLineItemsReport.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AsyncLineItemsReportRequest.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AsyncLineItemsReportResource.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AsyncReportResponse.java (97%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReport.java create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReportRequest.java create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReportResource.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AuctionLineItemCreateModelRequest.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AuctionLineItemPagedListResponse.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AuctionLineItemResponse.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AuctionLineItemUpdateModelRequest.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AudienceIdsUpdateModel202110Request.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AudienceTarget202110Request.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/AudienceTarget202110Response.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/BalanceCampaign202110ListRequest.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/BalanceCampaign202110PagedListResponse.java (97%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceHistoryChangeDataCaptureV1.java create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceResponse.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Balance202110PagedListResponse.java => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceResponsePagedListResponse.java} (75%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/CampaignAttributesV202301.java (99%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignBudgetOverrides.java create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignDailyBudgetOverride.java create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignMonthlyBudgetOverride.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/CampaignV202301.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/Category202204.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/Category202204ListResponse.java (97%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChangeDatesOfBalanceRequest.java create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChangeDetailsV1.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ChoiceOption.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ChoiceVariableSpecification.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ChoiceVariableValue.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ColorVariableValue.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/CommonError.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/CommonLineItemPagedListResponse.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/CommonLineItemResponse.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/CommonProblem.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/CommonWarning.java (99%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CreateBalanceRequest.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/Creative202110.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/Creative202110ListResponse.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/Creative202210.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/Creative202210ListResponse.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/Creative202210Response.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/CreativeCreateModel202207.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/CreativeUpdateModel202207.java (98%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/DailyLineItemBudgetOverride.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/EditableCampaignAttributesV202301.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalAccount.java (99%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAddFundsToBalance.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalAddToBasketIdsUpdateModel202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalAddToBasketTarget202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalAuctionLineItem.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalAuctionLineItemCreateModel.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalAuctionLineItemUpdateModel.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalAudienceIdsUpdateModel202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalAudienceTarget202110.java (98%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalBalanceResponse.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalBrand.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalCatalogRequest.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalCatalogStatus.java (99%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalChangeDatesOfBalance.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalCommonLineItem.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalBalance202110.java => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCreateBalance.java} (62%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalKeywordTarget202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalLineItemCapping202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalLineItemPage202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalLineItemPageCategory202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalPreferredLineItem202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalPreferredLineItemCreateModel202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalPreferredLineItemUpdateModel202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalPromotedProduct202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalRetailer.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalRetailerPages202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalStoreIdsUpdateModel202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ExternalStoreTarget202110.java (98%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalUpdateBalanceModel.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/FilesVariableValue.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/FilesVariablesSpecification.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/HyperlinkVariableValue.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/InputKeywordsModel.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/InputResourceOfAuctionLineItemCreateModel.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/InputResourceOfPreferredLineItemCreateModel202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiBodyWithIdOfInt64AndAccountAndAccount.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiBodyWithIdOfInt64AndBrandAndBrand.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiPageResponseOfAccount.java (95%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiPageResponseOfBrand.java (95%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiPageResponseOfCampaignV202301.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiPageResponseOfRetailer.java (95%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiRequestOfCatalogRequest.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiSingleResponseOfCampaignV202301.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiSingleResponseOfCatalogStatus.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/JsonApiSingleResponseOfLineItemBidMultipliers.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/KeywordDataModel.java (96%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/KeywordTarget202110Request.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/KeywordTarget202110Response.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/KeywordsModel.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/KeywordsModelResource.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/KeywordsModelResponse.java (96%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/LineItemBidMultipliers.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/LineItemBidMultipliersRequest.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/LineItemBidMultipliersResponse.java (97%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBudgetOverrides.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/MatchTypeModel.java (94%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Metadata.java create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/MonthlyLineItemBudegetOverride.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/NegotiationStateModel.java (94%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/PageMetadata.java (99%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PageOfBalanceHistoryChangeDataCaptureV1.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/PageTypeEnvironment.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/PostCampaignV202301.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/PreferredLineItem202110PagedListResponse.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/PreferredLineItem202110Response.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/PreferredLineItemCreateModel202110Request.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/PreferredLineItemUpdateModel202110Request.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ProblemDetails.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/PromotedProduct202110ListRequest.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/PromotedProduct202110PagedListResponse.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ProposalStatusModel.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ProposalStatusModelResource.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ProposalStatusModelResponse.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/PutCampaignV202301.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ReportOutcome.java (98%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfAddFundsToBalance.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOfAuctionLineItem.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOfAuctionLineItemUpdateModel.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOfBalanceCampaign202110.java (98%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfBalanceResponse.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOfCategory202204.java (98%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfChangeDatesOfBalance.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOfCommonLineItem.java (98%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCreateBalance.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOfCreative202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOfCreative202210.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOfLineItemBidMultipliers.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOfPreferredLineItem202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOfPreferredLineItemUpdateModel202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOfPromotedProduct202110.java (98%) rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOfRetailMediaAccount.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOfTemplate.java (98%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfUpdateBalanceModel.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOutcome.java (97%) rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ResourceOutcomeOfRetailMediaAccount.java (97%) rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RetailMediaAccount.java (99%) rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RetailMediaBrandAccountCreation.java (98%) rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RetailMediaBrands.java (97%) rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RetailMediaSeller.java (98%) rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RetailMediaSellerAccountCreation.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ReviewStateModel.java (94%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceCreateEntityV1.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceCreateEntityV1Resource.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceCreateEntityV1Response.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceCreateEntityV2.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceCreateEntityV2Resource.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceCreateEntityV2Response.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceCreateInputEntityV1.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceCreateInputEntityV2.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceGetEntityV1.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceGetEntityV1ListResponse.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceGetEntityV1Resource.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceGetEntityV2.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceGetEntityV2ListResponse.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceGetEntityV2Resource.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceUserBehaviorCreateV2.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacyAudienceUserBehaviorDetailsV2.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacySegmentCustomerList.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacySegmentUserBehaviorCreateV2.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacySegmentUserBehaviorV1.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmLegacySegmentUserBehaviorV2.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/RmcaCommonProblem.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/Section.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/SetBidModel.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/SetBidsModel.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/SetBidsModelRequest.java (96%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/SetBidsModelResource.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/StatusResponse.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/StatusResponseResource.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/StoreIdsUpdateModel202110Request.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/StoreTarget202110Request.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/StoreTarget202110Response.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/Template.java (99%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/TemplateListResponse.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/TemplateResponse.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/TemplateVariable.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/TemplateVariableValue.java (97%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/TextVariableSpecification.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/TextVariableValue.java (98%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/UpdateBalanceModelRequest.java rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueResourceCollectionInputOfRetailMediaSeller.java (97%) rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueResourceCollectionOutcomeOfRetailMediaSeller.java (97%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfCampaignBudgetOverrides.java create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfLineItemBudgetOverrides.java rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueResourceInputOfRetailMediaBrandAccountCreation.java (96%) rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueResourceInputOfRetailMediaBrands.java (96%) rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueResourceInputOfRetailMediaSellerAccountCreation.java (96%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfCampaignBudgetOverrides.java create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfLineItemBudgetOverrides.java rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueResourceOfRetailMediaBrandAccountCreation.java (97%) rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueResourceOfRetailMediaBrands.java (97%) rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueResourceOfRetailMediaSeller.java (97%) rename sdks/{retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueResourceOfRetailMediaSellerAccountCreation.java (97%) create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOutcomeOfCampaignBudgetOverrides.java create mode 100644 sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOutcomeOfLineItemBudgetOverrides.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueTypeResourceOfAddToBasketTarget202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueTypeResourceOfAudienceIdsUpdateModel202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueTypeResourceOfAudienceTarget202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueTypeResourceOfKeywordTarget202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueTypeResourceOfStoreIdsUpdateModel202110.java (98%) rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07}/model/ValueTypeResourceOfStoreTarget202110.java (98%) rename sdks/{retailmedia_2023-04/src/test/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/test/java/com/criteo/api/retailmedia/v2024_07}/ExampleApplication.java (82%) rename sdks/{retailmedia_2023-04/src/test/java/com/criteo/api/retailmedia/v2023_04 => retailmedia_2024-07/src/test/java/com/criteo/api/retailmedia/v2024_07}/GatewayApiTest.java (82%) create mode 100644 sdks/retailmedia_preview/docs/AddFundsToBalanceV2.md create mode 100644 sdks/retailmedia_preview/docs/AddFundsToBalanceV2Request.md create mode 100644 sdks/retailmedia_preview/docs/BalanceApi.md create mode 100644 sdks/retailmedia_preview/docs/BalanceHistoryChangeDataCaptureV1.md create mode 100644 sdks/retailmedia_preview/docs/BalanceResponseV2.md create mode 100644 sdks/retailmedia_preview/docs/BalanceResponseV2Response.md create mode 100644 sdks/retailmedia_preview/docs/ChangeDatesOfBalanceV2.md create mode 100644 sdks/retailmedia_preview/docs/ChangeDatesOfBalanceV2Request.md create mode 100644 sdks/retailmedia_preview/docs/ChangeDetailsV1.md rename sdks/retailmedia_preview/docs/{ChangeDetails.md => ChangeDetailsV2.md} (96%) create mode 100644 sdks/retailmedia_preview/docs/CreateBalanceV2.md create mode 100644 sdks/retailmedia_preview/docs/CreateBalanceV2Request.md create mode 100644 sdks/retailmedia_preview/docs/ExternalCatalogStatus.md rename sdks/retailmedia_preview/docs/{InsertionOrderHistoryChangeDataCapture.md => InsertionOrderHistoryChangeDataCaptureV2.md} (80%) create mode 100644 sdks/retailmedia_preview/docs/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md create mode 100644 sdks/retailmedia_preview/docs/JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.md create mode 100644 sdks/retailmedia_preview/docs/JsonApiRequestOfSellerCatalogRequest.md create mode 100644 sdks/retailmedia_preview/docs/JsonApiSingleResponseOfCatalogStatus.md create mode 100644 sdks/retailmedia_preview/docs/NillableString.md create mode 100644 sdks/retailmedia_preview/docs/PageOfBalanceHistoryChangeDataCaptureV1.md create mode 100644 sdks/retailmedia_preview/docs/PageOfInsertionOrderHistoryChangeDataCaptureV2.md create mode 100644 sdks/retailmedia_preview/docs/PagedResourceCollectionOutcomeOfBalanceResponseV2.md create mode 100644 sdks/retailmedia_preview/docs/ResourceOfAddFundsToBalanceV2.md create mode 100644 sdks/retailmedia_preview/docs/ResourceOfBalanceResponseV2.md create mode 100644 sdks/retailmedia_preview/docs/ResourceOfChangeDatesOfBalanceV2.md create mode 100644 sdks/retailmedia_preview/docs/ResourceOfCreateBalanceV2.md create mode 100644 sdks/retailmedia_preview/docs/ResourceOfUpdateBalanceModelV2.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentBulkCreateInputV1.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentBulkDeleteInputV1.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentBulkUpdateInputV1.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentCreateEntityV1.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentCreateEntityV1Resource.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentDeleteEntityV1Resource.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1ListResponse.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1Resource.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentIdEntityV1ListResponse.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentIdEntityV1Resource.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentSearchEntityV1.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentSearchEntityV1Resource.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentSearchInputV1.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentSearchMetadataV1.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentUpdateEntityV1.md create mode 100644 sdks/retailmedia_preview/docs/RmAudienceSegmentUpdateEntityV1Resource.md create mode 100644 sdks/retailmedia_preview/docs/RmContactListCreateV1.md create mode 100644 sdks/retailmedia_preview/docs/RmContactListStatisticsEntityV1.md create mode 100644 sdks/retailmedia_preview/docs/RmContactListStatisticsEntityV1Resource.md create mode 100644 sdks/retailmedia_preview/docs/RmContactListStatisticsEntityV1Response.md create mode 100644 sdks/retailmedia_preview/docs/RmContactListV1.md create mode 100644 sdks/retailmedia_preview/docs/SellerCatalogRequest.md create mode 100644 sdks/retailmedia_preview/docs/SellerIdentifier.md create mode 100644 sdks/retailmedia_preview/docs/UpdateBalanceModelV2.md create mode 100644 sdks/retailmedia_preview/docs/UpdateBalanceModelV2Request.md create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/BalanceApi.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AddFundsToBalanceV2.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AddFundsToBalanceV2Request.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/BalanceHistoryChangeDataCaptureV1.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/BalanceResponseV2.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/BalanceResponseV2Response.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDatesOfBalanceV2.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDatesOfBalanceV2Request.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDetailsV1.java rename sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/{ChangeDetails.java => ChangeDetailsV2.java} (80%) create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/CreateBalanceV2.java rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudienceRequest.java => retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/CreateBalanceV2Request.java} (74%) create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ExternalCatalogStatus.java rename sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/{InsertionOrderHistoryChangeDataCapture.java => InsertionOrderHistoryChangeDataCaptureV2.java} (81%) rename sdks/{marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/Audience.java => retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java} (68%) create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiRequestOfSellerCatalogRequest.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiSingleResponseOfCatalogStatus.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/NillableString.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PageOfBalanceHistoryChangeDataCaptureV1.java rename sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/{PageOfInsertionOrderHistoryChangeDataCapture.java => PageOfInsertionOrderHistoryChangeDataCaptureV2.java} (75%) create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PagedResourceCollectionOutcomeOfBalanceResponseV2.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfAddFundsToBalanceV2.java rename sdks/{retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfBalance202110.java => retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfBalanceResponseV2.java} (80%) create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfChangeDatesOfBalanceV2.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfCreateBalanceV2.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfUpdateBalanceModelV2.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkCreateInputV1.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkDeleteInputV1.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkUpdateInputV1.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentCreateEntityV1.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentCreateEntityV1Resource.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentDeleteEntityV1Resource.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1ListResponse.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1Resource.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentIdEntityV1ListResponse.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentIdEntityV1Resource.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchEntityV1.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchEntityV1Resource.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchInputV1.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchMetadataV1.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentUpdateEntityV1.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentUpdateEntityV1Resource.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListCreateV1.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1Resource.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1Response.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListV1.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SellerCatalogRequest.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SellerIdentifier.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/UpdateBalanceModelV2.java create mode 100644 sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/UpdateBalanceModelV2Request.java diff --git a/sdks/marketingsolutions_2023-04/.openapi-generator/FILES b/sdks/marketingsolutions_2023-04/.openapi-generator/FILES deleted file mode 100644 index 9fc986bf..00000000 --- a/sdks/marketingsolutions_2023-04/.openapi-generator/FILES +++ /dev/null @@ -1,258 +0,0 @@ -.github/workflows/maven.yml -.gitignore -.openapi-generator-ignore -.travis.yml -README.md -api/openapi.yaml -build.gradle -build.sbt -docs/AdSetCategoryBid.md -docs/AdSetCategoryBidListResponse.md -docs/AdSetCategoryBidResource.md -docs/AdSetDeliveryLimitations.md -docs/AdSetDisplayMultiplier.md -docs/AdSetDisplayMultiplierListResponse.md -docs/AdSetDisplayMultiplierResource.md -docs/AdSetFrequencyCapping.md -docs/AdSetGeoLocation.md -docs/AdSetSearchFilter.md -docs/AdSetTargeting.md -docs/AdSetTargetingRule.md -docs/AdvertiserApi.md -docs/AnalyticsApi.md -docs/ApplicationSummaryModel.md -docs/ApplicationSummaryModelResource.md -docs/ApplicationSummaryModelResponse.md -docs/Audience.md -docs/AudienceApi.md -docs/AudienceAttributes.md -docs/AudienceError.md -docs/AudienceNameDescription.md -docs/AudienceWarning.md -docs/BasicAudienceDefinition.md -docs/Campaign.md -docs/CampaignApi.md -docs/CampaignListResponse.md -docs/CampaignReadResource.md -docs/CampaignResponse.md -docs/CampaignSearchFilters.md -docs/CampaignSearchRequest.md -docs/CampaignSpendLimit.md -docs/CommonProblem.md -docs/ContactlistAmendment.md -docs/ContactlistAmendmentAttributes.md -docs/ContactlistAmendmentRequest.md -docs/ContactlistOperation.md -docs/ContactlistOperationAttributes.md -docs/CriteoApiError.md -docs/CriteoApiWarning.md -docs/DeleteAudienceContactListResponse.md -docs/DeleteAudienceResponse.md -docs/EntityOfPortfolioMessage.md -docs/ErrorCodeResponse.md -docs/GatewayApi.md -docs/GetAudiencesResponse.md -docs/GetPortfolioResponse.md -docs/ModifyAudienceResponse.md -docs/NewAudience.md -docs/NewAudienceAttributes.md -docs/NewAudienceRequest.md -docs/NewAudienceResponse.md -docs/NillableAdSetTargetingRule.md -docs/NillableAdSetTargetingRuleValue.md -docs/NillableDateTime.md -docs/NillableDecimal.md -docs/PatchAdSet.md -docs/PatchAdSetBidding.md -docs/PatchAdSetBudget.md -docs/PatchAdSetCategoryBid.md -docs/PatchAdSetCategoryBidListRequest.md -docs/PatchAdSetCategoryBidResource.md -docs/PatchAdSetCategoryBidResultListResponse.md -docs/PatchAdSetCategoryBidResultResource.md -docs/PatchAdSetDisplayMultiplier.md -docs/PatchAdSetDisplayMultiplierListRequest.md -docs/PatchAdSetDisplayMultiplierResource.md -docs/PatchAdSetDisplayMultiplierResultListResponse.md -docs/PatchAdSetDisplayMultiplierResultResource.md -docs/PatchAdSetScheduling.md -docs/PatchCampaign.md -docs/PatchCampaignListRequest.md -docs/PatchCampaignSpendLimit.md -docs/PatchCampaignWriteResource.md -docs/PatchResultCampaignListResponse.md -docs/PatchResultCampaignReadResource.md -docs/PlacementsReportQueryDataMessage.md -docs/PlacementsReportQueryEntityMessage.md -docs/PlacementsReportQueryMessage.md -docs/PortfolioMessage.md -docs/ProblemDetails.md -docs/ProblemsDetails.md -docs/ReadAdSet.md -docs/ReadAdSetBidding.md -docs/ReadAdSetBudget.md -docs/ReadAdSetSchedule.md -docs/ReadModelAdSetId.md -docs/ReadModelReadAdSet.md -docs/ReplaceAudience.md -docs/ReplaceAudienceRequest.md -docs/ReplaceAudienceResponse.md -docs/RequestAdSetSearch.md -docs/RequestsAdSetId.md -docs/RequestsPatchAdSet.md -docs/ResponseReadAdSet.md -docs/ResponsesAdSetId.md -docs/ResponsesReadAdSet.md -docs/StatisticsReportQueryMessage.md -docs/TransactionsReportQueryDataMessage.md -docs/TransactionsReportQueryEntityMessage.md -docs/TransactionsReportQueryMessage.md -docs/TransparencyQueryMessage.md -docs/TransparencyReportAttributes.md -docs/TransparencyReportDataMessage.md -docs/TransparencyReportEntityMessage.md -docs/TransparencyReportFile.md -docs/WriteModelAdSetId.md -docs/WriteModelPatchAdSet.md -git_push.sh -gradle.properties -gradle/wrapper/gradle-wrapper.jar -gradle/wrapper/gradle-wrapper.properties -gradlew -gradlew.bat -pom.xml -settings.gradle -src/main/AndroidManifest.xml -src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiCallback.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiClient.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiClientBuilder.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiException.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/Configuration.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/GzipRequestInterceptor.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/JSON.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/Pair.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/ProgressRequestBody.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/ProgressResponseBody.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/ServerConfiguration.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/ServerVariable.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/StringUtil.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/AdvertiserApi.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/AnalyticsApi.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/AudienceApi.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/CampaignApi.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/GatewayApi.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/ApiKeyAuth.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/Authentication.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/HttpBasicAuth.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/HttpBearerAuth.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/OAuth.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/OAuthFlow.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/OAuthOkHttpClient.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/RetryingOAuth.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AbstractOpenApiSchema.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetCategoryBid.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetCategoryBidListResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetCategoryBidResource.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDeliveryLimitations.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDisplayMultiplier.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDisplayMultiplierListResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDisplayMultiplierResource.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetFrequencyCapping.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetGeoLocation.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetSearchFilter.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetTargeting.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetTargetingRule.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ApplicationSummaryModel.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ApplicationSummaryModelResource.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ApplicationSummaryModelResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/Audience.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceAttributes.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceError.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceNameDescription.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceWarning.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/BasicAudienceDefinition.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/Campaign.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignListResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignReadResource.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSearchFilters.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSearchRequest.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSpendLimit.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CommonProblem.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistAmendment.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistAmendmentAttributes.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistAmendmentRequest.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistOperation.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistOperationAttributes.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CriteoApiError.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CriteoApiWarning.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/DeleteAudienceContactListResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/DeleteAudienceResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/EntityOfPortfolioMessage.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ErrorCodeResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/GetAudiencesResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/GetPortfolioResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ModifyAudienceResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudience.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceAttributes.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceRequest.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableAdSetTargetingRule.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableAdSetTargetingRuleValue.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableDateTime.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableDecimal.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSet.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetBidding.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetBudget.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBid.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidListRequest.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidResource.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidResultListResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidResultResource.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplier.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierListRequest.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierResource.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierResultListResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierResultResource.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetScheduling.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaign.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaignListRequest.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaignSpendLimit.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaignWriteResource.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchResultCampaignListResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchResultCampaignReadResource.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PlacementsReportQueryDataMessage.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PlacementsReportQueryEntityMessage.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PlacementsReportQueryMessage.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PortfolioMessage.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ProblemDetails.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ProblemsDetails.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSet.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetBidding.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetBudget.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetSchedule.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadModelAdSetId.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadModelReadAdSet.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudience.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudienceRequest.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudienceResponse.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestAdSetSearch.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestsAdSetId.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestsPatchAdSet.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponseReadAdSet.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponsesAdSetId.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponsesReadAdSet.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/StatisticsReportQueryMessage.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransactionsReportQueryDataMessage.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransactionsReportQueryEntityMessage.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransactionsReportQueryMessage.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyQueryMessage.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportAttributes.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportDataMessage.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportEntityMessage.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportFile.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/WriteModelAdSetId.java -src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/WriteModelPatchAdSet.java -src/test/java/com/criteo/api/marketingsolutions/v2023_04/ExampleApplication.java -src/test/java/com/criteo/api/marketingsolutions/v2023_04/GatewayApiTest.java diff --git a/sdks/marketingsolutions_2023-04/README.md b/sdks/marketingsolutions_2023-04/README.md deleted file mode 100644 index 8c71a26c..00000000 --- a/sdks/marketingsolutions_2023-04/README.md +++ /dev/null @@ -1,215 +0,0 @@ -# JAVA SDK for Criteo API marketingsolutions for 2023_04 version - -## Introduction -API Client Libraries can facilitate your use of the Criteo API allowing you to build unique and customized solutions to serve your businesses and clients. -These libraries can reduce the amount of code you need to write in order to start accessing Criteo programmatically. They also can help expedite troubleshooting, should you encounter any issues. - -More information: [https://developers.criteo.com/](https://developers.criteo.com/) - -Criteo API - -- Package version: 2023.04.0.240626 - - -*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* - -## Requirements - -Building the API client library requires: - -1. Java 1.8+ -2. Gradle - -## How to build - -To build the jar, simply execute: - -```shell -./gradlew jar -``` - -The built jar will be available in build/libs. - -### Maven users - -Add this dependency to your project's POM: - -```xml - - com.criteo - criteo-api-marketingsolutions-sdk - 2023.04.0.240626 - compile - -``` - -### Gradle users - -Add this dependency to your project's build file: - -```groovy -compile "com.criteo:criteo-api-marketingsolutions-sdk:2023.04.0.240626" -``` - -### Others - -At first generate the JAR by executing: - -```shell -./gradlew jar -``` - -Then manually install the following JARs: - -* `build/libs/criteo-api-marketingsolutions-sdk-2023.04.0.240626.jar` - -## Example - -Please see [src/test/java/com/criteo/api/marketingsolutions/v2023_04/ExampleApplication.java](src/test/java/com/criteo/api/marketingsolutions/v2023_04/ExampleApplication.java) for an example on how to perform a simple call. - -## Documentation for API Endpoints - -All URIs are relative to *https://api.criteo.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AdvertiserApi* | [**apiPortfolioGet**](docs/AdvertiserApi.md#apiPortfolioGet) | **GET** /2023-04/advertisers/me | -*AnalyticsApi* | [**getAdsetReport**](docs/AnalyticsApi.md#getAdsetReport) | **POST** /2023-04/statistics/report | -*AnalyticsApi* | [**getPlacementsReport**](docs/AnalyticsApi.md#getPlacementsReport) | **POST** /2023-04/placements/report | -*AnalyticsApi* | [**getTransactionsReport**](docs/AnalyticsApi.md#getTransactionsReport) | **POST** /2023-04/transactions/report | -*AnalyticsApi* | [**getTransparencyReport**](docs/AnalyticsApi.md#getTransparencyReport) | **POST** /2023-04/log-level/advertisers/{advertiser-id}/report | -*AudienceApi* | [**createAudience**](docs/AudienceApi.md#createAudience) | **POST** /2023-04/audiences | -*AudienceApi* | [**deleteIdentifiers**](docs/AudienceApi.md#deleteIdentifiers) | **DELETE** /2023-04/audiences/{audience-id}/contactlist | -*AudienceApi* | [**getAudiences**](docs/AudienceApi.md#getAudiences) | **GET** /2023-04/audiences | -*AudienceApi* | [**modifyAudience**](docs/AudienceApi.md#modifyAudience) | **PATCH** /2023-04/audiences/{audience-id} | -*AudienceApi* | [**modifyAudienceUsers**](docs/AudienceApi.md#modifyAudienceUsers) | **PATCH** /2023-04/audiences/{audience-id}/contactlist | -*AudienceApi* | [**removeAudience**](docs/AudienceApi.md#removeAudience) | **DELETE** /2023-04/audiences/{audience-id} | -*CampaignApi* | [**getAdSet**](docs/CampaignApi.md#getAdSet) | **GET** /2023-04/marketing-solutions/ad-sets/{adSetId} | -*CampaignApi* | [**getCampaign**](docs/CampaignApi.md#getCampaign) | **GET** /2023-04/marketing-solutions/campaigns/{campaign-id} | -*CampaignApi* | [**getCategoryBidList**](docs/CampaignApi.md#getCategoryBidList) | **GET** /2023-04/marketing-solutions/ad-sets/{ad-set-id}/category-bids | -*CampaignApi* | [**getDisplayMultipliers**](docs/CampaignApi.md#getDisplayMultipliers) | **GET** /2023-04/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers | -*CampaignApi* | [**patchAdSets**](docs/CampaignApi.md#patchAdSets) | **PATCH** /2023-04/marketing-solutions/ad-sets | -*CampaignApi* | [**patchCampaigns**](docs/CampaignApi.md#patchCampaigns) | **PATCH** /2023-04/marketing-solutions/campaigns | -*CampaignApi* | [**patchCategoryBidList**](docs/CampaignApi.md#patchCategoryBidList) | **PATCH** /2023-04/marketing-solutions/ad-sets/{ad-set-id}/category-bids | -*CampaignApi* | [**patchDisplayMultipliers**](docs/CampaignApi.md#patchDisplayMultipliers) | **PATCH** /2023-04/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers | -*CampaignApi* | [**searchAdSets**](docs/CampaignApi.md#searchAdSets) | **POST** /2023-04/marketing-solutions/ad-sets/search | -*CampaignApi* | [**searchCampaigns**](docs/CampaignApi.md#searchCampaigns) | **POST** /2023-04/marketing-solutions/campaigns/search | -*CampaignApi* | [**startAdSets**](docs/CampaignApi.md#startAdSets) | **POST** /2023-04/marketing-solutions/ad-sets/start | -*CampaignApi* | [**stopAdSets**](docs/CampaignApi.md#stopAdSets) | **POST** /2023-04/marketing-solutions/ad-sets/stop | -*GatewayApi* | [**getCurrentApplication**](docs/GatewayApi.md#getCurrentApplication) | **GET** /2023-04/marketing-solutions/me | - - -## Documentation for Models - - - [AdSetCategoryBid](docs/AdSetCategoryBid.md) - - [AdSetCategoryBidListResponse](docs/AdSetCategoryBidListResponse.md) - - [AdSetCategoryBidResource](docs/AdSetCategoryBidResource.md) - - [AdSetDeliveryLimitations](docs/AdSetDeliveryLimitations.md) - - [AdSetDisplayMultiplier](docs/AdSetDisplayMultiplier.md) - - [AdSetDisplayMultiplierListResponse](docs/AdSetDisplayMultiplierListResponse.md) - - [AdSetDisplayMultiplierResource](docs/AdSetDisplayMultiplierResource.md) - - [AdSetFrequencyCapping](docs/AdSetFrequencyCapping.md) - - [AdSetGeoLocation](docs/AdSetGeoLocation.md) - - [AdSetSearchFilter](docs/AdSetSearchFilter.md) - - [AdSetTargeting](docs/AdSetTargeting.md) - - [AdSetTargetingRule](docs/AdSetTargetingRule.md) - - [ApplicationSummaryModel](docs/ApplicationSummaryModel.md) - - [ApplicationSummaryModelResource](docs/ApplicationSummaryModelResource.md) - - [ApplicationSummaryModelResponse](docs/ApplicationSummaryModelResponse.md) - - [Audience](docs/Audience.md) - - [AudienceAttributes](docs/AudienceAttributes.md) - - [AudienceError](docs/AudienceError.md) - - [AudienceNameDescription](docs/AudienceNameDescription.md) - - [AudienceWarning](docs/AudienceWarning.md) - - [BasicAudienceDefinition](docs/BasicAudienceDefinition.md) - - [Campaign](docs/Campaign.md) - - [CampaignListResponse](docs/CampaignListResponse.md) - - [CampaignReadResource](docs/CampaignReadResource.md) - - [CampaignResponse](docs/CampaignResponse.md) - - [CampaignSearchFilters](docs/CampaignSearchFilters.md) - - [CampaignSearchRequest](docs/CampaignSearchRequest.md) - - [CampaignSpendLimit](docs/CampaignSpendLimit.md) - - [CommonProblem](docs/CommonProblem.md) - - [ContactlistAmendment](docs/ContactlistAmendment.md) - - [ContactlistAmendmentAttributes](docs/ContactlistAmendmentAttributes.md) - - [ContactlistAmendmentRequest](docs/ContactlistAmendmentRequest.md) - - [ContactlistOperation](docs/ContactlistOperation.md) - - [ContactlistOperationAttributes](docs/ContactlistOperationAttributes.md) - - [CriteoApiError](docs/CriteoApiError.md) - - [CriteoApiWarning](docs/CriteoApiWarning.md) - - [DeleteAudienceContactListResponse](docs/DeleteAudienceContactListResponse.md) - - [DeleteAudienceResponse](docs/DeleteAudienceResponse.md) - - [EntityOfPortfolioMessage](docs/EntityOfPortfolioMessage.md) - - [ErrorCodeResponse](docs/ErrorCodeResponse.md) - - [GetAudiencesResponse](docs/GetAudiencesResponse.md) - - [GetPortfolioResponse](docs/GetPortfolioResponse.md) - - [ModifyAudienceResponse](docs/ModifyAudienceResponse.md) - - [NewAudience](docs/NewAudience.md) - - [NewAudienceAttributes](docs/NewAudienceAttributes.md) - - [NewAudienceRequest](docs/NewAudienceRequest.md) - - [NewAudienceResponse](docs/NewAudienceResponse.md) - - [NillableAdSetTargetingRule](docs/NillableAdSetTargetingRule.md) - - [NillableAdSetTargetingRuleValue](docs/NillableAdSetTargetingRuleValue.md) - - [NillableDateTime](docs/NillableDateTime.md) - - [NillableDecimal](docs/NillableDecimal.md) - - [PatchAdSet](docs/PatchAdSet.md) - - [PatchAdSetBidding](docs/PatchAdSetBidding.md) - - [PatchAdSetBudget](docs/PatchAdSetBudget.md) - - [PatchAdSetCategoryBid](docs/PatchAdSetCategoryBid.md) - - [PatchAdSetCategoryBidListRequest](docs/PatchAdSetCategoryBidListRequest.md) - - [PatchAdSetCategoryBidResource](docs/PatchAdSetCategoryBidResource.md) - - [PatchAdSetCategoryBidResultListResponse](docs/PatchAdSetCategoryBidResultListResponse.md) - - [PatchAdSetCategoryBidResultResource](docs/PatchAdSetCategoryBidResultResource.md) - - [PatchAdSetDisplayMultiplier](docs/PatchAdSetDisplayMultiplier.md) - - [PatchAdSetDisplayMultiplierListRequest](docs/PatchAdSetDisplayMultiplierListRequest.md) - - [PatchAdSetDisplayMultiplierResource](docs/PatchAdSetDisplayMultiplierResource.md) - - [PatchAdSetDisplayMultiplierResultListResponse](docs/PatchAdSetDisplayMultiplierResultListResponse.md) - - [PatchAdSetDisplayMultiplierResultResource](docs/PatchAdSetDisplayMultiplierResultResource.md) - - [PatchAdSetScheduling](docs/PatchAdSetScheduling.md) - - [PatchCampaign](docs/PatchCampaign.md) - - [PatchCampaignListRequest](docs/PatchCampaignListRequest.md) - - [PatchCampaignSpendLimit](docs/PatchCampaignSpendLimit.md) - - [PatchCampaignWriteResource](docs/PatchCampaignWriteResource.md) - - [PatchResultCampaignListResponse](docs/PatchResultCampaignListResponse.md) - - [PatchResultCampaignReadResource](docs/PatchResultCampaignReadResource.md) - - [PlacementsReportQueryDataMessage](docs/PlacementsReportQueryDataMessage.md) - - [PlacementsReportQueryEntityMessage](docs/PlacementsReportQueryEntityMessage.md) - - [PlacementsReportQueryMessage](docs/PlacementsReportQueryMessage.md) - - [PortfolioMessage](docs/PortfolioMessage.md) - - [ProblemDetails](docs/ProblemDetails.md) - - [ProblemsDetails](docs/ProblemsDetails.md) - - [ReadAdSet](docs/ReadAdSet.md) - - [ReadAdSetBidding](docs/ReadAdSetBidding.md) - - [ReadAdSetBudget](docs/ReadAdSetBudget.md) - - [ReadAdSetSchedule](docs/ReadAdSetSchedule.md) - - [ReadModelAdSetId](docs/ReadModelAdSetId.md) - - [ReadModelReadAdSet](docs/ReadModelReadAdSet.md) - - [ReplaceAudience](docs/ReplaceAudience.md) - - [ReplaceAudienceRequest](docs/ReplaceAudienceRequest.md) - - [ReplaceAudienceResponse](docs/ReplaceAudienceResponse.md) - - [RequestAdSetSearch](docs/RequestAdSetSearch.md) - - [RequestsAdSetId](docs/RequestsAdSetId.md) - - [RequestsPatchAdSet](docs/RequestsPatchAdSet.md) - - [ResponseReadAdSet](docs/ResponseReadAdSet.md) - - [ResponsesAdSetId](docs/ResponsesAdSetId.md) - - [ResponsesReadAdSet](docs/ResponsesReadAdSet.md) - - [StatisticsReportQueryMessage](docs/StatisticsReportQueryMessage.md) - - [TransactionsReportQueryDataMessage](docs/TransactionsReportQueryDataMessage.md) - - [TransactionsReportQueryEntityMessage](docs/TransactionsReportQueryEntityMessage.md) - - [TransactionsReportQueryMessage](docs/TransactionsReportQueryMessage.md) - - [TransparencyQueryMessage](docs/TransparencyQueryMessage.md) - - [TransparencyReportAttributes](docs/TransparencyReportAttributes.md) - - [TransparencyReportDataMessage](docs/TransparencyReportDataMessage.md) - - [TransparencyReportEntityMessage](docs/TransparencyReportEntityMessage.md) - - [TransparencyReportFile](docs/TransparencyReportFile.md) - - [WriteModelAdSetId](docs/WriteModelAdSetId.md) - - [WriteModelPatchAdSet](docs/WriteModelPatchAdSet.md) - - -## Recommendation - -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. - -## Disclaimer - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/sdks/marketingsolutions_2023-04/api/openapi.yaml b/sdks/marketingsolutions_2023-04/api/openapi.yaml deleted file mode 100644 index 8f0f03e1..00000000 --- a/sdks/marketingsolutions_2023-04/api/openapi.yaml +++ /dev/null @@ -1,5599 +0,0 @@ -openapi: 3.0.1 -info: - description: Criteo API - MarketingSolutions - title: Criteo API - version: 2023-04 -servers: -- url: https://api.criteo.com -security: -- oauth: [] -paths: - /2023-04/audiences: - get: - description: Get a list of all the audiences for the user or for the given advertiser_id - operationId: getAudiences - parameters: - - description: |- - The advertiser id to get all the audiences for. - Mandatory for internal users. For external users, - if you don't provide it, we will take into account the advertisers from your portfolio - explode: true - in: query - name: advertiser-id - required: false - schema: - format: int32 - type: string - style: form - responses: - "200": - content: - application/json: - example: - data: - - type: AudienceContactlist - id: "1" - attributes: - advertiserId: "18" - name: Audience name - description: Audience - created: 2018-12-10T10:00:50.0000000+00:00 - updated: 2018-12-10T10:17:15.0000000+00:00 - nbLines: 100 - nbLinesEmail: 10 - nbMatchesEmail: 10 - errors: [] - warnings: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: deprecation - code: deprecated-field - instance: /audiences/314195 - title: '''nbValidIds'' is deprecated' - detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers - schema: - $ref: '#/components/schemas/GetAudiencesResponse' - description: The list was retrieved. - "403": - content: - application/json: - example: - errors: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: validation - code: audience-invalid - instance: /audience/314159 - title: Audience is invalid - detail: "Audience is not found, please choose a valid audience" - warnings: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: deprecation - code: deprecated-field - instance: /audiences/314195 - title: '''nbValidIds'' is deprecated' - detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers - schema: - $ref: '#/components/schemas/ErrorCodeResponse' - description: Forbidden - tags: - - Audience - x-accepts: application/json - post: - description: Create an Audience for an Advertiser - operationId: createAudience - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NewAudienceRequest' - required: true - x-bodyName: body - responses: - "200": - content: - application/json: - example: - data: - id: "1" - type: Audience - errors: [] - warnings: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: deprecation - code: deprecated-field - instance: /audiences/314195 - title: '''nbValidIds'' is deprecated' - detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers - schema: - $ref: '#/components/schemas/NewAudienceResponse' - description: The audience was created - "403": - content: - application/json: - example: - errors: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: validation - code: audience-invalid - instance: /audience/314159 - title: Audience is invalid - detail: "Audience is not found, please choose a valid audience" - warnings: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: deprecation - code: deprecated-field - instance: /audiences/314195 - title: '''nbValidIds'' is deprecated' - detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers - schema: - $ref: '#/components/schemas/ErrorCodeResponse' - description: Forbidden - tags: - - Audience - x-content-type: application/json - x-accepts: application/json - /2023-04/audiences/{audience-id}: - delete: - description: Delete an audience by id - operationId: removeAudience - parameters: - - description: The id of the audience to amend - explode: false - in: path - name: audience-id - required: true - schema: - format: int32 - type: string - style: simple - responses: - "200": - content: - application/json: - example: - data: - id: "1" - type: Audience - errors: [] - warnings: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: deprecation - code: deprecated-field - instance: /audiences/314195 - title: '''nbValidIds'' is deprecated' - detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers - schema: - $ref: '#/components/schemas/DeleteAudienceResponse' - description: The audience was deleted - "403": - content: - application/json: - example: - errors: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: validation - code: audience-invalid - instance: /audience/314159 - title: Audience is invalid - detail: "Audience is not found, please choose a valid audience" - warnings: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: deprecation - code: deprecated-field - instance: /audiences/314195 - title: '''nbValidIds'' is deprecated' - detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers - schema: - $ref: '#/components/schemas/ErrorCodeResponse' - description: Forbidden - tags: - - Audience - x-accepts: application/json - patch: - description: Update user audience specified by the audience id - operationId: modifyAudience - parameters: - - description: The id of the audience to amend - explode: false - in: path - name: audience-id - required: true - schema: - format: int32 - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ReplaceAudienceRequest' - required: true - x-bodyName: body - responses: - "200": - content: - application/json: - example: - data: - id: "1" - type: AudienceContactlist - attributes: - name: example audience - description: example audience description - errors: [] - warnings: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: deprecation - code: deprecated-field - instance: /audiences/314195 - title: '''nbValidIds'' is deprecated' - detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers - schema: - $ref: '#/components/schemas/ReplaceAudienceResponse' - description: The audience was updated - "403": - content: - application/json: - example: - errors: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: validation - code: audience-invalid - instance: /audience/314159 - title: Audience is invalid - detail: "Audience is not found, please choose a valid audience" - warnings: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: deprecation - code: deprecated-field - instance: /audiences/314195 - title: '''nbValidIds'' is deprecated' - detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers - schema: - $ref: '#/components/schemas/ErrorCodeResponse' - description: Forbidden - tags: - - Audience - x-content-type: application/json - x-accepts: application/json - /2023-04/audiences/{audience-id}/contactlist: - delete: - description: Delete all identifiers from a contact list audience-segment. - operationId: deleteIdentifiers - parameters: - - description: The id of the audience to amend - explode: false - in: path - name: audience-id - required: true - schema: - format: int32 - type: string - style: simple - responses: - "200": - content: - application/json: - example: - data: - id: "1" - type: AudienceContactlist - errors: [] - warnings: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: deprecation - code: deprecated-field - instance: /audiences/314195 - title: '''nbValidIds'' is deprecated' - detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers - schema: - $ref: '#/components/schemas/DeleteAudienceContactListResponse' - description: The contactlist was deleted - "403": - content: - application/json: - example: - errors: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: validation - code: audience-invalid - instance: /audience/314159 - title: Audience is invalid - detail: "Audience is not found, please choose a valid audience" - warnings: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: deprecation - code: deprecated-field - instance: /audiences/314195 - title: '''nbValidIds'' is deprecated' - detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers - schema: - $ref: '#/components/schemas/ErrorCodeResponse' - description: Forbidden - tags: - - Audience - x-accepts: application/json - patch: - description: Add/remove users to or from a contact list audience-segment. - operationId: modifyAudienceUsers - parameters: - - description: The id of the audience to amend - explode: false - in: path - name: audience-id - required: true - schema: - format: int32 - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ContactlistAmendmentRequest' - required: true - x-bodyName: body - responses: - "200": - content: - application/json: - example: - data: - type: ContactlistAmendment - attributes: - contactListId: 12 - operation: add - requestDate: 2018-12-10T10:00:50.0000000+00:00 - identifierType: madid - nbValidIdentifiers: 7343 - nbInvalidIdentifiers: 13 - sampleInvalidIdentifiers: - - InvalidIdentifier - errors: [] - warnings: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: deprecation - code: deprecated-field - instance: /audiences/314195 - title: '''nbValidIds'' is deprecated' - detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers - schema: - $ref: '#/components/schemas/ModifyAudienceResponse' - description: Summary of created request - "403": - content: - application/json: - example: - errors: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: validation - code: audience-invalid - instance: /audience/314159 - title: Audience is invalid - detail: "Audience is not found, please choose a valid audience" - warnings: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: deprecation - code: deprecated-field - instance: /audiences/314195 - title: '''nbValidIds'' is deprecated' - detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers - schema: - $ref: '#/components/schemas/ErrorCodeResponse' - description: Forbidden - "404": - content: - application/json: - example: - errors: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: validation - code: audience-invalid - instance: /audience/314159 - title: Audience is invalid - detail: "Audience is not found, please choose a valid audience" - warnings: - - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 - type: deprecation - code: deprecated-field - instance: /audiences/314195 - title: '''nbValidIds'' is deprecated' - detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers - schema: - $ref: '#/components/schemas/ErrorCodeResponse' - description: Audience 123 not found - tags: - - Audience - x-content-type: application/json - x-accepts: application/json - /2023-04/marketing-solutions/me: - get: - description: Get information about the currently logged application - operationId: GetCurrentApplication - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ApplicationSummaryModelResponse' - description: Success - "404": - content: - application/json: {} - description: Not Found - tags: - - Gateway - x-accepts: application/json - /2023-04/marketing-solutions/ad-sets: - patch: - description: Patch a list of AdSets. - operationId: PatchAdSets - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/RequestsPatchAdSet' - application/json: - schema: - $ref: '#/components/schemas/RequestsPatchAdSet' - text/json: - schema: - $ref: '#/components/schemas/RequestsPatchAdSet' - application/*+json: - schema: - $ref: '#/components/schemas/RequestsPatchAdSet' - description: List of adsets to patch. - x-bodyName: adSets - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/ResponsesAdSetId' - application/json: - schema: - $ref: '#/components/schemas/ResponsesAdSetId' - text/json: - schema: - $ref: '#/components/schemas/ResponsesAdSetId' - description: List of patched adSets. - "401": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not properly authenticated. - "403": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not authorized to access this resource or - the resource does not exist. - tags: - - Campaign - x-content-type: application/json-patch+json - x-accepts: application/json - /2023-04/marketing-solutions/ad-sets/search: - post: - deprecated: true - description: Search for ad sets - operationId: SearchAdSets - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/RequestAdSetSearch' - application/json: - schema: - $ref: '#/components/schemas/RequestAdSetSearch' - text/json: - schema: - $ref: '#/components/schemas/RequestAdSetSearch' - application/*+json: - schema: - $ref: '#/components/schemas/RequestAdSetSearch' - x-bodyName: request - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/ResponsesReadAdSet' - application/json: - schema: - $ref: '#/components/schemas/ResponsesReadAdSet' - text/json: - schema: - $ref: '#/components/schemas/ResponsesReadAdSet' - description: data for the ad sets - "400": - content: - text/plain: {} - application/json: {} - text/json: {} - description: Bad Request - "403": - content: - text/plain: {} - application/json: {} - text/json: {} - description: Forbidden - "401": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not properly authenticated. - tags: - - Campaign - x-content-type: application/json-patch+json - x-accepts: application/json - /2023-04/marketing-solutions/ad-sets/start: - post: - description: Start the specified list of ad sets - operationId: StartAdSets - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/RequestsAdSetId' - application/json: - schema: - $ref: '#/components/schemas/RequestsAdSetId' - text/json: - schema: - $ref: '#/components/schemas/RequestsAdSetId' - application/*+json: - schema: - $ref: '#/components/schemas/RequestsAdSetId' - description: All the ad sets to start - x-bodyName: adSets - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/ResponsesAdSetId' - application/json: - schema: - $ref: '#/components/schemas/ResponsesAdSetId' - text/json: - schema: - $ref: '#/components/schemas/ResponsesAdSetId' - description: List of ad sets that have been started and errors / warnings - by ad set - "400": - content: - text/plain: {} - application/json: {} - text/json: {} - description: Bad Request - "401": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not properly authenticated. - tags: - - Campaign - x-content-type: application/json-patch+json - x-accepts: application/json - /2023-04/marketing-solutions/ad-sets/stop: - post: - description: Stop the specified list of ad sets - operationId: StopAdSets - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/RequestsAdSetId' - application/json: - schema: - $ref: '#/components/schemas/RequestsAdSetId' - text/json: - schema: - $ref: '#/components/schemas/RequestsAdSetId' - application/*+json: - schema: - $ref: '#/components/schemas/RequestsAdSetId' - description: All the ad sets to stop - x-bodyName: adSets - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/ResponsesAdSetId' - application/json: - schema: - $ref: '#/components/schemas/ResponsesAdSetId' - text/json: - schema: - $ref: '#/components/schemas/ResponsesAdSetId' - description: List of ad sets that have been stopped and errors / warnings - by ad set - "400": - content: - text/plain: {} - application/json: {} - text/json: {} - description: Bad Request - "401": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not properly authenticated. - tags: - - Campaign - x-content-type: application/json-patch+json - x-accepts: application/json - /2023-04/marketing-solutions/ad-sets/{ad-set-id}/category-bids: - get: - description: Get the Category Bids for all valid Categories associated to an - Ad Set - operationId: GetCategoryBidList - parameters: - - description: Id of the Ad Set - explode: false - in: path - name: ad-set-id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/AdSetCategoryBidListResponse' - application/json: - schema: - $ref: '#/components/schemas/AdSetCategoryBidListResponse' - text/json: - schema: - $ref: '#/components/schemas/AdSetCategoryBidListResponse' - description: List of Category Bids for all valid Categories associated to - an Ad Set. - "401": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not properly authenticated. - "400": - content: - text/plain: {} - application/json: {} - text/json: {} - description: Bad Request - "403": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not authorized to access this resource or - the resource does not exist. - tags: - - Campaign - x-accepts: application/json - patch: - description: Patch Category Bids for one or more Categories in a single request. - Partial success policy is followed. - operationId: PatchCategoryBidList - parameters: - - description: Id of the Ad Set - explode: false - in: path - name: ad-set-id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/PatchAdSetCategoryBidListRequest' - application/json: - schema: - $ref: '#/components/schemas/PatchAdSetCategoryBidListRequest' - text/json: - schema: - $ref: '#/components/schemas/PatchAdSetCategoryBidListRequest' - application/*+json: - schema: - $ref: '#/components/schemas/PatchAdSetCategoryBidListRequest' - x-bodyName: categoryBidsToUpdate - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PatchAdSetCategoryBidResultListResponse' - application/json: - schema: - $ref: '#/components/schemas/PatchAdSetCategoryBidResultListResponse' - text/json: - schema: - $ref: '#/components/schemas/PatchAdSetCategoryBidResultListResponse' - description: List of updated Category Bids for given Categories associated - to an Ad Set. - "401": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not properly authenticated. - "400": - content: - text/plain: {} - application/json: {} - text/json: {} - description: Bad Request - "403": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not authorized to access this resource or - the resource does not exist. - tags: - - Campaign - x-content-type: application/json-patch+json - x-accepts: application/json - /2023-04/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers: - get: - description: Get the Display Multipliers for all valid Categories associated - to an Ad Set - operationId: GetDisplayMultipliers - parameters: - - description: Id of the Ad Set - explode: false - in: path - name: ad-set-id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/AdSetDisplayMultiplierListResponse' - application/json: - schema: - $ref: '#/components/schemas/AdSetDisplayMultiplierListResponse' - text/json: - schema: - $ref: '#/components/schemas/AdSetDisplayMultiplierListResponse' - description: List of Display Multipliers for all valid Categories associated - to an Ad Set. - "401": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not properly authenticated. - "400": - content: - text/plain: {} - application/json: {} - text/json: {} - description: Bad Request - "403": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not authorized to access this resource or - the resource does not exist. - tags: - - Campaign - x-accepts: application/json - patch: - description: Patch Display Multipliers for one or more Categories in a single - request. Partial success policy is followed. - operationId: PatchDisplayMultipliers - parameters: - - description: Id of the Ad Set - explode: false - in: path - name: ad-set-id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/PatchAdSetDisplayMultiplierListRequest' - application/json: - schema: - $ref: '#/components/schemas/PatchAdSetDisplayMultiplierListRequest' - text/json: - schema: - $ref: '#/components/schemas/PatchAdSetDisplayMultiplierListRequest' - application/*+json: - schema: - $ref: '#/components/schemas/PatchAdSetDisplayMultiplierListRequest' - x-bodyName: displayMultipliersToUpdate - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PatchAdSetDisplayMultiplierResultListResponse' - application/json: - schema: - $ref: '#/components/schemas/PatchAdSetDisplayMultiplierResultListResponse' - text/json: - schema: - $ref: '#/components/schemas/PatchAdSetDisplayMultiplierResultListResponse' - description: List of updated Display Multipliers for given Categories associated - to an Ad Set. - "401": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not properly authenticated. - "400": - content: - text/plain: {} - application/json: {} - text/json: {} - description: Bad Request - "403": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not authorized to access this resource or - the resource does not exist. - tags: - - Campaign - x-content-type: application/json-patch+json - x-accepts: application/json - /2023-04/marketing-solutions/ad-sets/{adSetId}: - get: - deprecated: true - description: Get the data for the specified ad set - operationId: GetAdSet - parameters: - - description: Id of the ad set - explode: false - in: path - name: adSetId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/ResponseReadAdSet' - application/json: - schema: - $ref: '#/components/schemas/ResponseReadAdSet' - text/json: - schema: - $ref: '#/components/schemas/ResponseReadAdSet' - description: data for the ad set - "401": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not properly authenticated. - "403": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not authorized to access this resource or - the resource does not exist. - tags: - - Campaign - x-accepts: application/json - /2023-04/marketing-solutions/campaigns: - patch: - description: Patch a list of Campaigns. - operationId: PatchCampaigns - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/PatchCampaignListRequest' - application/json: - schema: - $ref: '#/components/schemas/PatchCampaignListRequest' - text/json: - schema: - $ref: '#/components/schemas/PatchCampaignListRequest' - application/*+json: - schema: - $ref: '#/components/schemas/PatchCampaignListRequest' - description: List of campaigns to patch. - x-bodyName: request - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/PatchResultCampaignListResponse' - application/json: - schema: - $ref: '#/components/schemas/PatchResultCampaignListResponse' - text/json: - schema: - $ref: '#/components/schemas/PatchResultCampaignListResponse' - description: List of patched campaigns. - "401": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not properly authenticated. - "403": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not authorized to access this resource or - the resource does not exist. - tags: - - Campaign - x-content-type: application/json-patch+json - x-accepts: application/json - /2023-04/marketing-solutions/campaigns/search: - post: - deprecated: true - description: Search for campaigns - operationId: SearchCampaigns - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/CampaignSearchRequest' - application/json: - schema: - $ref: '#/components/schemas/CampaignSearchRequest' - text/json: - schema: - $ref: '#/components/schemas/CampaignSearchRequest' - application/*+json: - schema: - $ref: '#/components/schemas/CampaignSearchRequest' - description: filters on campaigns - x-bodyName: request - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/CampaignListResponse' - application/json: - schema: - $ref: '#/components/schemas/CampaignListResponse' - text/json: - schema: - $ref: '#/components/schemas/CampaignListResponse' - description: data for the campaigns - "400": - content: - text/plain: {} - application/json: {} - text/json: {} - description: Bad Request - "403": - content: - text/plain: {} - application/json: {} - text/json: {} - description: Forbidden - "401": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not properly authenticated. - tags: - - Campaign - x-content-type: application/json-patch+json - x-accepts: application/json - /2023-04/marketing-solutions/campaigns/{campaign-id}: - get: - deprecated: true - description: Get the data for the specified campaign - operationId: GetCampaign - parameters: - - description: Id of the campaign - explode: false - in: path - name: campaign-id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - text/plain: - schema: - $ref: '#/components/schemas/CampaignResponse' - application/json: - schema: - $ref: '#/components/schemas/CampaignResponse' - text/json: - schema: - $ref: '#/components/schemas/CampaignResponse' - description: data for the campaign - "401": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not properly authenticated. - "403": - content: - text/plain: {} - application/json: {} - text/json: {} - description: The API client is not authorized to access this resource or - the resource does not exist. - tags: - - Campaign - x-accepts: application/json - /2023-04/log-level/advertisers/{advertiser-id}/report: - post: - description: This Statistics endpoint provides publisher data. - operationId: GetTransparencyReport - parameters: - - description: The advertiser id to fetch the transparency data. - explode: false - in: path - name: advertiser-id - required: true - schema: - format: int32 - type: integer - style: simple - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/TransparencyQueryMessage' - application/json: - schema: - $ref: '#/components/schemas/TransparencyQueryMessage' - text/json: - schema: - $ref: '#/components/schemas/TransparencyQueryMessage' - application/*+json: - schema: - $ref: '#/components/schemas/TransparencyQueryMessage' - x-bodyName: queryMessage - responses: - "200": - content: - application/json: - example: - data: - - type: TransparencyReport - attributes: - advertiserId: "123" - tokenValidUntil: 2021-01-31T00:00:00.0000000+00:00 - files: - - fileName: report.csv - url: https://www.example.com/transparency - schema: - $ref: '#/components/schemas/TransparencyReportDataMessage' - text/plain: - schema: - $ref: '#/components/schemas/TransparencyReportDataMessage' - text/json: - schema: - $ref: '#/components/schemas/TransparencyReportDataMessage' - description: Success - "400": - content: - application/json: - example: - errors: - - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 - traceIdentifier: 1234e1717d88aa8a - type: validation - code: required-field - instance: /report - title: Start date and end date are required. - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/plain: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/json: - schema: - $ref: '#/components/schemas/ProblemsDetails' - description: Bad Request - "403": - content: - application/json: - example: - errors: - - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 - traceIdentifier: 1234e1717d88aa8a - type: access-control - code: insufficient-advertiser-permission - instance: /report - title: Insufficient advertiser permission. - detail: You do not have the rights to report on this advertiser. - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/plain: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/json: - schema: - $ref: '#/components/schemas/ProblemsDetails' - description: Forbidden - tags: - - Analytics - x-content-type: application/json-patch+json - x-accepts: application/json - /2023-04/placements/report: - post: - description: "Your ads are placed in different domains (publishers) and environments\ - \ (websites and apps). Thanks to the placements endpoint, you can analyse\ - \ the performances for each publisher, comparing displays, clicks and sales\ - \ generated." - operationId: GetPlacementsReport - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/PlacementsReportQueryDataMessage' - application/json: - schema: - $ref: '#/components/schemas/PlacementsReportQueryDataMessage' - text/json: - schema: - $ref: '#/components/schemas/PlacementsReportQueryDataMessage' - application/*+json: - schema: - $ref: '#/components/schemas/PlacementsReportQueryDataMessage' - x-bodyName: dataMessage - responses: - "200": - content: - text/plain: - schema: - format: binary - type: string - application/json: - schema: - format: binary - type: string - text/json: - schema: - format: binary - type: string - text/csv: - schema: - format: binary - type: string - text/xml: - schema: - format: binary - type: string - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: - schema: - format: binary - type: string - description: Success - "400": - content: - application/json: - example: - errors: - - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 - traceIdentifier: 1234e1717d88aa8a - type: validation - code: required-field - instance: /report - title: Start date and end date are required. - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/plain: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/json: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/csv: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/xml: - schema: - $ref: '#/components/schemas/ProblemsDetails' - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: - schema: - $ref: '#/components/schemas/ProblemsDetails' - description: Bad Request - "403": - content: - application/json: - example: - errors: - - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 - traceIdentifier: 1234e1717d88aa8a - type: access-control - code: insufficient-advertiser-permission - instance: /report - title: Insufficient advertiser permission. - detail: You do not have the rights to report on this advertiser. - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/plain: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/json: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/csv: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/xml: - schema: - $ref: '#/components/schemas/ProblemsDetails' - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: - schema: - $ref: '#/components/schemas/ProblemsDetails' - description: Forbidden - tags: - - Analytics - x-content-type: application/json-patch+json - x-accepts: application/json - /2023-04/statistics/report: - post: - description: "This Statistics endpoint provides adset related data. It is an\ - \ upgrade of our previous Statistics endpoint, and includes new metrics and\ - \ customization capabilities." - operationId: GetAdsetReport - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/StatisticsReportQueryMessage' - application/json: - schema: - $ref: '#/components/schemas/StatisticsReportQueryMessage' - text/json: - schema: - $ref: '#/components/schemas/StatisticsReportQueryMessage' - application/*+json: - schema: - $ref: '#/components/schemas/StatisticsReportQueryMessage' - x-bodyName: reportQuery - responses: - "200": - content: - text/plain: - schema: - format: binary - type: string - application/json: - schema: - format: binary - type: string - text/json: - schema: - format: binary - type: string - text/csv: - schema: - format: binary - type: string - text/xml: - schema: - format: binary - type: string - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: - schema: - format: binary - type: string - description: Success - "400": - content: - application/json: - example: - errors: - - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 - traceIdentifier: 1234e1717d88aa8a - type: validation - code: required-field - instance: /report - title: Start date and end date are required. - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/plain: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/json: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/csv: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/xml: - schema: - $ref: '#/components/schemas/ProblemsDetails' - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: - schema: - $ref: '#/components/schemas/ProblemsDetails' - description: Bad Request - "403": - content: - application/json: - example: - errors: - - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 - traceIdentifier: 1234e1717d88aa8a - type: access-control - code: insufficient-advertiser-permission - instance: /report - title: Insufficient advertiser permission. - detail: You do not have the rights to report on this advertiser. - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/plain: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/json: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/csv: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/xml: - schema: - $ref: '#/components/schemas/ProblemsDetails' - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: - schema: - $ref: '#/components/schemas/ProblemsDetails' - description: Forbidden - tags: - - Analytics - x-content-type: application/json-patch+json - x-accepts: application/json - /2023-04/transactions/report: - post: - description: This Transactions endpoint provides transactions id related data. - operationId: GetTransactionsReport - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/TransactionsReportQueryDataMessage' - application/json: - schema: - $ref: '#/components/schemas/TransactionsReportQueryDataMessage' - text/json: - schema: - $ref: '#/components/schemas/TransactionsReportQueryDataMessage' - application/*+json: - schema: - $ref: '#/components/schemas/TransactionsReportQueryDataMessage' - x-bodyName: dataMessage - responses: - "200": - content: - text/plain: - schema: - format: binary - type: string - application/json: - schema: - format: binary - type: string - text/json: - schema: - format: binary - type: string - text/csv: - schema: - format: binary - type: string - text/xml: - schema: - format: binary - type: string - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: - schema: - format: binary - type: string - description: Success - "400": - content: - application/json: - example: - errors: - - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 - traceIdentifier: 1234e1717d88aa8a - type: validation - code: required-field - instance: /report - title: Start date and end date are required. - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/plain: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/json: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/csv: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/xml: - schema: - $ref: '#/components/schemas/ProblemsDetails' - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: - schema: - $ref: '#/components/schemas/ProblemsDetails' - description: Bad Request - "403": - content: - application/json: - example: - errors: - - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 - traceIdentifier: 1234e1717d88aa8a - type: access-control - code: insufficient-advertiser-permission - instance: /report - title: Insufficient advertiser permission. - detail: You do not have the rights to report on this advertiser. - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/plain: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/json: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/csv: - schema: - $ref: '#/components/schemas/ProblemsDetails' - text/xml: - schema: - $ref: '#/components/schemas/ProblemsDetails' - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: - schema: - $ref: '#/components/schemas/ProblemsDetails' - description: Forbidden - tags: - - Analytics - x-content-type: application/json-patch+json - x-accepts: application/json - /2023-04/advertisers/me: - get: - description: Fetch the portfolio of Advertisers for this account - operationId: ApiPortfolioGet - responses: - "200": - content: - application/json: - example: - data: - - type: advertiser - id: "13" - attributes: - advertiserName: ClientName1 - - type: advertiser - id: "1352" - attributes: - advertiserName: ClientName2 - - type: advertiser - id: "73550" - attributes: - advertiserName: ClientName3 - errors: [] - warnings: [] - schema: - $ref: '#/components/schemas/GetPortfolioResponse' - text/plain: - schema: - $ref: '#/components/schemas/GetPortfolioResponse' - text/json: - schema: - $ref: '#/components/schemas/GetPortfolioResponse' - description: Success - "401": - content: - text/plain: - schema: - $ref: '#/components/schemas/GetPortfolioResponse' - application/json: - schema: - $ref: '#/components/schemas/GetPortfolioResponse' - text/json: - schema: - $ref: '#/components/schemas/GetPortfolioResponse' - description: Unauthorized - tags: - - Advertiser - x-accepts: application/json -components: - schemas: - GetAudiencesResponse: - description: Body of the GET audience operation - example: - data: - - attributes: - nbLinesEmail: 6 - nbLines: 0 - created: 2000-01-23T04:56:07.000+00:00 - name: name - description: description - nbMatchesEmail: 1 - updated: 2000-01-23T04:56:07.000+00:00 - advertiserId: advertiserId - id: "314159" - type: Audience - - attributes: - nbLinesEmail: 6 - nbLines: 0 - created: 2000-01-23T04:56:07.000+00:00 - name: name - description: description - nbMatchesEmail: 1 - updated: 2000-01-23T04:56:07.000+00:00 - advertiserId: advertiserId - id: "314159" - type: Audience - warnings: - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - errors: - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - properties: - data: - items: - $ref: '#/components/schemas/Audience' - type: array - errors: - items: - $ref: '#/components/schemas/AudienceError' - type: array - warnings: - items: - $ref: '#/components/schemas/AudienceWarning' - type: array - required: - - data - - errors - - warnings - type: object - ErrorCodeResponse: - description: Definition of the error code - properties: - errors: - items: - $ref: '#/components/schemas/AudienceError' - type: array - warnings: - items: - $ref: '#/components/schemas/AudienceWarning' - nullable: true - type: array - required: - - errors - type: object - NewAudienceResponse: - description: Response of a newly created audience - example: - data: - attributes: - name: name - description: description - id: id - type: type - warnings: - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - errors: - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - properties: - data: - $ref: '#/components/schemas/BasicAudienceDefinition' - errors: - items: - $ref: '#/components/schemas/AudienceError' - type: array - warnings: - items: - $ref: '#/components/schemas/AudienceWarning' - type: array - required: - - data - - errors - - warnings - type: object - DeleteAudienceResponse: - description: Response of an audience deletion - example: - data: - attributes: - name: name - description: description - id: id - type: type - warnings: - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - errors: - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - properties: - data: - $ref: '#/components/schemas/BasicAudienceDefinition' - errors: - items: - $ref: '#/components/schemas/AudienceError' - type: array - warnings: - items: - $ref: '#/components/schemas/AudienceWarning' - type: array - required: - - data - - errors - - warnings - type: object - ReplaceAudienceResponse: - description: Response of an audience replacement - example: - data: - attributes: - name: name - description: description - id: id - type: type - warnings: - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - errors: - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - properties: - data: - $ref: '#/components/schemas/BasicAudienceDefinition' - errors: - items: - $ref: '#/components/schemas/AudienceError' - type: array - warnings: - items: - $ref: '#/components/schemas/AudienceWarning' - type: array - required: - - data - - errors - - warnings - type: object - DeleteAudienceContactListResponse: - description: Response of a contactlist deletion - example: - data: - attributes: - name: name - description: description - id: id - type: type - warnings: - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - errors: - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - properties: - data: - $ref: '#/components/schemas/BasicAudienceDefinition' - errors: - items: - $ref: '#/components/schemas/AudienceError' - type: array - warnings: - items: - $ref: '#/components/schemas/AudienceWarning' - type: array - required: - - data - - errors - - warnings - type: object - ModifyAudienceResponse: - description: Parameters to modify an audience - example: - data: - attributes: - nbValidIdentifiers: 6 - nbInvalidIdentifiers: 1 - sampleInvalidIdentifiers: - - sampleInvalidIdentifiers - - sampleInvalidIdentifiers - contactListId: 0 - requestDate: 2000-01-23T04:56:07.000+00:00 - identifierType: identifierType - operation: operation - type: type - warnings: - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - errors: - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - properties: - data: - $ref: '#/components/schemas/ContactlistOperation' - errors: - items: - $ref: '#/components/schemas/AudienceError' - type: array - warnings: - items: - $ref: '#/components/schemas/AudienceWarning' - type: array - required: - - data - - errors - - warnings - type: object - NewAudienceRequest: - description: Body of creation of a new audience - example: - data: - attributes: - name: name - description: description - advertiserId: advertiserId - type: Audience - properties: - data: - $ref: '#/components/schemas/NewAudience' - type: object - ReplaceAudienceRequest: - description: Request to replace an audience - example: - data: - attributes: - name: name - description: description - type: Audience - properties: - data: - $ref: '#/components/schemas/ReplaceAudience' - required: - - data - type: object - ContactlistAmendmentRequest: - description: Request for a contactlist amendment - example: - data: - attributes: - gumCallerId: 0 - identifiers: - - identifiers - - identifiers - identifierType: email - operation: add - type: ContactlistAmendment - properties: - data: - $ref: '#/components/schemas/ContactlistAmendment' - required: - - data - type: object - Audience: - description: Definition of an audience and all its information - example: - attributes: - nbLinesEmail: 6 - nbLines: 0 - created: 2000-01-23T04:56:07.000+00:00 - name: name - description: description - nbMatchesEmail: 1 - updated: 2000-01-23T04:56:07.000+00:00 - advertiserId: advertiserId - id: "314159" - type: Audience - properties: - type: - description: the name of the entity type - example: Audience - type: string - id: - description: id of the Audience - example: "314159" - type: string - attributes: - $ref: '#/components/schemas/Audience_attributes' - required: - - attributes - - id - - type - type: object - AudienceError: - description: Definition of an audience error - example: - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - properties: - traceId: - description: (REQUIRED) The Correlation ID provided by the Gateway. It is - also a unique identifier for this particular occurrence of the problem. - nullable: true - type: string - type: - description: (REQUIRED) The classification of the error - enum: - - access-control - - authentication - - authorization - - availability - - deprecation - - quota - - validation - type: string - code: - description: "(REQUIRED) A machine-readable unique error code, expressed\ - \ as a string value. The format used must be kebab-case." - type: string - instance: - description: (REQUIRED) A URI reference that identifies the specific occurrence - of the problem - type: string - title: - description: "(RECOMMENDED) A short, human-readable summary of the problem\ - \ type" - nullable: true - type: string - detail: - description: (RECOMMENDED) A human-readable explanation specific to this - occurrence of the problem - nullable: true - type: string - source: - description: (OPTIONAL) A machine-readable structure to reference to the - exact location(s) causing the error(s) - nullable: true - type: object - stackTrace: - description: (NEVER IN PRODUCTION) A human-readable stacktrace produced - by the implementation technology - items: - type: string - nullable: true - type: array - required: - - code - - instance - - type - type: object - AudienceWarning: - description: Definition of the warning - example: - traceId: traceId - code: code - instance: instance - detail: detail - source: "{}" - stackTrace: - - stackTrace - - stackTrace - type: access-control - title: title - properties: - traceId: - description: (REQUIRED) The Correlation ID provided by the Gateway. It is - also a unique identifier for this particular occurrence of the problem. - nullable: true - type: string - type: - description: (REQUIRED) The classification of the error - enum: - - access-control - - authentication - - authorization - - availability - - deprecation - - quota - - validation - type: string - code: - description: "(REQUIRED) A machine-readable unique error code, expressed\ - \ as a string value. The format used must be kebab-case." - type: string - instance: - description: (REQUIRED) A URI reference that identifies the specific occurrence - of the problem - type: string - title: - description: "(RECOMMENDED) A short, human-readable summary of the problem\ - \ type" - nullable: true - type: string - detail: - description: (REQUIRED) A human-readable explanation specific to this occurrence - of the problem - type: string - source: - description: (OPTIONAL) A machine-readable structure to reference to the - exact location(s) causing the error(s) - nullable: true - type: object - stackTrace: - description: (NEVER IN PRODUCTION) A human-readable stacktrace produced - by the implementation technology - items: - type: string - nullable: true - type: array - required: - - code - - detail - - instance - - type - type: object - BasicAudienceDefinition: - description: Common definition of an audience - example: - attributes: - name: name - description: description - id: id - type: type - properties: - id: - description: the id of the entity type - type: string - type: - description: the name of the entity type - type: string - attributes: - $ref: '#/components/schemas/AudienceNameDescription' - required: - - id - - type - type: object - ContactlistOperation: - description: Response definition of a contactlist operation - example: - attributes: - nbValidIdentifiers: 6 - nbInvalidIdentifiers: 1 - sampleInvalidIdentifiers: - - sampleInvalidIdentifiers - - sampleInvalidIdentifiers - contactListId: 0 - requestDate: 2000-01-23T04:56:07.000+00:00 - identifierType: identifierType - operation: operation - type: type - properties: - type: - description: the name of the entity type - type: string - attributes: - $ref: '#/components/schemas/ContactlistOperation_attributes' - required: - - attributes - - type - type: object - NewAudience: - description: "Body for the creation of a new audience (name, advertiserId, etc)" - example: - attributes: - name: name - description: description - advertiserId: advertiserId - type: Audience - properties: - type: - description: the name of the entity type - example: Audience - type: string - attributes: - $ref: '#/components/schemas/NewAudience_attributes' - required: - - attributes - - type - type: object - ReplaceAudience: - description: Parameters required to replace an audience - example: - attributes: - name: name - description: description - type: Audience - properties: - type: - description: the name of the entity type - example: Audience - type: string - attributes: - $ref: '#/components/schemas/AudienceNameDescription' - required: - - attributes - - type - type: object - ContactlistAmendment: - description: Parameters for the amendment of a contactlist - example: - attributes: - gumCallerId: 0 - identifiers: - - identifiers - - identifiers - identifierType: email - operation: add - type: ContactlistAmendment - properties: - type: - description: User List - example: ContactlistAmendment - type: string - attributes: - $ref: '#/components/schemas/ContactlistAmendment_attributes' - required: - - attributes - - type - type: object - AudienceNameDescription: - description: Description of an audience with name and detailed description - example: - name: name - description: description - properties: - name: - description: The name to designate the audience by - nullable: true - type: string - description: - description: The description of the audience - nullable: true - type: string - type: object - ApplicationSummaryModelResponse: - description: Response of ApplicationSummaryModel - example: - data: - attributes: - organizationId: 6 - name: name - description: description - criteoService: criteoService - applicationId: 0 - type: type - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - data: - $ref: '#/components/schemas/ApplicationSummaryModelResource' - warnings: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - uniqueItems: false - errors: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - uniqueItems: false - type: object - ApplicationSummaryModelResource: - description: A class that represents a ValueType in a guild compliant way - example: - attributes: - organizationId: 6 - name: name - description: description - criteoService: criteoService - applicationId: 0 - type: type - properties: - type: - nullable: true - type: string - attributes: - $ref: '#/components/schemas/ApplicationSummaryModel' - type: object - CommonProblem: - description: Common problem object. Can be specialized as needed. - example: - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - traceId: - description: The request correlation ID this problem comes from. - nullable: true - type: string - traceIdentifier: - description: "The request correlation ID this problem comes from. (deprecated,\ - \ use traceId instead)" - nullable: true - type: string - type: - description: The problem's category. - enum: - - unknown - - access-control - - authentication - - authorization - - availability - - deprecation - - quota - - validation - nullable: true - type: string - code: - description: "A machine-readable error code, expressed as a string value." - nullable: true - type: string - instance: - description: A URI that identifies the specific occurrence of the problem. - nullable: true - type: string - title: - description: A short human-readable description of the problem type - nullable: true - type: string - detail: - description: A human-readable explanation specific to this occurrence of - the problem - nullable: true - type: string - source: - additionalProperties: - type: string - description: A machine-readable structure to reference to the exact location(s) - causing the error(s) - nullable: true - type: object - stackTrace: - nullable: true - type: string - type: object - ApplicationSummaryModel: - description: Model of ApplicationSummary - example: - organizationId: 6 - name: name - description: description - criteoService: criteoService - applicationId: 0 - properties: - applicationId: - format: int32 - nullable: true - type: integer - name: - nullable: true - type: string - organizationId: - format: int32 - nullable: true - type: integer - description: - nullable: true - type: string - criteoService: - nullable: true - type: string - type: object - ResponsesAdSetId: - description: List of output resources - example: - data: - - id: id - type: AdSetId - - id: id - type: AdSetId - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - data: - items: - $ref: '#/components/schemas/ReadModelAdSetId' - nullable: true - readOnly: true - type: array - x-nullable: true - warnings: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - errors: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - type: object - ResponsesReadAdSet: - description: List of output resources - example: - data: - - attributes: - schedule: - endDate: - value: 2000-01-23T04:56:07.000+00:00 - activationStatus: "on" - startDate: - value: 2000-01-23T04:56:07.000+00:00 - deliveryStatus: draft - targeting: - geoLocation: - zipCodes: - value: null - countries: - value: null - subdivisions: - value: null - frequencyCapping: - maximumImpressions: 6 - frequency: hourly - deliveryLimitations: - operatingSystems: - - android - - android - environments: - - web - - web - devices: - - other - - other - bidding: - bidStrategy: actions - bidAmount: - value: 0.8008281904610115 - costController: COS - campaignId: campaignId - name: name - datasetId: datasetId - mediaType: display - destinationEnvironment: undefined - advertiserId: advertiserId - budget: - budgetDeliverySmoothing: accelerated - budgetDeliveryWeek: undefined - budgetAmount: - value: 0.8008281904610115 - budgetRenewal: undefined - budgetStrategy: capped - id: id - type: ReadAdSet - - attributes: - schedule: - endDate: - value: 2000-01-23T04:56:07.000+00:00 - activationStatus: "on" - startDate: - value: 2000-01-23T04:56:07.000+00:00 - deliveryStatus: draft - targeting: - geoLocation: - zipCodes: - value: null - countries: - value: null - subdivisions: - value: null - frequencyCapping: - maximumImpressions: 6 - frequency: hourly - deliveryLimitations: - operatingSystems: - - android - - android - environments: - - web - - web - devices: - - other - - other - bidding: - bidStrategy: actions - bidAmount: - value: 0.8008281904610115 - costController: COS - campaignId: campaignId - name: name - datasetId: datasetId - mediaType: display - destinationEnvironment: undefined - advertiserId: advertiserId - budget: - budgetDeliverySmoothing: accelerated - budgetDeliveryWeek: undefined - budgetAmount: - value: 0.8008281904610115 - budgetRenewal: undefined - budgetStrategy: capped - id: id - type: ReadAdSet - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - data: - items: - $ref: '#/components/schemas/ReadModelReadAdSet' - nullable: true - readOnly: true - type: array - x-nullable: true - warnings: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - errors: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - type: object - AdSetCategoryBidListResponse: - description: Data model for a list of response resources - example: - data: - - attributes: - bidAmount: 0.8008281904610115 - categoryName: categoryName - id: id - type: AdSetCategoryBid - - attributes: - bidAmount: 0.8008281904610115 - categoryName: categoryName - id: id - type: AdSetCategoryBid - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - data: - items: - $ref: '#/components/schemas/AdSetCategoryBidResource' - nullable: true - type: array - x-nullable: true - warnings: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - errors: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - type: object - PatchAdSetCategoryBidResultListResponse: - description: Data model for a list of response resources - example: - data: - - id: id - type: AdSetCategoryBid - - id: id - type: AdSetCategoryBid - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - data: - items: - $ref: '#/components/schemas/PatchAdSetCategoryBidResultResource' - nullable: true - type: array - x-nullable: true - warnings: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - errors: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - type: object - AdSetDisplayMultiplierListResponse: - description: Data model for a list of response resources - example: - data: - - attributes: - displayMultiplier: 0.8008281904610115 - categoryName: categoryName - id: id - type: AdSetDisplayMultiplier - - attributes: - displayMultiplier: 0.8008281904610115 - categoryName: categoryName - id: id - type: AdSetDisplayMultiplier - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - data: - items: - $ref: '#/components/schemas/AdSetDisplayMultiplierResource' - nullable: true - type: array - x-nullable: true - warnings: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - errors: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - type: object - PatchAdSetDisplayMultiplierResultListResponse: - description: Data model for a list of response resources - example: - data: - - id: id - type: AdSetDisplayMultiplier - - id: id - type: AdSetDisplayMultiplier - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - data: - items: - $ref: '#/components/schemas/PatchAdSetDisplayMultiplierResultResource' - nullable: true - type: array - x-nullable: true - warnings: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - errors: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - type: object - ResponseReadAdSet: - description: output resource - example: - data: - attributes: - schedule: - endDate: - value: 2000-01-23T04:56:07.000+00:00 - activationStatus: "on" - startDate: - value: 2000-01-23T04:56:07.000+00:00 - deliveryStatus: draft - targeting: - geoLocation: - zipCodes: - value: null - countries: - value: null - subdivisions: - value: null - frequencyCapping: - maximumImpressions: 6 - frequency: hourly - deliveryLimitations: - operatingSystems: - - android - - android - environments: - - web - - web - devices: - - other - - other - bidding: - bidStrategy: actions - bidAmount: - value: 0.8008281904610115 - costController: COS - campaignId: campaignId - name: name - datasetId: datasetId - mediaType: display - destinationEnvironment: undefined - advertiserId: advertiserId - budget: - budgetDeliverySmoothing: accelerated - budgetDeliveryWeek: undefined - budgetAmount: - value: 0.8008281904610115 - budgetRenewal: undefined - budgetStrategy: capped - id: id - type: ReadAdSet - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - data: - $ref: '#/components/schemas/ReadModelReadAdSet' - warnings: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - errors: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - type: object - PatchResultCampaignListResponse: - description: List of output resources - example: - data: - - id: id - type: Campaign - - id: id - type: Campaign - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - data: - items: - $ref: '#/components/schemas/PatchResultCampaignReadResource' - nullable: true - readOnly: true - type: array - x-nullable: true - warnings: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - errors: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - type: object - CampaignListResponse: - description: List of output resources - example: - data: - - attributes: - goal: Unspecified - name: name - spendLimit: - spendLimitRenewal: undefined - spendLimitAmount: - value: 0.8008281904610115 - spendLimitType: capped - advertiserId: advertiserId - objective: objective - id: id - type: Campaign - - attributes: - goal: Unspecified - name: name - spendLimit: - spendLimitRenewal: undefined - spendLimitAmount: - value: 0.8008281904610115 - spendLimitType: capped - advertiserId: advertiserId - objective: objective - id: id - type: Campaign - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - data: - items: - $ref: '#/components/schemas/CampaignReadResource' - nullable: true - readOnly: true - type: array - x-nullable: true - warnings: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - errors: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - type: object - CampaignResponse: - description: output resource - example: - data: - attributes: - goal: Unspecified - name: name - spendLimit: - spendLimitRenewal: undefined - spendLimitAmount: - value: 0.8008281904610115 - spendLimitType: capped - advertiserId: advertiserId - objective: objective - id: id - type: Campaign - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - data: - $ref: '#/components/schemas/CampaignReadResource' - warnings: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - errors: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - x-nullable: true - type: object - RequestsPatchAdSet: - description: List of input resources - example: - data: - - attributes: - targeting: - geoLocation: - zipCodes: - value: null - countries: - value: null - subdivisions: - value: null - frequencyCapping: - maximumImpressions: 6 - frequency: hourly - deliveryLimitations: - operatingSystems: - - android - - android - environments: - - web - - web - devices: - - other - - other - bidding: - bidAmount: - value: 0.8008281904610115 - name: name - scheduling: - endDate: - value: 2000-01-23T04:56:07.000+00:00 - startDate: - value: 2000-01-23T04:56:07.000+00:00 - budget: - budgetDeliverySmoothing: accelerated - budgetDeliveryWeek: undefined - budgetAmount: - value: 0.8008281904610115 - budgetRenewal: undefined - budgetStrategy: capped - id: id - type: PatchAdSet - - attributes: - targeting: - geoLocation: - zipCodes: - value: null - countries: - value: null - subdivisions: - value: null - frequencyCapping: - maximumImpressions: 6 - frequency: hourly - deliveryLimitations: - operatingSystems: - - android - - android - environments: - - web - - web - devices: - - other - - other - bidding: - bidAmount: - value: 0.8008281904610115 - name: name - scheduling: - endDate: - value: 2000-01-23T04:56:07.000+00:00 - startDate: - value: 2000-01-23T04:56:07.000+00:00 - budget: - budgetDeliverySmoothing: accelerated - budgetDeliveryWeek: undefined - budgetAmount: - value: 0.8008281904610115 - budgetRenewal: undefined - budgetStrategy: capped - id: id - type: PatchAdSet - properties: - data: - items: - $ref: '#/components/schemas/WriteModelPatchAdSet' - nullable: true - type: array - x-nullable: true - type: object - RequestAdSetSearch: - description: request payload of the search endpoint - example: - filters: - adSetIds: - - adSetIds - - adSetIds - advertiserIds: - - advertiserIds - - advertiserIds - campaignIds: - - campaignIds - - campaignIds - properties: - filters: - $ref: '#/components/schemas/AdSetSearchFilter' - type: object - RequestsAdSetId: - description: List of input resources - example: - data: - - id: id - type: AdSetId - - id: id - type: AdSetId - properties: - data: - items: - $ref: '#/components/schemas/WriteModelAdSetId' - nullable: true - type: array - x-nullable: true - type: object - PatchAdSetCategoryBidListRequest: - description: Data model for a list of input resources - example: - data: - - attributes: - bidAmount: 0.8008281904610115 - id: id - type: AdSetCategoryBid - - attributes: - bidAmount: 0.8008281904610115 - id: id - type: AdSetCategoryBid - properties: - data: - items: - $ref: '#/components/schemas/PatchAdSetCategoryBidResource' - nullable: true - type: array - x-nullable: true - type: object - PatchAdSetDisplayMultiplierListRequest: - description: Data model for a list of input resources - example: - data: - - attributes: - displayMultiplier: 0.8008281904610115 - id: id - type: AdSetDisplayMultiplier - - attributes: - displayMultiplier: 0.8008281904610115 - id: id - type: AdSetDisplayMultiplier - properties: - data: - items: - $ref: '#/components/schemas/PatchAdSetDisplayMultiplierResource' - nullable: true - type: array - x-nullable: true - type: object - PatchCampaignListRequest: - description: List of input resources - example: - data: - - attributes: - spendLimit: - spendLimitRenewal: undefined - spendLimitAmount: - value: 0.8008281904610115 - spendLimitType: capped - id: id - type: Campaign - - attributes: - spendLimit: - spendLimitRenewal: undefined - spendLimitAmount: - value: 0.8008281904610115 - spendLimitType: capped - id: id - type: Campaign - properties: - data: - items: - $ref: '#/components/schemas/PatchCampaignWriteResource' - nullable: true - type: array - x-nullable: true - type: object - CampaignSearchRequest: - description: request payload of the search endpoint - example: - filters: - advertiserIds: - - advertiserIds - - advertiserIds - campaignIds: - - campaignIds - - campaignIds - properties: - filters: - $ref: '#/components/schemas/CampaignSearchFilters' - type: object - ReadModelAdSetId: - description: read model data for resources - example: - id: id - type: AdSetId - properties: - id: - description: Id of the entity - nullable: true - readOnly: true - type: string - x-nullable: true - type: - example: AdSetId - nullable: true - readOnly: true - type: string - x-nullable: true - type: object - ReadModelReadAdSet: - description: read model data for resources - example: - attributes: - schedule: - endDate: - value: 2000-01-23T04:56:07.000+00:00 - activationStatus: "on" - startDate: - value: 2000-01-23T04:56:07.000+00:00 - deliveryStatus: draft - targeting: - geoLocation: - zipCodes: - value: null - countries: - value: null - subdivisions: - value: null - frequencyCapping: - maximumImpressions: 6 - frequency: hourly - deliveryLimitations: - operatingSystems: - - android - - android - environments: - - web - - web - devices: - - other - - other - bidding: - bidStrategy: actions - bidAmount: - value: 0.8008281904610115 - costController: COS - campaignId: campaignId - name: name - datasetId: datasetId - mediaType: display - destinationEnvironment: undefined - advertiserId: advertiserId - budget: - budgetDeliverySmoothing: accelerated - budgetDeliveryWeek: undefined - budgetAmount: - value: 0.8008281904610115 - budgetRenewal: undefined - budgetStrategy: capped - id: id - type: ReadAdSet - properties: - id: - description: Id of the entity - nullable: true - readOnly: true - type: string - x-nullable: true - type: - example: ReadAdSet - nullable: true - readOnly: true - type: string - x-nullable: true - attributes: - $ref: '#/components/schemas/ReadAdSet' - type: object - AdSetCategoryBidResource: - description: Data model for a Resource - example: - attributes: - bidAmount: 0.8008281904610115 - categoryName: categoryName - id: id - type: AdSetCategoryBid - properties: - attributes: - $ref: '#/components/schemas/AdSetCategoryBid' - id: - description: Id of the entity - nullable: true - type: string - type: - description: Canonical type name of the entity - example: AdSetCategoryBid - nullable: true - type: string - type: object - PatchAdSetCategoryBidResultResource: - description: Data model for a Resource - example: - id: id - type: AdSetCategoryBid - properties: - id: - description: Id of the entity - nullable: true - type: string - type: - description: Canonical type name of the entity - example: AdSetCategoryBid - nullable: true - type: string - type: object - AdSetDisplayMultiplierResource: - description: Data model for a Resource - example: - attributes: - displayMultiplier: 0.8008281904610115 - categoryName: categoryName - id: id - type: AdSetDisplayMultiplier - properties: - attributes: - $ref: '#/components/schemas/AdSetDisplayMultiplier' - id: - description: Id of the entity - nullable: true - type: string - type: - description: Canonical type name of the entity - example: AdSetDisplayMultiplier - nullable: true - type: string - type: object - PatchAdSetDisplayMultiplierResultResource: - description: Data model for a Resource - example: - id: id - type: AdSetDisplayMultiplier - properties: - id: - description: Id of the entity - nullable: true - type: string - type: - description: Canonical type name of the entity - example: AdSetDisplayMultiplier - nullable: true - type: string - type: object - PatchResultCampaignReadResource: - description: read model data for resources - example: - id: id - type: Campaign - properties: - id: - description: Id of the entity - nullable: true - readOnly: true - type: string - x-nullable: true - type: - example: Campaign - nullable: true - readOnly: true - type: string - x-nullable: true - type: object - CampaignReadResource: - description: read model data for resources - example: - attributes: - goal: Unspecified - name: name - spendLimit: - spendLimitRenewal: undefined - spendLimitAmount: - value: 0.8008281904610115 - spendLimitType: capped - advertiserId: advertiserId - objective: objective - id: id - type: Campaign - properties: - id: - description: Id of the entity - nullable: true - readOnly: true - type: string - x-nullable: true - type: - example: Campaign - nullable: true - readOnly: true - type: string - x-nullable: true - attributes: - $ref: '#/components/schemas/Campaign' - type: object - WriteModelPatchAdSet: - description: write model data for resources - example: - attributes: - targeting: - geoLocation: - zipCodes: - value: null - countries: - value: null - subdivisions: - value: null - frequencyCapping: - maximumImpressions: 6 - frequency: hourly - deliveryLimitations: - operatingSystems: - - android - - android - environments: - - web - - web - devices: - - other - - other - bidding: - bidAmount: - value: 0.8008281904610115 - name: name - scheduling: - endDate: - value: 2000-01-23T04:56:07.000+00:00 - startDate: - value: 2000-01-23T04:56:07.000+00:00 - budget: - budgetDeliverySmoothing: accelerated - budgetDeliveryWeek: undefined - budgetAmount: - value: 0.8008281904610115 - budgetRenewal: undefined - budgetStrategy: capped - id: id - type: PatchAdSet - properties: - id: - description: Id of the entity - nullable: true - type: string - x-nullable: true - type: - description: Canonical type name of the entity - example: PatchAdSet - nullable: true - type: string - x-nullable: true - attributes: - $ref: '#/components/schemas/PatchAdSet' - type: object - AdSetSearchFilter: - description: filter on ad set ids - example: - adSetIds: - - adSetIds - - adSetIds - advertiserIds: - - advertiserIds - - advertiserIds - campaignIds: - - campaignIds - - campaignIds - properties: - adSetIds: - items: - type: string - nullable: true - type: array - x-nullable: true - advertiserIds: - items: - type: string - nullable: true - type: array - x-nullable: true - campaignIds: - items: - type: string - nullable: true - type: array - x-nullable: true - type: object - WriteModelAdSetId: - description: write model data for resources - example: - id: id - type: AdSetId - properties: - id: - description: Id of the entity - nullable: true - type: string - x-nullable: true - type: - description: Canonical type name of the entity - example: AdSetId - nullable: true - type: string - x-nullable: true - type: object - PatchAdSetCategoryBidResource: - description: Data model for a Resource - example: - attributes: - bidAmount: 0.8008281904610115 - id: id - type: AdSetCategoryBid - properties: - attributes: - $ref: '#/components/schemas/PatchAdSetCategoryBid' - id: - description: Id of the entity - nullable: true - type: string - type: - description: Canonical type name of the entity - example: AdSetCategoryBid - nullable: true - type: string - type: object - PatchAdSetDisplayMultiplierResource: - description: Data model for a Resource - example: - attributes: - displayMultiplier: 0.8008281904610115 - id: id - type: AdSetDisplayMultiplier - properties: - attributes: - $ref: '#/components/schemas/PatchAdSetDisplayMultiplier' - id: - description: Id of the entity - nullable: true - type: string - type: - description: Canonical type name of the entity - example: AdSetDisplayMultiplier - nullable: true - type: string - type: object - PatchCampaignWriteResource: - description: write model data for resources - example: - attributes: - spendLimit: - spendLimitRenewal: undefined - spendLimitAmount: - value: 0.8008281904610115 - spendLimitType: capped - id: id - type: Campaign - properties: - id: - description: Id of the entity - nullable: true - type: string - x-nullable: true - type: - description: Canonical type name of the entity - example: Campaign - nullable: true - type: string - x-nullable: true - attributes: - $ref: '#/components/schemas/PatchCampaign' - type: object - CampaignSearchFilters: - description: filters on campaign - example: - advertiserIds: - - advertiserIds - - advertiserIds - campaignIds: - - campaignIds - - campaignIds - properties: - campaignIds: - items: - type: string - nullable: true - type: array - x-nullable: true - advertiserIds: - items: - type: string - nullable: true - type: array - x-nullable: true - type: object - ReadAdSet: - description: ad set read model - example: - schedule: - endDate: - value: 2000-01-23T04:56:07.000+00:00 - activationStatus: "on" - startDate: - value: 2000-01-23T04:56:07.000+00:00 - deliveryStatus: draft - targeting: - geoLocation: - zipCodes: - value: null - countries: - value: null - subdivisions: - value: null - frequencyCapping: - maximumImpressions: 6 - frequency: hourly - deliveryLimitations: - operatingSystems: - - android - - android - environments: - - web - - web - devices: - - other - - other - bidding: - bidStrategy: actions - bidAmount: - value: 0.8008281904610115 - costController: COS - campaignId: campaignId - name: name - datasetId: datasetId - mediaType: display - destinationEnvironment: undefined - advertiserId: advertiserId - budget: - budgetDeliverySmoothing: accelerated - budgetDeliveryWeek: undefined - budgetAmount: - value: 0.8008281904610115 - budgetRenewal: undefined - budgetStrategy: capped - properties: - name: - nullable: true - type: string - x-nullable: true - advertiserId: - nullable: true - type: string - x-nullable: true - datasetId: - nullable: true - type: string - x-nullable: true - campaignId: - nullable: true - type: string - x-nullable: true - destinationEnvironment: - enum: - - undefined - - web - - app - nullable: true - type: string - schedule: - $ref: '#/components/schemas/ReadAdSetSchedule' - bidding: - $ref: '#/components/schemas/ReadAdSetBidding' - targeting: - $ref: '#/components/schemas/AdSetTargeting' - budget: - $ref: '#/components/schemas/ReadAdSetBudget' - mediaType: - enum: - - display - - video - nullable: true - type: string - x-nullable: true - type: object - AdSetCategoryBid: - description: Category Bid information about a Category for a given Ad Set. - example: - bidAmount: 0.8008281904610115 - categoryName: categoryName - properties: - categoryName: - description: The name of the Category to which the Category Bid has been - applied. - nullable: true - type: string - x-nullable: true - bidAmount: - description: The Bid amount applied to the given Category associated to - an Ad Set. At most 4 decimals are supported. Additional decimals are rounded. - format: double - nullable: true - type: number - type: object - AdSetDisplayMultiplier: - description: Display Multiplier information about a Category for a given Ad - Set. - example: - displayMultiplier: 0.8008281904610115 - categoryName: categoryName - properties: - categoryName: - description: The name of the Category to which the given for which the Display - Multiplier has been applied. - nullable: true - type: string - x-nullable: true - displayMultiplier: - description: The Display Multiplier applied to the given Category associated - to an Ad Set. - format: double - nullable: true - type: number - type: object - Campaign: - description: campaign read model - example: - goal: Unspecified - name: name - spendLimit: - spendLimitRenewal: undefined - spendLimitAmount: - value: 0.8008281904610115 - spendLimitType: capped - advertiserId: advertiserId - objective: objective - properties: - name: - nullable: true - type: string - x-nullable: true - advertiserId: - nullable: true - type: string - x-nullable: true - objective: - nullable: true - type: string - x-nullable: true - spendLimit: - $ref: '#/components/schemas/CampaignSpendLimit' - goal: - enum: - - Unspecified - - Acquisition - - Retention - nullable: true - type: string - type: object - PatchAdSet: - description: ad set patch model - example: - targeting: - geoLocation: - zipCodes: - value: null - countries: - value: null - subdivisions: - value: null - frequencyCapping: - maximumImpressions: 6 - frequency: hourly - deliveryLimitations: - operatingSystems: - - android - - android - environments: - - web - - web - devices: - - other - - other - bidding: - bidAmount: - value: 0.8008281904610115 - name: name - scheduling: - endDate: - value: 2000-01-23T04:56:07.000+00:00 - startDate: - value: 2000-01-23T04:56:07.000+00:00 - budget: - budgetDeliverySmoothing: accelerated - budgetDeliveryWeek: undefined - budgetAmount: - value: 0.8008281904610115 - budgetRenewal: undefined - budgetStrategy: capped - properties: - name: - nullable: true - type: string - x-nullable: true - scheduling: - $ref: '#/components/schemas/PatchAdSetScheduling' - bidding: - $ref: '#/components/schemas/PatchAdSetBidding' - targeting: - $ref: '#/components/schemas/AdSetTargeting' - budget: - $ref: '#/components/schemas/PatchAdSetBudget' - type: object - PatchAdSetCategoryBid: - description: Category Bid to update for a given combination of Ad Set and Category. - example: - bidAmount: 0.8008281904610115 - properties: - bidAmount: - description: The Bid amount applied to the given Category associated to - an Ad Set. At most 4 decimals are supported. Additional decimals are rounded. - format: double - nullable: true - type: number - type: object - PatchAdSetDisplayMultiplier: - description: Display Multiplier to update for a given combination of Ad Set - and Category. - example: - displayMultiplier: 0.8008281904610115 - properties: - displayMultiplier: - description: Any positive decimal value. To remove the impact of the Display - Multiplier set it to 1. At most 4 decimals are supported. Additional decimals - are rounded. - format: double - nullable: true - type: number - type: object - PatchCampaign: - description: campaign patch model - example: - spendLimit: - spendLimitRenewal: undefined - spendLimitAmount: - value: 0.8008281904610115 - spendLimitType: capped - properties: - spendLimit: - $ref: '#/components/schemas/PatchCampaignSpendLimit' - type: object - ReadAdSetSchedule: - description: ad set schedule read model - example: - endDate: - value: 2000-01-23T04:56:07.000+00:00 - activationStatus: "on" - startDate: - value: 2000-01-23T04:56:07.000+00:00 - deliveryStatus: draft - properties: - startDate: - $ref: '#/components/schemas/NillableDateTime' - endDate: - $ref: '#/components/schemas/NillableDateTime' - activationStatus: - enum: - - "on" - - "off" - nullable: true - type: string - deliveryStatus: - enum: - - draft - - inactive - - live - - notLive - - pausing - - paused - - scheduled - - ended - - notDelivering - - archived - nullable: true - type: string - type: object - ReadAdSetBidding: - description: ad set bidding read model - example: - bidStrategy: actions - bidAmount: - value: 0.8008281904610115 - costController: COS - properties: - bidAmount: - $ref: '#/components/schemas/NillableDecimal' - bidStrategy: - description: The intended optimization for the Ad Set - enum: - - actions - - clicks - - conversions - - displays - - installs - - revenue - - storeConversions - - value - - viewedImpressions - - Visits - - completedVideoViews - nullable: true - type: string - costController: - description: How spend is controlled - enum: - - COS - - CPC - - CPI - - CPM - - CPO - - CPSV - - CPV - - dailyBudget - nullable: true - type: string - type: object - AdSetTargeting: - description: ad set targeting model - example: - geoLocation: - zipCodes: - value: null - countries: - value: null - subdivisions: - value: null - frequencyCapping: - maximumImpressions: 6 - frequency: hourly - deliveryLimitations: - operatingSystems: - - android - - android - environments: - - web - - web - devices: - - other - - other - properties: - deliveryLimitations: - $ref: '#/components/schemas/AdSetDeliveryLimitations' - geoLocation: - $ref: '#/components/schemas/AdSetGeoLocation' - frequencyCapping: - $ref: '#/components/schemas/AdSetFrequencyCapping' - type: object - ReadAdSetBudget: - description: ad set budget read model - example: - budgetDeliverySmoothing: accelerated - budgetDeliveryWeek: undefined - budgetAmount: - value: 0.8008281904610115 - budgetRenewal: undefined - budgetStrategy: capped - properties: - budgetStrategy: - enum: - - capped - - uncapped - nullable: true - type: string - budgetRenewal: - enum: - - undefined - - daily - - monthly - - lifetime - nullable: true - type: string - budgetDeliverySmoothing: - enum: - - accelerated - - standard - nullable: true - type: string - x-nullable: true - budgetDeliveryWeek: - enum: - - undefined - - mondayToSunday - - tuesdayToMonday - - wednesdayToTuesday - - thursdayToWednesday - - fridayToThursday - - saturdayToFriday - - sundayToSaturday - nullable: true - type: string - budgetAmount: - $ref: '#/components/schemas/NillableDecimal' - type: object - CampaignSpendLimit: - description: campaign spend limit model - example: - spendLimitRenewal: undefined - spendLimitAmount: - value: 0.8008281904610115 - spendLimitType: capped - properties: - spendLimitType: - enum: - - capped - - uncapped - nullable: true - type: string - spendLimitRenewal: - enum: - - undefined - - daily - - monthly - - lifetime - nullable: true - type: string - spendLimitAmount: - $ref: '#/components/schemas/NillableDecimal' - type: object - PatchAdSetScheduling: - description: ad set schedule patch model - example: - endDate: - value: 2000-01-23T04:56:07.000+00:00 - startDate: - value: 2000-01-23T04:56:07.000+00:00 - properties: - startDate: - $ref: '#/components/schemas/NillableDateTime' - endDate: - $ref: '#/components/schemas/NillableDateTime' - type: object - PatchAdSetBidding: - description: ad set bidding patch model - example: - bidAmount: - value: 0.8008281904610115 - properties: - bidAmount: - $ref: '#/components/schemas/NillableDecimal' - type: object - PatchAdSetBudget: - description: ad set budget patch model - example: - budgetDeliverySmoothing: accelerated - budgetDeliveryWeek: undefined - budgetAmount: - value: 0.8008281904610115 - budgetRenewal: undefined - budgetStrategy: capped - properties: - budgetStrategy: - enum: - - capped - - uncapped - nullable: true - type: string - x-nullable: true - budgetRenewal: - enum: - - undefined - - daily - - monthly - - lifetime - nullable: true - type: string - x-nullable: true - budgetDeliverySmoothing: - enum: - - accelerated - - standard - nullable: true - type: string - x-nullable: true - budgetDeliveryWeek: - enum: - - undefined - - mondayToSunday - - tuesdayToMonday - - wednesdayToTuesday - - thursdayToWednesday - - fridayToThursday - - saturdayToFriday - - sundayToSaturday - nullable: true - type: string - x-nullable: true - budgetAmount: - $ref: '#/components/schemas/NillableDecimal' - type: object - PatchCampaignSpendLimit: - description: campaign spend limit model - example: - spendLimitRenewal: undefined - spendLimitAmount: - value: 0.8008281904610115 - spendLimitType: capped - properties: - spendLimitType: - enum: - - capped - - uncapped - nullable: true - type: string - x-nullable: true - spendLimitRenewal: - enum: - - undefined - - daily - - monthly - - lifetime - nullable: true - type: string - x-nullable: true - spendLimitAmount: - $ref: '#/components/schemas/NillableDecimal' - type: object - NillableDateTime: - description: "structure that encapsulates an object that have valid business\ - \ null values. If the structure is provided (i.e. not null), then the value\ - \ in it, even null, is provided." - example: - value: 2000-01-23T04:56:07.000+00:00 - properties: - value: - format: date-time - nullable: true - type: string - x-nullable: true - type: object - NillableDecimal: - description: "structure that encapsulates an object that have valid business\ - \ null values. If the structure is provided (i.e. not null), then the value\ - \ in it, even null, is provided." - example: - value: 0.8008281904610115 - nullable: true - properties: - value: - format: double - nullable: true - type: number - x-nullable: true - type: object - x-nullable: true - AdSetDeliveryLimitations: - description: ad set delivery limitations model - example: - operatingSystems: - - android - - android - environments: - - web - - web - devices: - - other - - other - properties: - environments: - items: - enum: - - web - - inApp - type: string - nullable: true - type: array - x-nullable: true - devices: - items: - enum: - - other - - desktop - - mobile - - tablet - type: string - nullable: true - type: array - x-nullable: true - operatingSystems: - items: - enum: - - android - - ios - - unknown - type: string - nullable: true - type: array - x-nullable: true - type: object - AdSetGeoLocation: - description: ad set geolocation model - example: - zipCodes: - value: null - countries: - value: null - subdivisions: - value: null - properties: - countries: - $ref: '#/components/schemas/NillableAdSetTargetingRule' - subdivisions: - $ref: '#/components/schemas/NillableAdSetTargetingRule' - zipCodes: - $ref: '#/components/schemas/NillableAdSetTargetingRule' - type: object - AdSetFrequencyCapping: - description: ad set frequency capping model - example: - maximumImpressions: 6 - frequency: hourly - properties: - frequency: - enum: - - hourly - - daily - - lifetime - - advanced - nullable: true - type: string - maximumImpressions: - format: int32 - nullable: true - type: integer - type: object - NillableAdSetTargetingRule: - description: "structure that encapsulates an object that have valid business\ - \ null values. If the structure is provided (i.e. not null), then the value\ - \ in it, even null, is provided." - example: - value: null - properties: - value: - $ref: '#/components/schemas/NillableAdSetTargetingRule_value' - type: object - AdSetTargetingRule: - description: ad set targeting rule model - properties: - operand: - enum: - - undefined - - in - - notIn - nullable: true - type: string - values: - items: - type: string - nullable: true - type: array - x-nullable: true - type: object - TransparencyReportDataMessage: - description: This is the message defining the response for Transparency report - example: - data: - - attributes: - tokenValidUntil: 2000-01-23T04:56:07.000+00:00 - files: - - fileName: fileName - url: url - - fileName: fileName - url: url - advertiserId: advertiserId - type: type - - attributes: - tokenValidUntil: 2000-01-23T04:56:07.000+00:00 - files: - - fileName: fileName - url: url - - fileName: fileName - url: url - advertiserId: advertiserId - type: type - properties: - data: - items: - $ref: '#/components/schemas/TransparencyReportEntityMessage' - type: array - uniqueItems: false - required: - - data - type: object - ProblemsDetails: - description: Common problems object - properties: - errors: - items: - $ref: '#/components/schemas/ProblemDetails' - nullable: true - readOnly: true - type: array - uniqueItems: false - type: object - TransparencyQueryMessage: - description: This is the message defining the query for Transparency report - example: - shouldDisplayProductIds: false - startDate: 2023-04-03T00:00:00.0000000+00:00 - endDate: 2023-04-06T00:00:00.0000000+00:00 - properties: - shouldDisplayProductIds: - default: false - description: Specify if the product ids are displayed in the report. - nullable: true - type: boolean - startDate: - description: "Start date of the report. Date component of ISO 8061 format,\ - \ any time or timezone component is ignored." - format: date-time - type: string - endDate: - description: "End date of the report. Date component of ISO 8061 format,\ - \ any time or timezone component is ignored." - format: date-time - type: string - required: - - endDate - - startDate - type: object - PlacementsReportQueryDataMessage: - description: Contains queries for Placements report - example: - data: - - type: PlacementReport - attributes: - advertiserIds: "123,456,789" - campaignIds: "111,222,333,444" - adsetIds: "135,246,357,468" - environment: web - placement: MyPlacement - dimensions: - - AdsetId - - AdvertiserId - - Placement - metrics: - - clicks - - displays - - cost - currency: EUR - disclosed: false - format: csv - timezone: Europe/Paris - startDate: 2022-08-29T00:00:00.0000000+00:00 - endDate: 2022-08-29T00:00:00.0000000+00:00 - properties: - data: - items: - $ref: '#/components/schemas/PlacementsReportQueryEntityMessage' - type: array - uniqueItems: false - required: - - data - type: object - StatisticsReportQueryMessage: - description: This is the message defining the query for Adset report - example: - advertiserIds: "123,456,789" - adSetIds: - - "12345" - - "54321" - adSetNames: - - myAdSet1 - - myAdSet2 - adSetStatus: - - Active - dimensions: - - CampaignId - - Campaign - - AdsetId - - Adset - - AdvertiserId - - Advertiser - - AdId - - Ad - - CouponId - - Coupon - - CategoryId - - Category - - Hour - - Day - - Week - - Month - - Year - - Os - - Device - metrics: - - Clicks - - Displays - - Cpc - - Visits - currency: EUR - format: csv - timezone: Europe/Paris - startDate: 2022-08-29T00:00:00.0000000+00:00 - endDate: 2022-09-01T00:00:00.0000000+00:00 - properties: - advertiserIds: - description: "The comma-separated list of advertiser ids. If empty, all\ - \ the advertisers in the portfolio will be used" - nullable: true - type: string - adSetIds: - description: "list of adSets ids. If empty, all the adSets will be fetched" - items: - type: string - nullable: true - type: array - uniqueItems: false - adSetNames: - description: "list of adSets names. If empty, all the adSets will be fetched" - items: - type: string - nullable: true - type: array - uniqueItems: false - adSetStatus: - description: "list of adSets status. If empty, all the adSets will be fetched" - items: - type: string - nullable: true - type: array - uniqueItems: false - dimensions: - description: The dimensions for the report. - items: - enum: - - AdsetId - - Adset - - AdvertiserId - - Advertiser - - CategoryId - - Category - - Hour - - Day - - Week - - Month - - Year - - Os - - Device - - CampaignId - - Campaign - - AdId - - Ad - - CouponId - - Coupon - - MarketingObjectiveId - - MarketingObjective - - ChannelId - - Channel - - Goal - type: string - type: array - uniqueItems: false - metrics: - description: The list of metrics to report. - items: - type: string - type: array - uniqueItems: false - currency: - description: The currency used for the report. ISO 4217 code (three-letter - capitals). - type: string - format: - description: "The file format of the generated report: csv, xml, excel or\ - \ json." - type: string - timezone: - default: UTC - description: The timezone used for the report. Timezone Database format - (Tz). - nullable: true - type: string - startDate: - description: "Start date of the report. Date component of ISO 8061 format,\ - \ any time or timezone component is ignored." - format: date-time - type: string - endDate: - description: "End date of the report. Date component of ISO 8061 format,\ - \ any time or timezone component is ignored." - format: date-time - type: string - required: - - currency - - dimensions - - endDate - - format - - metrics - - startDate - type: object - TransactionsReportQueryDataMessage: - description: Contains queries for Transactions report - example: - data: - - type: TransactionsReport - attributes: - advertiserIds: "123,456,789" - eventType: display - currency: EUR - format: csv - timezone: Europe/Paris - startDate: 2023-04-03T00:00:00.0000000+00:00 - endDate: 2023-04-03T00:00:00.0000000+00:00 - properties: - data: - items: - $ref: '#/components/schemas/TransactionsReportQueryEntityMessage' - type: array - uniqueItems: false - required: - - data - type: object - TransparencyReportEntityMessage: - description: This is the message defining the entity response for Transparency - report - example: - attributes: - tokenValidUntil: 2000-01-23T04:56:07.000+00:00 - files: - - fileName: fileName - url: url - - fileName: fileName - url: url - advertiserId: advertiserId - type: type - properties: - type: - readOnly: true - type: string - attributes: - $ref: '#/components/schemas/TransparencyReportAttributes' - required: - - attributes - - type - type: object - ProblemDetails: - description: Common problem object. - properties: - traceId: - description: The request correlation ID this problem comes from. - nullable: true - type: string - traceIdentifier: - description: "The request correlation ID this problem comes from. (deprecated,\ - \ use traceId instead)" - nullable: true - type: string - type: - description: The problem's category. - enum: - - unknown - - access-control - - authentication - - authorization - - availability - - deprecation - - quota - - validation - nullable: true - type: string - code: - description: "A machine-readable error code, expressed as a string value." - nullable: true - type: string - instance: - description: A URI that identifies the specific occurrence of the problem. - nullable: true - type: string - title: - description: A short human-readable description of the problem type - nullable: true - type: string - detail: - description: A human-readable explanation specific to this occurrence of - the problem - nullable: true - type: string - source: - additionalProperties: - type: string - description: A machine-readable structure to reference to the exact location(s) - causing the error(s) - nullable: true - type: object - stackTrace: - nullable: true - type: string - type: object - PlacementsReportQueryEntityMessage: - description: Contains a query for Transaction report and its type - properties: - type: - type: string - attributes: - $ref: '#/components/schemas/PlacementsReportQueryMessage' - required: - - attributes - - type - type: object - TransactionsReportQueryEntityMessage: - description: Contains a query for Transaction report and its type - properties: - type: - type: string - attributes: - $ref: '#/components/schemas/TransactionsReportQueryMessage' - required: - - attributes - - type - type: object - TransparencyReportAttributes: - description: This is the message defining the attribute response for Transparency - report - example: - tokenValidUntil: 2000-01-23T04:56:07.000+00:00 - files: - - fileName: fileName - url: url - - fileName: fileName - url: url - advertiserId: advertiserId - properties: - advertiserId: - type: string - tokenValidUntil: - format: date-time - type: string - files: - items: - $ref: '#/components/schemas/TransparencyReportFile' - type: array - uniqueItems: false - required: - - advertiserId - - files - - tokenValidUntil - type: object - PlacementsReportQueryMessage: - description: This is the message defining the query for Placements report - properties: - advertiserIds: - description: The comma-separated list of advertiser ids. - type: string - campaignIds: - description: The comma-separated list of campaign ids. - nullable: true - type: string - adsetIds: - description: The comma-separated list of adSet ids. - nullable: true - type: string - environment: - description: "Type of environment: Web, Android or iOS." - nullable: true - type: string - placement: - description: Filter the value of the placement - nullable: true - type: string - dimensions: - description: The dimensions for the report. - items: - enum: - - AdsetId - - AdvertiserId - - Placement - - Environment - - AdsetName - - AdvertiserName - - CampaignId - - CampaignName - type: string - type: array - uniqueItems: false - metrics: - description: The list of metrics to report. - items: - type: string - type: array - uniqueItems: false - currency: - description: The currency used for the report. ISO 4217 code (three-letter - capitals). - type: string - disclosed: - default: true - description: Returns disclosed or undisclosed placements. - nullable: true - type: boolean - format: - description: "The file format of the generated report: csv, xml, excel or\ - \ json." - type: string - timezone: - default: UTC - description: The timezone used for the report. Timezone Database format - (Tz). - nullable: true - type: string - startDate: - description: "Start date of the report. Date component of ISO 8061 format,\ - \ any time or timezone component is ignored." - format: date-time - type: string - endDate: - description: "End date of the report. Date component of ISO 8061 format,\ - \ any time or timezone component is ignored." - format: date-time - type: string - required: - - advertiserIds - - currency - - dimensions - - endDate - - format - - metrics - - startDate - type: object - TransactionsReportQueryMessage: - description: This is the message defining the query for Transaction report - properties: - advertiserIds: - description: "The comma-separated list of advertiser ids. If empty, all\ - \ the advertisers in the portfolio will be used" - nullable: true - type: string - eventType: - description: Apply a filter on Event type . - nullable: true - type: string - currency: - description: The currency used for the report. ISO 4217 code (three-letter - capitals). - type: string - format: - description: "The file format of the generated report: csv, xml, excel or\ - \ json." - type: string - timezone: - default: UTC - description: The timezone used for the report. Timezone Database format - (Tz). - nullable: true - type: string - startDate: - description: "Start date of the report. Date component of ISO 8061 format,\ - \ any time or timezone component is ignored." - format: date-time - type: string - endDate: - description: "End date of the report. Date component of ISO 8061 format,\ - \ any time or timezone component is ignored." - format: date-time - type: string - required: - - currency - - endDate - - format - - startDate - type: object - TransparencyReportFile: - description: This is the message defining the file response for Transparency - report - example: - fileName: fileName - url: url - properties: - fileName: - type: string - url: - type: string - required: - - fileName - - url - type: object - GetPortfolioResponse: - description: Portfolio fetch Response - example: - data: - - meta: "{}" - attributes: - advertiserName: advertiserName - id: id - type: campaign - - meta: "{}" - attributes: - advertiserName: advertiserName - id: id - type: campaign - warnings: - - traceId: traceId - code: internal-error - instance: instance - detail: detail - type: access_control - title: title - - traceId: traceId - code: internal-error - instance: instance - detail: detail - type: access_control - title: title - errors: - - traceId: traceId - code: internal-error - instance: instance - detail: detail - source: - key: source - type: access_control - title: title - - traceId: traceId - code: internal-error - instance: instance - detail: detail - source: - key: source - type: access_control - title: title - properties: - data: - description: The response�s primary data - items: - $ref: '#/components/schemas/EntityOfPortfolioMessage' - nullable: true - type: array - uniqueItems: false - errors: - description: "Error list returned by the Criteo API\r\nFor successful requests\ - \ it is empty" - items: - $ref: '#/components/schemas/CriteoApiError' - nullable: true - type: array - uniqueItems: false - warnings: - description: "Warnings list returned by the Criteo API\r\nIn some situations\ - \ the operations are successful but it may be useful to issue warnings\ - \ to the API consumer.\r\nFor example the endpoint, entity or field is\ - \ deprecated. Warnings are like compiler warnings, they indicate that\ - \ problems may occur in the future." - items: - $ref: '#/components/schemas/CriteoApiWarning' - nullable: true - type: array - uniqueItems: false - type: object - EntityOfPortfolioMessage: - description: Generic Criteo API successful data model - example: - meta: "{}" - attributes: - advertiserName: advertiserName - id: id - type: campaign - properties: - type: - description: A string containing the entity type - enum: - - campaign - - adset - - ad - - advertiser - - agency - - publisher - - address - - client - - contact - - industry - example: campaign - nullable: true - type: string - id: - description: A opaque string containing the unique Id of the entity - nullable: true - type: string - attributes: - $ref: '#/components/schemas/PortfolioMessage' - meta: - description: A meta object that contains application-specific metadata - nullable: true - type: object - type: object - CriteoApiError: - description: Criteo API response error - example: - traceId: traceId - code: internal-error - instance: instance - detail: detail - source: - key: source - type: access_control - title: title - properties: - traceId: - description: The correlation ID provided by the gateway - nullable: true - type: string - type: - description: A machine-readable code specifying error category - enum: - - access_control - - authentication - - authorization - - availability - - deprecation - - quota - - validation - example: access_control - nullable: true - type: string - code: - description: A machine-readable error code string in kabab-case. Unique - across Criteo - enum: - - internal-error - - deprecated-field - - endpoint-deprecated - - required-field - - invalid-date-format - - invalid - - invalid-ranged - - invalid-timespan - example: internal-error - nullable: true - type: string - instance: - description: A URI reference that identifies the specific occurrence of - the problem - nullable: true - type: string - title: - description: "A short, human-readable remarks of the problem type." - nullable: true - type: string - detail: - description: A human-readable explanation specific to this occurrence of - the problem. - nullable: true - type: string - source: - additionalProperties: - type: string - description: A machine-readable structure to reference to the exact location(s) - causing the error(s). - nullable: true - type: object - type: object - CriteoApiWarning: - description: Criteo API response warning - example: - traceId: traceId - code: internal-error - instance: instance - detail: detail - type: access_control - title: title - properties: - traceId: - description: The correlation ID provided by the gateway - nullable: true - type: string - type: - description: A machine-readable code specifying error category - enum: - - access_control - - authentication - - authorization - - availability - - deprecation - - quota - - validation - example: access_control - nullable: true - type: string - code: - description: A machine-readable error code string in kabab-case. Unique - across Criteo - enum: - - internal-error - - deprecated-field - - endpoint-deprecated - - required-field - - invalid-date-format - - invalid - - invalid-ranged - - invalid-timespan - example: internal-error - nullable: true - type: string - instance: - description: A URI reference that identifies the specific occurrence of - the problem - nullable: true - type: string - title: - description: "A short, human-readable remarks of the problem type." - nullable: true - type: string - detail: - description: A human-readable explanation specific to this occurrence of - the problem. - nullable: true - type: string - type: object - PortfolioMessage: - description: Class with elementary info about advertiser - example: - advertiserName: advertiserName - properties: - advertiserName: - nullable: true - type: string - type: object - Audience_attributes: - example: - nbLinesEmail: 6 - nbLines: 0 - created: 2000-01-23T04:56:07.000+00:00 - name: name - description: description - nbMatchesEmail: 1 - updated: 2000-01-23T04:56:07.000+00:00 - advertiserId: advertiserId - properties: - advertiserId: - description: The advertiser id that owns this Audience - format: int32 - nullable: true - type: string - name: - description: The name of the Audience - type: string - description: - description: The string description of the Audience - type: string - created: - description: Date and time ISO 8601 formatted string - format: date-time - type: string - updated: - description: Date and time ISO 8601 formatted string - format: date-time - type: string - nbLines: - description: The number of line in the audience available once processed - nullable: true - type: integer - nbLinesEmail: - description: The number of email line in the audience available once processed - nullable: true - type: integer - nbMatchesEmail: - description: The number of email matches in the audience available once - processed - nullable: true - type: integer - required: - - created - - description - - name - - updated - type: object - ContactlistOperation_attributes: - description: the contactlist operation attributes - example: - nbValidIdentifiers: 6 - nbInvalidIdentifiers: 1 - sampleInvalidIdentifiers: - - sampleInvalidIdentifiers - - sampleInvalidIdentifiers - contactListId: 0 - requestDate: 2000-01-23T04:56:07.000+00:00 - identifierType: identifierType - operation: operation - properties: - contactListId: - description: the affected user list id - nullable: true - type: integer - operation: - description: The action recorded - type: string - requestDate: - description: When the action was recorded - format: date-time - nullable: true - type: string - identifierType: - description: The schema specified for of the identifiers - nullable: true - type: string - nbValidIdentifiers: - description: How many identifiers were valid for the specified schema - nullable: true - type: integer - nbInvalidIdentifiers: - description: How many identifiers were invalid for the specified schema - nullable: true - type: integer - sampleInvalidIdentifiers: - description: A sample of invalid identifiers if there is some - items: - type: string - nullable: true - type: array - required: - - operation - type: object - NewAudience_attributes: - example: - name: name - description: description - advertiserId: advertiserId - properties: - advertiserId: - description: The advertiser id to create the audience for - nullable: true - type: string - name: - description: The name of the new audience - type: string - description: - description: The description of the audience - nullable: true - type: string - required: - - name - type: object - ContactlistAmendment_attributes: - description: the name of the entity type - example: - gumCallerId: 0 - identifiers: - - identifiers - - identifiers - identifierType: email - operation: add - properties: - operation: - description: Operation to add or remove users - enum: - - add - - remove - type: string - identifierType: - description: What type of identifiers are used - enum: - - email - - madid - - identityLink - - gum - - customerid - nullable: true - type: string - identifiers: - description: "The users tos add or remove, each in the schema specified" - items: - type: string - type: array - gumCallerId: - description: The Gum caller id of the advertiser patching identifiers of - type Gum - nullable: true - type: integer - required: - - identifiers - - operation - type: object - NillableAdSetTargetingRule_value: - allOf: - - $ref: '#/components/schemas/AdSetTargetingRule' - nullable: true - type: object - x-nullable: true - securitySchemes: - oauth: - flows: - authorizationCode: - authorizationUrl: https://api.criteo.com/oauth2 - scopes: {} - tokenUrl: https://api.criteo.com/oauth2/token - clientCredentials: - scopes: {} - tokenUrl: https://api.criteo.com/oauth2/token - type: oauth2 -x-samples-languages: -- java -- python -- php -- csharp -- javascript -- curl -- ruby - diff --git a/sdks/marketingsolutions_2023-04/docs/AdSetGeoLocation.md b/sdks/marketingsolutions_2023-04/docs/AdSetGeoLocation.md deleted file mode 100644 index 3d0b0a45..00000000 --- a/sdks/marketingsolutions_2023-04/docs/AdSetGeoLocation.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# AdSetGeoLocation - -ad set geolocation model - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**countries** | [**NillableAdSetTargetingRule**](NillableAdSetTargetingRule.md) | | [optional] | -|**subdivisions** | [**NillableAdSetTargetingRule**](NillableAdSetTargetingRule.md) | | [optional] | -|**zipCodes** | [**NillableAdSetTargetingRule**](NillableAdSetTargetingRule.md) | | [optional] | - - - diff --git a/sdks/marketingsolutions_2023-04/docs/AdSetTargeting.md b/sdks/marketingsolutions_2023-04/docs/AdSetTargeting.md deleted file mode 100644 index 9bd145a9..00000000 --- a/sdks/marketingsolutions_2023-04/docs/AdSetTargeting.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# AdSetTargeting - -ad set targeting model - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**deliveryLimitations** | [**AdSetDeliveryLimitations**](AdSetDeliveryLimitations.md) | | [optional] | -|**geoLocation** | [**AdSetGeoLocation**](AdSetGeoLocation.md) | | [optional] | -|**frequencyCapping** | [**AdSetFrequencyCapping**](AdSetFrequencyCapping.md) | | [optional] | - - - diff --git a/sdks/marketingsolutions_2023-04/docs/Audience.md b/sdks/marketingsolutions_2023-04/docs/Audience.md deleted file mode 100644 index 8f52402e..00000000 --- a/sdks/marketingsolutions_2023-04/docs/Audience.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# Audience - -Definition of an audience and all its information - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | **String** | the name of the entity type | | -|**id** | **String** | id of the Audience | | -|**attributes** | [**AudienceAttributes**](AudienceAttributes.md) | | | - - - diff --git a/sdks/marketingsolutions_2023-04/docs/AudienceAttributes.md b/sdks/marketingsolutions_2023-04/docs/AudienceAttributes.md deleted file mode 100644 index cb9a554d..00000000 --- a/sdks/marketingsolutions_2023-04/docs/AudienceAttributes.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# AudienceAttributes - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**advertiserId** | **String** | The advertiser id that owns this Audience | [optional] | -|**name** | **String** | The name of the Audience | | -|**description** | **String** | The string description of the Audience | | -|**created** | **OffsetDateTime** | Date and time ISO 8601 formatted string | | -|**updated** | **OffsetDateTime** | Date and time ISO 8601 formatted string | | -|**nbLines** | **Integer** | The number of line in the audience available once processed | [optional] | -|**nbLinesEmail** | **Integer** | The number of email line in the audience available once processed | [optional] | -|**nbMatchesEmail** | **Integer** | The number of email matches in the audience available once processed | [optional] | - - - diff --git a/sdks/marketingsolutions_2023-04/docs/DeleteAudienceResponse.md b/sdks/marketingsolutions_2023-04/docs/DeleteAudienceResponse.md deleted file mode 100644 index fcb85072..00000000 --- a/sdks/marketingsolutions_2023-04/docs/DeleteAudienceResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# DeleteAudienceResponse - -Response of an audience deletion - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**data** | [**BasicAudienceDefinition**](BasicAudienceDefinition.md) | | | -|**errors** | [**List<AudienceError>**](AudienceError.md) | | | -|**warnings** | [**List<AudienceWarning>**](AudienceWarning.md) | | | - - - diff --git a/sdks/marketingsolutions_2023-04/docs/GetAudiencesResponse.md b/sdks/marketingsolutions_2023-04/docs/GetAudiencesResponse.md deleted file mode 100644 index 1a01857d..00000000 --- a/sdks/marketingsolutions_2023-04/docs/GetAudiencesResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# GetAudiencesResponse - -Body of the GET audience operation - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**data** | [**List<Audience>**](Audience.md) | | | -|**errors** | [**List<AudienceError>**](AudienceError.md) | | | -|**warnings** | [**List<AudienceWarning>**](AudienceWarning.md) | | | - - - diff --git a/sdks/marketingsolutions_2023-04/docs/NewAudience.md b/sdks/marketingsolutions_2023-04/docs/NewAudience.md deleted file mode 100644 index b390b59d..00000000 --- a/sdks/marketingsolutions_2023-04/docs/NewAudience.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# NewAudience - -Body for the creation of a new audience (name, advertiserId, etc) - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | **String** | the name of the entity type | | -|**attributes** | [**NewAudienceAttributes**](NewAudienceAttributes.md) | | | - - - diff --git a/sdks/marketingsolutions_2023-04/docs/NewAudienceAttributes.md b/sdks/marketingsolutions_2023-04/docs/NewAudienceAttributes.md deleted file mode 100644 index f3690dcf..00000000 --- a/sdks/marketingsolutions_2023-04/docs/NewAudienceAttributes.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# NewAudienceAttributes - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**advertiserId** | **String** | The advertiser id to create the audience for | [optional] | -|**name** | **String** | The name of the new audience | | -|**description** | **String** | The description of the audience | [optional] | - - - diff --git a/sdks/marketingsolutions_2023-04/docs/NewAudienceResponse.md b/sdks/marketingsolutions_2023-04/docs/NewAudienceResponse.md deleted file mode 100644 index 2a33d02a..00000000 --- a/sdks/marketingsolutions_2023-04/docs/NewAudienceResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# NewAudienceResponse - -Response of a newly created audience - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**data** | [**BasicAudienceDefinition**](BasicAudienceDefinition.md) | | | -|**errors** | [**List<AudienceError>**](AudienceError.md) | | | -|**warnings** | [**List<AudienceWarning>**](AudienceWarning.md) | | | - - - diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSet.md b/sdks/marketingsolutions_2023-04/docs/PatchAdSet.md deleted file mode 100644 index 660f61f9..00000000 --- a/sdks/marketingsolutions_2023-04/docs/PatchAdSet.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# PatchAdSet - -ad set patch model - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**scheduling** | [**PatchAdSetScheduling**](PatchAdSetScheduling.md) | | [optional] | -|**bidding** | [**PatchAdSetBidding**](PatchAdSetBidding.md) | | [optional] | -|**targeting** | [**AdSetTargeting**](AdSetTargeting.md) | | [optional] | -|**budget** | [**PatchAdSetBudget**](PatchAdSetBudget.md) | | [optional] | - - - diff --git a/sdks/marketingsolutions_2023-04/docs/ReadAdSet.md b/sdks/marketingsolutions_2023-04/docs/ReadAdSet.md deleted file mode 100644 index 0819686b..00000000 --- a/sdks/marketingsolutions_2023-04/docs/ReadAdSet.md +++ /dev/null @@ -1,42 +0,0 @@ - - -# ReadAdSet - -ad set read model - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**advertiserId** | **String** | | [optional] | -|**datasetId** | **String** | | [optional] | -|**campaignId** | **String** | | [optional] | -|**destinationEnvironment** | [**DestinationEnvironmentEnum**](#DestinationEnvironmentEnum) | | [optional] | -|**schedule** | [**ReadAdSetSchedule**](ReadAdSetSchedule.md) | | [optional] | -|**bidding** | [**ReadAdSetBidding**](ReadAdSetBidding.md) | | [optional] | -|**targeting** | [**AdSetTargeting**](AdSetTargeting.md) | | [optional] | -|**budget** | [**ReadAdSetBudget**](ReadAdSetBudget.md) | | [optional] | -|**mediaType** | [**MediaTypeEnum**](#MediaTypeEnum) | | [optional] | - - - -## Enum: DestinationEnvironmentEnum - -| Name | Value | -|---- | -----| -| UNDEFINED | "undefined" | -| WEB | "web" | -| APP | "app" | - - - -## Enum: MediaTypeEnum - -| Name | Value | -|---- | -----| -| DISPLAY | "display" | -| VIDEO | "video" | - - - diff --git a/sdks/marketingsolutions_2023-04/docs/ReadAdSetBidding.md b/sdks/marketingsolutions_2023-04/docs/ReadAdSetBidding.md deleted file mode 100644 index 79ee8247..00000000 --- a/sdks/marketingsolutions_2023-04/docs/ReadAdSetBidding.md +++ /dev/null @@ -1,49 +0,0 @@ - - -# ReadAdSetBidding - -ad set bidding read model - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bidAmount** | [**NillableDecimal**](NillableDecimal.md) | | [optional] | -|**bidStrategy** | [**BidStrategyEnum**](#BidStrategyEnum) | The intended optimization for the Ad Set | [optional] | -|**costController** | [**CostControllerEnum**](#CostControllerEnum) | How spend is controlled | [optional] | - - - -## Enum: BidStrategyEnum - -| Name | Value | -|---- | -----| -| ACTIONS | "actions" | -| CLICKS | "clicks" | -| CONVERSIONS | "conversions" | -| DISPLAYS | "displays" | -| INSTALLS | "installs" | -| REVENUE | "revenue" | -| STORECONVERSIONS | "storeConversions" | -| VALUE | "value" | -| VIEWEDIMPRESSIONS | "viewedImpressions" | -| VISITS | "Visits" | -| COMPLETEDVIDEOVIEWS | "completedVideoViews" | - - - -## Enum: CostControllerEnum - -| Name | Value | -|---- | -----| -| COS | "COS" | -| CPC | "CPC" | -| CPI | "CPI" | -| CPM | "CPM" | -| CPO | "CPO" | -| CPSV | "CPSV" | -| CPV | "CPV" | -| DAILYBUDGET | "dailyBudget" | - - - diff --git a/sdks/marketingsolutions_2023-04/docs/ReplaceAudience.md b/sdks/marketingsolutions_2023-04/docs/ReplaceAudience.md deleted file mode 100644 index 16af94f6..00000000 --- a/sdks/marketingsolutions_2023-04/docs/ReplaceAudience.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReplaceAudience - -Parameters required to replace an audience - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | **String** | the name of the entity type | | -|**attributes** | [**AudienceNameDescription**](AudienceNameDescription.md) | | | - - - diff --git a/sdks/marketingsolutions_2023-04/docs/ReplaceAudienceResponse.md b/sdks/marketingsolutions_2023-04/docs/ReplaceAudienceResponse.md deleted file mode 100644 index 60b009b7..00000000 --- a/sdks/marketingsolutions_2023-04/docs/ReplaceAudienceResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ReplaceAudienceResponse - -Response of an audience replacement - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**data** | [**BasicAudienceDefinition**](BasicAudienceDefinition.md) | | | -|**errors** | [**List<AudienceError>**](AudienceError.md) | | | -|**warnings** | [**List<AudienceWarning>**](AudienceWarning.md) | | | - - - diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/JSON.java b/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/JSON.java deleted file mode 100644 index 6ee674ee..00000000 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/JSON.java +++ /dev/null @@ -1,503 +0,0 @@ -/* - * Criteo API - * Criteo API - MarketingSolutions - * - * The version of the OpenAPI document: 2023-04 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.criteo.api.marketingsolutions.v2023_04; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.internal.bind.util.ISO8601Utils; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonElement; -import io.gsonfire.GsonFireBuilder; -import io.gsonfire.TypeSelector; - -import okio.ByteString; - -import java.io.IOException; -import java.io.StringReader; -import java.lang.reflect.Type; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.ParsePosition; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Date; -import java.util.Locale; -import java.util.Map; -import java.util.HashMap; - -/* - * A JSON utility class - * - * NOTE: in the future, this class may be converted to static, which may break - * backward-compatibility - */ -public class JSON { - private static Gson gson; - private static boolean isLenientOnJson = false; - private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); - private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); - - @SuppressWarnings("unchecked") - public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder() - ; - GsonBuilder builder = fireBuilder.createGsonBuilder(); - return builder; - } - - private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { - JsonElement element = readElement.getAsJsonObject().get(discriminatorField); - if (null == element) { - throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); - } - return element.getAsString(); - } - - /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. - * - * @param classByDiscriminatorValue The map of discriminator values to Java classes. - * @param discriminatorValue The value of the OpenAPI discriminator in the input data. - * @return The Java class that implements the OpenAPI schema - */ - private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { - Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); - if (null == clazz) { - throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); - } - return clazz; - } - - { - GsonBuilder gsonBuilder = createGson(); - gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); - gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); - gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); - gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); - gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AdSetCategoryBid.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AdSetCategoryBidListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AdSetCategoryBidResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AdSetDeliveryLimitations.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AdSetDisplayMultiplier.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AdSetDisplayMultiplierListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AdSetDisplayMultiplierResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AdSetFrequencyCapping.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AdSetGeoLocation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AdSetSearchFilter.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AdSetTargeting.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AdSetTargetingRule.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ApplicationSummaryModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ApplicationSummaryModelResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ApplicationSummaryModelResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.Audience.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AudienceAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AudienceError.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AudienceNameDescription.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.AudienceWarning.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.BasicAudienceDefinition.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.Campaign.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.CampaignListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.CampaignReadResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.CampaignResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.CampaignSearchFilters.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.CampaignSearchRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.CampaignSpendLimit.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.CommonProblem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ContactlistAmendment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ContactlistAmendmentAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ContactlistAmendmentRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ContactlistOperation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ContactlistOperationAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.CriteoApiError.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.CriteoApiWarning.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.DeleteAudienceContactListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.DeleteAudienceResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.EntityOfPortfolioMessage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ErrorCodeResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.GetAudiencesResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.GetPortfolioResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ModifyAudienceResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.NewAudience.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.NewAudienceAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.NewAudienceRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.NewAudienceResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.NillableAdSetTargetingRule.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.NillableAdSetTargetingRuleValue.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.NillableDateTime.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.NillableDecimal.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSet.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetBidding.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetBudget.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetCategoryBid.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetCategoryBidListRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetCategoryBidResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetCategoryBidResultListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetCategoryBidResultResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetDisplayMultiplier.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetDisplayMultiplierListRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetDisplayMultiplierResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetDisplayMultiplierResultListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetDisplayMultiplierResultResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetScheduling.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchCampaign.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchCampaignListRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchCampaignSpendLimit.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchCampaignWriteResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchResultCampaignListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PatchResultCampaignReadResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PlacementsReportQueryDataMessage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PlacementsReportQueryEntityMessage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PlacementsReportQueryMessage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.PortfolioMessage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ProblemDetails.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ProblemsDetails.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ReadAdSet.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ReadAdSetBidding.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ReadAdSetBudget.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ReadAdSetSchedule.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ReadModelAdSetId.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ReadModelReadAdSet.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ReplaceAudience.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ReplaceAudienceRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ReplaceAudienceResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.RequestAdSetSearch.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.RequestsAdSetId.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.RequestsPatchAdSet.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ResponseReadAdSet.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ResponsesAdSetId.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.ResponsesReadAdSet.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.StatisticsReportQueryMessage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.TransactionsReportQueryDataMessage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.TransactionsReportQueryEntityMessage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.TransactionsReportQueryMessage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.TransparencyQueryMessage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.TransparencyReportAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.TransparencyReportDataMessage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.TransparencyReportEntityMessage.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.TransparencyReportFile.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.WriteModelAdSetId.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2023_04.model.WriteModelPatchAdSet.CustomTypeAdapterFactory()); - gson = gsonBuilder.create(); - } - - /** - * Get Gson. - * - * @return Gson - */ - public static Gson getGson() { - return gson; - } - - /** - * Set Gson. - * - * @param gson Gson - */ - public static void setGson(Gson gson) { - JSON.gson = gson; - } - - public static void setLenientOnJson(boolean lenientOnJson) { - isLenientOnJson = lenientOnJson; - } - - /** - * Serialize the given Java object into JSON string. - * - * @param obj Object - * @return String representation of the JSON - */ - public static String serialize(Object obj) { - return gson.toJson(obj); - } - - /** - * Deserialize the given JSON string to Java object. - * - * @param Type - * @param body The JSON string - * @param returnType The type to deserialize into - * @return The deserialized Java object - */ - @SuppressWarnings("unchecked") - public static T deserialize(String body, Type returnType) { - try { - if (isLenientOnJson) { - JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) - jsonReader.setLenient(true); - return gson.fromJson(jsonReader, returnType); - } else { - return gson.fromJson(body, returnType); - } - } catch (JsonParseException e) { - // Fallback processing when failed to parse JSON form response body: - // return the response body string directly for the String return type; - if (returnType.equals(String.class)) { - return (T) body; - } else { - throw (e); - } - } - } - - /** - * Gson TypeAdapter for Byte Array type - */ - public static class ByteArrayAdapter extends TypeAdapter { - - @Override - public void write(JsonWriter out, byte[] value) throws IOException { - if (value == null) { - out.nullValue(); - } else { - out.value(ByteString.of(value).base64()); - } - } - - @Override - public byte[] read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String bytesAsBase64 = in.nextString(); - ByteString byteString = ByteString.decodeBase64(bytesAsBase64); - return byteString.toByteArray(); - } - } - } - - /** - * Gson TypeAdapter for JSR310 OffsetDateTime type - */ - public static class OffsetDateTimeTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public OffsetDateTimeTypeAdapter() { - this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); - } - - public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, OffsetDateTime date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public OffsetDateTime read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - if (date.endsWith("+0000")) { - date = date.substring(0, date.length()-5) + "Z"; - } - return OffsetDateTime.parse(date, formatter); - } - } - } - - /** - * Gson TypeAdapter for JSR310 LocalDate type - */ - public static class LocalDateTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public LocalDateTypeAdapter() { - this(DateTimeFormatter.ISO_LOCAL_DATE); - } - - public LocalDateTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, LocalDate date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public LocalDate read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return LocalDate.parse(date, formatter); - } - } - } - - public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - offsetDateTimeTypeAdapter.setFormat(dateFormat); - } - - public static void setLocalDateFormat(DateTimeFormatter dateFormat) { - localDateTypeAdapter.setFormat(dateFormat); - } - - /** - * Gson TypeAdapter for java.sql.Date type - * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used - * (more efficient than SimpleDateFormat). - */ - public static class SqlDateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public SqlDateTypeAdapter() {} - - public SqlDateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, java.sql.Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = date.toString(); - } - out.value(value); - } - } - - @Override - public java.sql.Date read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return new java.sql.Date(dateFormat.parse(date).getTime()); - } - return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } - } - - /** - * Gson TypeAdapter for java.util.Date type - * If the dateFormat is null, ISO8601Utils will be used. - */ - public static class DateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public DateTypeAdapter() {} - - public DateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = ISO8601Utils.format(date, true); - } - out.value(value); - } - } - - @Override - public Date read(JsonReader in) throws IOException { - try { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return dateFormat.parse(date); - } - return ISO8601Utils.parse(date, new ParsePosition(0)); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } catch (IllegalArgumentException e) { - throw new JsonParseException(e); - } - } - } - - public static void setDateFormat(DateFormat dateFormat) { - dateTypeAdapter.setFormat(dateFormat); - } - - public static void setSqlDateFormat(DateFormat dateFormat) { - sqlDateTypeAdapter.setFormat(dateFormat); - } -} diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/AudienceApi.java b/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/AudienceApi.java deleted file mode 100644 index 12f75926..00000000 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/AudienceApi.java +++ /dev/null @@ -1,869 +0,0 @@ -/* - * Criteo API - * Criteo API - MarketingSolutions - * - * The version of the OpenAPI document: 2023-04 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.criteo.api.marketingsolutions.v2023_04.api; - -import com.criteo.api.marketingsolutions.v2023_04.ApiCallback; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.ApiResponse; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.Pair; -import com.criteo.api.marketingsolutions.v2023_04.ProgressRequestBody; -import com.criteo.api.marketingsolutions.v2023_04.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import com.criteo.api.marketingsolutions.v2023_04.model.ContactlistAmendmentRequest; -import com.criteo.api.marketingsolutions.v2023_04.model.DeleteAudienceContactListResponse; -import com.criteo.api.marketingsolutions.v2023_04.model.DeleteAudienceResponse; -import com.criteo.api.marketingsolutions.v2023_04.model.ErrorCodeResponse; -import com.criteo.api.marketingsolutions.v2023_04.model.GetAudiencesResponse; -import com.criteo.api.marketingsolutions.v2023_04.model.ModifyAudienceResponse; -import com.criteo.api.marketingsolutions.v2023_04.model.NewAudienceRequest; -import com.criteo.api.marketingsolutions.v2023_04.model.NewAudienceResponse; -import com.criteo.api.marketingsolutions.v2023_04.model.ReplaceAudienceRequest; -import com.criteo.api.marketingsolutions.v2023_04.model.ReplaceAudienceResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -public class AudienceApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public AudienceApi() { - this(Configuration.getDefaultApiClient()); - } - - public AudienceApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createAudience - * @param newAudienceRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 The audience was created -
403 Forbidden -
- */ - public okhttp3.Call createAudienceCall(NewAudienceRequest newAudienceRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = newAudienceRequest; - - // create path and map variables - String localVarPath = "/2023-04/audiences"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createAudienceValidateBeforeCall(NewAudienceRequest newAudienceRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'newAudienceRequest' is set - if (newAudienceRequest == null) { - throw new ApiException("Missing the required parameter 'newAudienceRequest' when calling createAudience(Async)"); - } - - return createAudienceCall(newAudienceRequest, _callback); - - } - - /** - * - * Create an Audience for an Advertiser - * @param newAudienceRequest (required) - * @return NewAudienceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 The audience was created -
403 Forbidden -
- */ - public NewAudienceResponse createAudience(NewAudienceRequest newAudienceRequest) throws ApiException { - ApiResponse localVarResp = createAudienceWithHttpInfo(newAudienceRequest); - return localVarResp.getData(); - } - - /** - * - * Create an Audience for an Advertiser - * @param newAudienceRequest (required) - * @return ApiResponse<NewAudienceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 The audience was created -
403 Forbidden -
- */ - public ApiResponse createAudienceWithHttpInfo(NewAudienceRequest newAudienceRequest) throws ApiException { - okhttp3.Call localVarCall = createAudienceValidateBeforeCall(newAudienceRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Create an Audience for an Advertiser - * @param newAudienceRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 The audience was created -
403 Forbidden -
- */ - public okhttp3.Call createAudienceAsync(NewAudienceRequest newAudienceRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createAudienceValidateBeforeCall(newAudienceRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteIdentifiers - * @param audienceId The id of the audience to amend (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 The contactlist was deleted -
403 Forbidden -
- */ - public okhttp3.Call deleteIdentifiersCall(String audienceId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-04/audiences/{audience-id}/contactlist" - .replace("{" + "audience-id" + "}", localVarApiClient.escapeString(audienceId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteIdentifiersValidateBeforeCall(String audienceId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'audienceId' is set - if (audienceId == null) { - throw new ApiException("Missing the required parameter 'audienceId' when calling deleteIdentifiers(Async)"); - } - - return deleteIdentifiersCall(audienceId, _callback); - - } - - /** - * - * Delete all identifiers from a contact list audience-segment. - * @param audienceId The id of the audience to amend (required) - * @return DeleteAudienceContactListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 The contactlist was deleted -
403 Forbidden -
- */ - public DeleteAudienceContactListResponse deleteIdentifiers(String audienceId) throws ApiException { - ApiResponse localVarResp = deleteIdentifiersWithHttpInfo(audienceId); - return localVarResp.getData(); - } - - /** - * - * Delete all identifiers from a contact list audience-segment. - * @param audienceId The id of the audience to amend (required) - * @return ApiResponse<DeleteAudienceContactListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 The contactlist was deleted -
403 Forbidden -
- */ - public ApiResponse deleteIdentifiersWithHttpInfo(String audienceId) throws ApiException { - okhttp3.Call localVarCall = deleteIdentifiersValidateBeforeCall(audienceId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Delete all identifiers from a contact list audience-segment. - * @param audienceId The id of the audience to amend (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 The contactlist was deleted -
403 Forbidden -
- */ - public okhttp3.Call deleteIdentifiersAsync(String audienceId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteIdentifiersValidateBeforeCall(audienceId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getAudiences - * @param advertiserId The advertiser id to get all the audiences for. Mandatory for internal users. For external users, if you don't provide it, we will take into account the advertisers from your portfolio (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 The list was retrieved. -
403 Forbidden -
- */ - public okhttp3.Call getAudiencesCall(String advertiserId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-04/audiences"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (advertiserId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("advertiser-id", advertiserId)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getAudiencesValidateBeforeCall(String advertiserId, final ApiCallback _callback) throws ApiException { - return getAudiencesCall(advertiserId, _callback); - - } - - /** - * - * Get a list of all the audiences for the user or for the given advertiser_id - * @param advertiserId The advertiser id to get all the audiences for. Mandatory for internal users. For external users, if you don't provide it, we will take into account the advertisers from your portfolio (optional) - * @return GetAudiencesResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 The list was retrieved. -
403 Forbidden -
- */ - public GetAudiencesResponse getAudiences(String advertiserId) throws ApiException { - ApiResponse localVarResp = getAudiencesWithHttpInfo(advertiserId); - return localVarResp.getData(); - } - - /** - * - * Get a list of all the audiences for the user or for the given advertiser_id - * @param advertiserId The advertiser id to get all the audiences for. Mandatory for internal users. For external users, if you don't provide it, we will take into account the advertisers from your portfolio (optional) - * @return ApiResponse<GetAudiencesResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 The list was retrieved. -
403 Forbidden -
- */ - public ApiResponse getAudiencesWithHttpInfo(String advertiserId) throws ApiException { - okhttp3.Call localVarCall = getAudiencesValidateBeforeCall(advertiserId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Get a list of all the audiences for the user or for the given advertiser_id - * @param advertiserId The advertiser id to get all the audiences for. Mandatory for internal users. For external users, if you don't provide it, we will take into account the advertisers from your portfolio (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 The list was retrieved. -
403 Forbidden -
- */ - public okhttp3.Call getAudiencesAsync(String advertiserId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getAudiencesValidateBeforeCall(advertiserId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for modifyAudience - * @param audienceId The id of the audience to amend (required) - * @param replaceAudienceRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 The audience was updated -
403 Forbidden -
- */ - public okhttp3.Call modifyAudienceCall(String audienceId, ReplaceAudienceRequest replaceAudienceRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = replaceAudienceRequest; - - // create path and map variables - String localVarPath = "/2023-04/audiences/{audience-id}" - .replace("{" + "audience-id" + "}", localVarApiClient.escapeString(audienceId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call modifyAudienceValidateBeforeCall(String audienceId, ReplaceAudienceRequest replaceAudienceRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'audienceId' is set - if (audienceId == null) { - throw new ApiException("Missing the required parameter 'audienceId' when calling modifyAudience(Async)"); - } - - // verify the required parameter 'replaceAudienceRequest' is set - if (replaceAudienceRequest == null) { - throw new ApiException("Missing the required parameter 'replaceAudienceRequest' when calling modifyAudience(Async)"); - } - - return modifyAudienceCall(audienceId, replaceAudienceRequest, _callback); - - } - - /** - * - * Update user audience specified by the audience id - * @param audienceId The id of the audience to amend (required) - * @param replaceAudienceRequest (required) - * @return ReplaceAudienceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 The audience was updated -
403 Forbidden -
- */ - public ReplaceAudienceResponse modifyAudience(String audienceId, ReplaceAudienceRequest replaceAudienceRequest) throws ApiException { - ApiResponse localVarResp = modifyAudienceWithHttpInfo(audienceId, replaceAudienceRequest); - return localVarResp.getData(); - } - - /** - * - * Update user audience specified by the audience id - * @param audienceId The id of the audience to amend (required) - * @param replaceAudienceRequest (required) - * @return ApiResponse<ReplaceAudienceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 The audience was updated -
403 Forbidden -
- */ - public ApiResponse modifyAudienceWithHttpInfo(String audienceId, ReplaceAudienceRequest replaceAudienceRequest) throws ApiException { - okhttp3.Call localVarCall = modifyAudienceValidateBeforeCall(audienceId, replaceAudienceRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Update user audience specified by the audience id - * @param audienceId The id of the audience to amend (required) - * @param replaceAudienceRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 The audience was updated -
403 Forbidden -
- */ - public okhttp3.Call modifyAudienceAsync(String audienceId, ReplaceAudienceRequest replaceAudienceRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = modifyAudienceValidateBeforeCall(audienceId, replaceAudienceRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for modifyAudienceUsers - * @param audienceId The id of the audience to amend (required) - * @param contactlistAmendmentRequest (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Summary of created request -
403 Forbidden -
404 Audience 123 not found -
- */ - public okhttp3.Call modifyAudienceUsersCall(String audienceId, ContactlistAmendmentRequest contactlistAmendmentRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = contactlistAmendmentRequest; - - // create path and map variables - String localVarPath = "/2023-04/audiences/{audience-id}/contactlist" - .replace("{" + "audience-id" + "}", localVarApiClient.escapeString(audienceId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call modifyAudienceUsersValidateBeforeCall(String audienceId, ContactlistAmendmentRequest contactlistAmendmentRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'audienceId' is set - if (audienceId == null) { - throw new ApiException("Missing the required parameter 'audienceId' when calling modifyAudienceUsers(Async)"); - } - - // verify the required parameter 'contactlistAmendmentRequest' is set - if (contactlistAmendmentRequest == null) { - throw new ApiException("Missing the required parameter 'contactlistAmendmentRequest' when calling modifyAudienceUsers(Async)"); - } - - return modifyAudienceUsersCall(audienceId, contactlistAmendmentRequest, _callback); - - } - - /** - * - * Add/remove users to or from a contact list audience-segment. - * @param audienceId The id of the audience to amend (required) - * @param contactlistAmendmentRequest (required) - * @return ModifyAudienceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Summary of created request -
403 Forbidden -
404 Audience 123 not found -
- */ - public ModifyAudienceResponse modifyAudienceUsers(String audienceId, ContactlistAmendmentRequest contactlistAmendmentRequest) throws ApiException { - ApiResponse localVarResp = modifyAudienceUsersWithHttpInfo(audienceId, contactlistAmendmentRequest); - return localVarResp.getData(); - } - - /** - * - * Add/remove users to or from a contact list audience-segment. - * @param audienceId The id of the audience to amend (required) - * @param contactlistAmendmentRequest (required) - * @return ApiResponse<ModifyAudienceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Summary of created request -
403 Forbidden -
404 Audience 123 not found -
- */ - public ApiResponse modifyAudienceUsersWithHttpInfo(String audienceId, ContactlistAmendmentRequest contactlistAmendmentRequest) throws ApiException { - okhttp3.Call localVarCall = modifyAudienceUsersValidateBeforeCall(audienceId, contactlistAmendmentRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Add/remove users to or from a contact list audience-segment. - * @param audienceId The id of the audience to amend (required) - * @param contactlistAmendmentRequest (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Summary of created request -
403 Forbidden -
404 Audience 123 not found -
- */ - public okhttp3.Call modifyAudienceUsersAsync(String audienceId, ContactlistAmendmentRequest contactlistAmendmentRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = modifyAudienceUsersValidateBeforeCall(audienceId, contactlistAmendmentRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for removeAudience - * @param audienceId The id of the audience to amend (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 The audience was deleted -
403 Forbidden -
- */ - public okhttp3.Call removeAudienceCall(String audienceId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-04/audiences/{audience-id}" - .replace("{" + "audience-id" + "}", localVarApiClient.escapeString(audienceId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call removeAudienceValidateBeforeCall(String audienceId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'audienceId' is set - if (audienceId == null) { - throw new ApiException("Missing the required parameter 'audienceId' when calling removeAudience(Async)"); - } - - return removeAudienceCall(audienceId, _callback); - - } - - /** - * - * Delete an audience by id - * @param audienceId The id of the audience to amend (required) - * @return DeleteAudienceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 The audience was deleted -
403 Forbidden -
- */ - public DeleteAudienceResponse removeAudience(String audienceId) throws ApiException { - ApiResponse localVarResp = removeAudienceWithHttpInfo(audienceId); - return localVarResp.getData(); - } - - /** - * - * Delete an audience by id - * @param audienceId The id of the audience to amend (required) - * @return ApiResponse<DeleteAudienceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 The audience was deleted -
403 Forbidden -
- */ - public ApiResponse removeAudienceWithHttpInfo(String audienceId) throws ApiException { - okhttp3.Call localVarCall = removeAudienceValidateBeforeCall(audienceId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Delete an audience by id - * @param audienceId The id of the audience to amend (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 The audience was deleted -
403 Forbidden -
- */ - public okhttp3.Call removeAudienceAsync(String audienceId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = removeAudienceValidateBeforeCall(audienceId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/DeleteAudienceResponse.java b/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/DeleteAudienceResponse.java deleted file mode 100644 index 60a33a20..00000000 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/DeleteAudienceResponse.java +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Criteo API - * Criteo API - MarketingSolutions - * - * The version of the OpenAPI document: 2023-04 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.criteo.api.marketingsolutions.v2023_04.model; - -import java.util.Objects; -import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceError; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceWarning; -import com.criteo.api.marketingsolutions.v2023_04.model.BasicAudienceDefinition; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.criteo.api.marketingsolutions.v2023_04.JSON; - -/** - * Response of an audience deletion - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeleteAudienceResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private BasicAudienceDefinition data; - - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - private List errors = new ArrayList<>(); - - public static final String SERIALIZED_NAME_WARNINGS = "warnings"; - @SerializedName(SERIALIZED_NAME_WARNINGS) - private List warnings = new ArrayList<>(); - - public DeleteAudienceResponse() { - } - - public DeleteAudienceResponse data(BasicAudienceDefinition data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - - public BasicAudienceDefinition getData() { - return data; - } - - - public void setData(BasicAudienceDefinition data) { - this.data = data; - } - - - public DeleteAudienceResponse errors(List errors) { - - this.errors = errors; - return this; - } - - public DeleteAudienceResponse addErrorsItem(AudienceError errorsItem) { - this.errors.add(errorsItem); - return this; - } - - /** - * Get errors - * @return errors - **/ - @javax.annotation.Nonnull - - public List getErrors() { - return errors; - } - - - public void setErrors(List errors) { - this.errors = errors; - } - - - public DeleteAudienceResponse warnings(List warnings) { - - this.warnings = warnings; - return this; - } - - public DeleteAudienceResponse addWarningsItem(AudienceWarning warningsItem) { - this.warnings.add(warningsItem); - return this; - } - - /** - * Get warnings - * @return warnings - **/ - @javax.annotation.Nonnull - - public List getWarnings() { - return warnings; - } - - - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeleteAudienceResponse instance itself - */ - public DeleteAudienceResponse putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeleteAudienceResponse deleteAudienceResponse = (DeleteAudienceResponse) o; - return Objects.equals(this.data, deleteAudienceResponse.data) && - Objects.equals(this.errors, deleteAudienceResponse.errors) && - Objects.equals(this.warnings, deleteAudienceResponse.warnings)&& - Objects.equals(this.additionalProperties, deleteAudienceResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, errors, warnings, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeleteAudienceResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("errors"); - openapiFields.add("warnings"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("errors"); - openapiRequiredFields.add("warnings"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DeleteAudienceResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DeleteAudienceResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DeleteAudienceResponse is not found in the empty JSON string", DeleteAudienceResponse.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DeleteAudienceResponse.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); - } - } - // validate the required field `data` - BasicAudienceDefinition.validateJsonObject(jsonObj.getAsJsonObject("data")); - // ensure the json data is an array - if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); - // validate the required field `errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - AudienceError.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); - }; - // ensure the json data is an array - if (!jsonObj.get("warnings").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); - } - - JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); - // validate the required field `warnings` (array) - for (int i = 0; i < jsonArraywarnings.size(); i++) { - AudienceWarning.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeleteAudienceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeleteAudienceResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeleteAudienceResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeleteAudienceResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeleteAudienceResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - DeleteAudienceResponse instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeleteAudienceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeleteAudienceResponse - * @throws IOException if the JSON string is invalid with respect to DeleteAudienceResponse - */ - public static DeleteAudienceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeleteAudienceResponse.class); - } - - /** - * Convert an instance of DeleteAudienceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/GetAudiencesResponse.java b/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/GetAudiencesResponse.java deleted file mode 100644 index d4f15d24..00000000 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/GetAudiencesResponse.java +++ /dev/null @@ -1,395 +0,0 @@ -/* - * Criteo API - * Criteo API - MarketingSolutions - * - * The version of the OpenAPI document: 2023-04 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.criteo.api.marketingsolutions.v2023_04.model; - -import java.util.Objects; -import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.Audience; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceError; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceWarning; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.criteo.api.marketingsolutions.v2023_04.JSON; - -/** - * Body of the GET audience operation - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class GetAudiencesResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); - - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - private List errors = new ArrayList<>(); - - public static final String SERIALIZED_NAME_WARNINGS = "warnings"; - @SerializedName(SERIALIZED_NAME_WARNINGS) - private List warnings = new ArrayList<>(); - - public GetAudiencesResponse() { - } - - public GetAudiencesResponse data(List data) { - - this.data = data; - return this; - } - - public GetAudiencesResponse addDataItem(Audience dataItem) { - this.data.add(dataItem); - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - - public List getData() { - return data; - } - - - public void setData(List data) { - this.data = data; - } - - - public GetAudiencesResponse errors(List errors) { - - this.errors = errors; - return this; - } - - public GetAudiencesResponse addErrorsItem(AudienceError errorsItem) { - this.errors.add(errorsItem); - return this; - } - - /** - * Get errors - * @return errors - **/ - @javax.annotation.Nonnull - - public List getErrors() { - return errors; - } - - - public void setErrors(List errors) { - this.errors = errors; - } - - - public GetAudiencesResponse warnings(List warnings) { - - this.warnings = warnings; - return this; - } - - public GetAudiencesResponse addWarningsItem(AudienceWarning warningsItem) { - this.warnings.add(warningsItem); - return this; - } - - /** - * Get warnings - * @return warnings - **/ - @javax.annotation.Nonnull - - public List getWarnings() { - return warnings; - } - - - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the GetAudiencesResponse instance itself - */ - public GetAudiencesResponse putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GetAudiencesResponse getAudiencesResponse = (GetAudiencesResponse) o; - return Objects.equals(this.data, getAudiencesResponse.data) && - Objects.equals(this.errors, getAudiencesResponse.errors) && - Objects.equals(this.warnings, getAudiencesResponse.warnings)&& - Objects.equals(this.additionalProperties, getAudiencesResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, errors, warnings, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetAudiencesResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("errors"); - openapiFields.add("warnings"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("errors"); - openapiRequiredFields.add("warnings"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to GetAudiencesResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!GetAudiencesResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GetAudiencesResponse is not found in the empty JSON string", GetAudiencesResponse.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GetAudiencesResponse.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); - } - } - // ensure the json data is an array - if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); - } - - JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); - // validate the required field `data` (array) - for (int i = 0; i < jsonArraydata.size(); i++) { - Audience.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); - }; - // ensure the json data is an array - if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); - // validate the required field `errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - AudienceError.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); - }; - // ensure the json data is an array - if (!jsonObj.get("warnings").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); - } - - JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); - // validate the required field `warnings` (array) - for (int i = 0; i < jsonArraywarnings.size(); i++) { - AudienceWarning.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetAudiencesResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetAudiencesResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetAudiencesResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GetAudiencesResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public GetAudiencesResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - GetAudiencesResponse instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of GetAudiencesResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetAudiencesResponse - * @throws IOException if the JSON string is invalid with respect to GetAudiencesResponse - */ - public static GetAudiencesResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetAudiencesResponse.class); - } - - /** - * Convert an instance of GetAudiencesResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudienceResponse.java b/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudienceResponse.java deleted file mode 100644 index 00e6a489..00000000 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudienceResponse.java +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Criteo API - * Criteo API - MarketingSolutions - * - * The version of the OpenAPI document: 2023-04 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.criteo.api.marketingsolutions.v2023_04.model; - -import java.util.Objects; -import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceError; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceWarning; -import com.criteo.api.marketingsolutions.v2023_04.model.BasicAudienceDefinition; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import com.criteo.api.marketingsolutions.v2023_04.JSON; - -/** - * Response of an audience replacement - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReplaceAudienceResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private BasicAudienceDefinition data; - - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - private List errors = new ArrayList<>(); - - public static final String SERIALIZED_NAME_WARNINGS = "warnings"; - @SerializedName(SERIALIZED_NAME_WARNINGS) - private List warnings = new ArrayList<>(); - - public ReplaceAudienceResponse() { - } - - public ReplaceAudienceResponse data(BasicAudienceDefinition data) { - - this.data = data; - return this; - } - - /** - * Get data - * @return data - **/ - @javax.annotation.Nonnull - - public BasicAudienceDefinition getData() { - return data; - } - - - public void setData(BasicAudienceDefinition data) { - this.data = data; - } - - - public ReplaceAudienceResponse errors(List errors) { - - this.errors = errors; - return this; - } - - public ReplaceAudienceResponse addErrorsItem(AudienceError errorsItem) { - this.errors.add(errorsItem); - return this; - } - - /** - * Get errors - * @return errors - **/ - @javax.annotation.Nonnull - - public List getErrors() { - return errors; - } - - - public void setErrors(List errors) { - this.errors = errors; - } - - - public ReplaceAudienceResponse warnings(List warnings) { - - this.warnings = warnings; - return this; - } - - public ReplaceAudienceResponse addWarningsItem(AudienceWarning warningsItem) { - this.warnings.add(warningsItem); - return this; - } - - /** - * Get warnings - * @return warnings - **/ - @javax.annotation.Nonnull - - public List getWarnings() { - return warnings; - } - - - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ReplaceAudienceResponse instance itself - */ - public ReplaceAudienceResponse putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReplaceAudienceResponse replaceAudienceResponse = (ReplaceAudienceResponse) o; - return Objects.equals(this.data, replaceAudienceResponse.data) && - Objects.equals(this.errors, replaceAudienceResponse.errors) && - Objects.equals(this.warnings, replaceAudienceResponse.warnings)&& - Objects.equals(this.additionalProperties, replaceAudienceResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, errors, warnings, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReplaceAudienceResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("errors"); - openapiFields.add("warnings"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("errors"); - openapiRequiredFields.add("warnings"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReplaceAudienceResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ReplaceAudienceResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReplaceAudienceResponse is not found in the empty JSON string", ReplaceAudienceResponse.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReplaceAudienceResponse.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); - } - } - // validate the required field `data` - BasicAudienceDefinition.validateJsonObject(jsonObj.getAsJsonObject("data")); - // ensure the json data is an array - if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); - // validate the required field `errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - AudienceError.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); - }; - // ensure the json data is an array - if (!jsonObj.get("warnings").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); - } - - JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); - // validate the required field `warnings` (array) - for (int i = 0; i < jsonArraywarnings.size(); i++) { - AudienceWarning.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); - }; - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReplaceAudienceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReplaceAudienceResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReplaceAudienceResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReplaceAudienceResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ReplaceAudienceResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ReplaceAudienceResponse instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReplaceAudienceResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReplaceAudienceResponse - * @throws IOException if the JSON string is invalid with respect to ReplaceAudienceResponse - */ - public static ReplaceAudienceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReplaceAudienceResponse.class); - } - - /** - * Convert an instance of ReplaceAudienceResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/sdks/marketingsolutions_2023-07/README.md b/sdks/marketingsolutions_2023-07/README.md index 068ebc17..588e638d 100644 --- a/sdks/marketingsolutions_2023-07/README.md +++ b/sdks/marketingsolutions_2023-07/README.md @@ -8,7 +8,7 @@ More information: [https://developers.criteo.com/](https://developers.criteo.com Criteo API -- Package version: 2023.07.0.240626 +- Package version: 2023.07.0.240731 *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -38,7 +38,7 @@ Add this dependency to your project's POM: com.criteo criteo-api-marketingsolutions-sdk - 2023.07.0.240626 + 2023.07.0.240731 compile ``` @@ -48,7 +48,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.criteo:criteo-api-marketingsolutions-sdk:2023.07.0.240626" +compile "com.criteo:criteo-api-marketingsolutions-sdk:2023.07.0.240731" ``` ### Others @@ -61,7 +61,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* `build/libs/criteo-api-marketingsolutions-sdk-2023.07.0.240626.jar` +* `build/libs/criteo-api-marketingsolutions-sdk-2023.07.0.240731.jar` ## Example diff --git a/sdks/marketingsolutions_2023-07/api/openapi.yaml b/sdks/marketingsolutions_2023-07/api/openapi.yaml index 0a9ee4b1..98b30759 100644 --- a/sdks/marketingsolutions_2023-07/api/openapi.yaml +++ b/sdks/marketingsolutions_2023-07/api/openapi.yaml @@ -4239,7 +4239,8 @@ components: type: string type: object ApplicationSummaryModelResponse: - description: Response of ApplicationSummaryModel + description: A top-level object that encapsulates a Criteo API response for + a single value example: data: attributes: @@ -4300,17 +4301,16 @@ components: nullable: true readOnly: true type: array - uniqueItems: false errors: items: $ref: '#/components/schemas/CommonProblem' nullable: true readOnly: true type: array - uniqueItems: false type: object ApplicationSummaryModelResource: - description: A class that represents a ValueType in a guild compliant way + description: A top-level object that encapsulates a Criteo API response for + a single value example: attributes: organizationId: 6 @@ -4327,7 +4327,7 @@ components: $ref: '#/components/schemas/ApplicationSummaryModel' type: object CommonProblem: - description: Common problem object. Can be specialized as needed. + description: Common problem object. example: traceId: traceId traceIdentifier: traceIdentifier @@ -4363,7 +4363,7 @@ components: nullable: true type: string code: - description: "A machine-readable error code, expressed as a string value." + description: "A machine-readable error code, expressed as a string value." nullable: true type: string instance: @@ -4391,7 +4391,8 @@ components: type: string type: object ApplicationSummaryModel: - description: Model of ApplicationSummary + description: Used for the /me endpoint. Contains information about the currently + authenticated application that we accept to give to our clients example: organizationId: 6 name: name @@ -13314,7 +13315,6 @@ components: required: - bodyTextColor - callsToAction - - creativeBackgrounColor - logoBase64String - pricesColor - productImageDisplay @@ -14511,6 +14511,7 @@ components: - identityLink - gum - customerid + - phoneNumber nullable: true type: string identifiers: diff --git a/sdks/marketingsolutions_2023-07/build.gradle b/sdks/marketingsolutions_2023-07/build.gradle index 70ed205c..62d8d886 100644 --- a/sdks/marketingsolutions_2023-07/build.gradle +++ b/sdks/marketingsolutions_2023-07/build.gradle @@ -23,7 +23,7 @@ if (JavaVersion.current().isJava8Compatible()) { } group = 'com.criteo' -version = '2023.07.0.240626' +version = '2023.07.0.240731' repositories { jcenter() @@ -74,7 +74,7 @@ publishing { mavenJava(MavenPublication) { groupId 'com.criteo' artifactId 'criteo-api-marketingsolutions-sdk' - version '2023.07.0.240626' + version '2023.07.0.240731' from components.java artifact sourcesJar artifact javadocJar diff --git a/sdks/marketingsolutions_2023-07/docs/ApplicationSummaryModel.md b/sdks/marketingsolutions_2023-07/docs/ApplicationSummaryModel.md index 704b26ad..d5e84458 100644 --- a/sdks/marketingsolutions_2023-07/docs/ApplicationSummaryModel.md +++ b/sdks/marketingsolutions_2023-07/docs/ApplicationSummaryModel.md @@ -2,7 +2,7 @@ # ApplicationSummaryModel -Model of ApplicationSummary +Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients ## Properties diff --git a/sdks/marketingsolutions_2023-07/docs/ApplicationSummaryModelResource.md b/sdks/marketingsolutions_2023-07/docs/ApplicationSummaryModelResource.md index 81ed2c97..af688c5d 100644 --- a/sdks/marketingsolutions_2023-07/docs/ApplicationSummaryModelResource.md +++ b/sdks/marketingsolutions_2023-07/docs/ApplicationSummaryModelResource.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResource -A class that represents a ValueType in a guild compliant way +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/marketingsolutions_2023-07/docs/ApplicationSummaryModelResponse.md b/sdks/marketingsolutions_2023-07/docs/ApplicationSummaryModelResponse.md index 47b6bd74..658b5549 100644 --- a/sdks/marketingsolutions_2023-07/docs/ApplicationSummaryModelResponse.md +++ b/sdks/marketingsolutions_2023-07/docs/ApplicationSummaryModelResponse.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResponse -Response of ApplicationSummaryModel +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/marketingsolutions_2023-07/docs/CommonProblem.md b/sdks/marketingsolutions_2023-07/docs/CommonProblem.md index 1ee7a1f1..3f7f164b 100644 --- a/sdks/marketingsolutions_2023-07/docs/CommonProblem.md +++ b/sdks/marketingsolutions_2023-07/docs/CommonProblem.md @@ -2,7 +2,7 @@ # CommonProblem -Common problem object. Can be specialized as needed. +Common problem object. ## Properties @@ -11,7 +11,7 @@ Common problem object. Can be specialized as needed. |**traceId** | **String** | The request correlation ID this problem comes from. | [optional] | |**traceIdentifier** | **String** | The request correlation ID this problem comes from. (deprecated, use traceId instead) | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The problem's category. | [optional] | -|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | +|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | |**instance** | **String** | A URI that identifies the specific occurrence of the problem. | [optional] | |**title** | **String** | A short human-readable description of the problem type | [optional] | |**detail** | **String** | A human-readable explanation specific to this occurrence of the problem | [optional] | diff --git a/sdks/marketingsolutions_2023-07/docs/ContactlistAmendmentAttributes.md b/sdks/marketingsolutions_2023-07/docs/ContactlistAmendmentAttributes.md index 2315fdd4..f0a2c263 100644 --- a/sdks/marketingsolutions_2023-07/docs/ContactlistAmendmentAttributes.md +++ b/sdks/marketingsolutions_2023-07/docs/ContactlistAmendmentAttributes.md @@ -33,6 +33,7 @@ the name of the entity type | IDENTITYLINK | "identityLink" | | GUM | "gum" | | CUSTOMERID | "customerid" | +| PHONENUMBER | "phoneNumber" | diff --git a/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/ApiClient.java b/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/ApiClient.java index 8d4a3978..1a777363 100644 --- a/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/ApiClient.java +++ b/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/ApiClient.java @@ -213,7 +213,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2023.07.0.240626/java"); + setUserAgent("OpenAPI-Generator/2023.07.0.240731/java"); authentications = new HashMap(); } diff --git a/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ApplicationSummaryModel.java b/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ApplicationSummaryModel.java index 20a8e7fa..c0b04fe8 100644 --- a/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ApplicationSummaryModel.java +++ b/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ApplicationSummaryModel.java @@ -45,7 +45,7 @@ import com.criteo.api.marketingsolutions.v2023_07.JSON; /** - * Model of ApplicationSummary + * Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModel { diff --git a/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ApplicationSummaryModelResource.java b/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ApplicationSummaryModelResource.java index ac77eaee..4f1391bf 100644 --- a/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ApplicationSummaryModelResource.java +++ b/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ApplicationSummaryModelResource.java @@ -46,7 +46,7 @@ import com.criteo.api.marketingsolutions.v2023_07.JSON; /** - * A class that represents a ValueType in a guild compliant way + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResource { diff --git a/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ApplicationSummaryModelResponse.java b/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ApplicationSummaryModelResponse.java index 654db68f..682dd4fb 100644 --- a/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ApplicationSummaryModelResponse.java +++ b/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ApplicationSummaryModelResponse.java @@ -49,7 +49,7 @@ import com.criteo.api.marketingsolutions.v2023_07.JSON; /** - * Response of ApplicationSummaryModel + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResponse { diff --git a/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/CommonProblem.java b/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/CommonProblem.java index a6065d01..ca91cb6d 100644 --- a/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/CommonProblem.java +++ b/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/CommonProblem.java @@ -47,7 +47,7 @@ import com.criteo.api.marketingsolutions.v2023_07.JSON; /** - * Common problem object. Can be specialized as needed. + * Common problem object. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CommonProblem { @@ -222,7 +222,7 @@ public CommonProblem code(String code) { } /** - * A machine-readable error code, expressed as a string value. + * A machine-readable error code, expressed as a string value. * @return code **/ @javax.annotation.Nullable diff --git a/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ContactlistAmendmentAttributes.java b/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ContactlistAmendmentAttributes.java index 6541a037..45ac1520 100644 --- a/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ContactlistAmendmentAttributes.java +++ b/sdks/marketingsolutions_2023-07/src/main/java/com/criteo/api/marketingsolutions/v2023_07/model/ContactlistAmendmentAttributes.java @@ -115,7 +115,9 @@ public enum IdentifierTypeEnum { GUM("gum"), - CUSTOMERID("customerid"); + CUSTOMERID("customerid"), + + PHONENUMBER("phoneNumber"); private String value; diff --git a/sdks/marketingsolutions_2023-10/README.md b/sdks/marketingsolutions_2023-10/README.md index 0a2a884b..6a7c964d 100644 --- a/sdks/marketingsolutions_2023-10/README.md +++ b/sdks/marketingsolutions_2023-10/README.md @@ -8,7 +8,7 @@ More information: [https://developers.criteo.com/](https://developers.criteo.com Criteo API -- Package version: 2023.10.0.240626 +- Package version: 2023.10.0.240731 *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -38,7 +38,7 @@ Add this dependency to your project's POM: com.criteo criteo-api-marketingsolutions-sdk - 2023.10.0.240626 + 2023.10.0.240731 compile ``` @@ -48,7 +48,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.criteo:criteo-api-marketingsolutions-sdk:2023.10.0.240626" +compile "com.criteo:criteo-api-marketingsolutions-sdk:2023.10.0.240731" ``` ### Others @@ -61,7 +61,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* `build/libs/criteo-api-marketingsolutions-sdk-2023.10.0.240626.jar` +* `build/libs/criteo-api-marketingsolutions-sdk-2023.10.0.240731.jar` ## Example diff --git a/sdks/marketingsolutions_2023-10/api/openapi.yaml b/sdks/marketingsolutions_2023-10/api/openapi.yaml index 48edde8f..b653ecc1 100644 --- a/sdks/marketingsolutions_2023-10/api/openapi.yaml +++ b/sdks/marketingsolutions_2023-10/api/openapi.yaml @@ -3611,7 +3611,8 @@ components: type: string type: object ApplicationSummaryModelResponse: - description: Response of ApplicationSummaryModel + description: A top-level object that encapsulates a Criteo API response for + a single value example: data: attributes: @@ -3672,17 +3673,16 @@ components: nullable: true readOnly: true type: array - uniqueItems: false errors: items: $ref: '#/components/schemas/CommonProblem' nullable: true readOnly: true type: array - uniqueItems: false type: object ApplicationSummaryModelResource: - description: A class that represents a ValueType in a guild compliant way + description: A top-level object that encapsulates a Criteo API response for + a single value example: attributes: organizationId: 6 @@ -3699,7 +3699,7 @@ components: $ref: '#/components/schemas/ApplicationSummaryModel' type: object CommonProblem: - description: Common problem object. Can be specialized as needed. + description: Common problem object. example: traceId: traceId traceIdentifier: traceIdentifier @@ -3735,7 +3735,7 @@ components: nullable: true type: string code: - description: "A machine-readable error code, expressed as a string value." + description: "A machine-readable error code, expressed as a string value." nullable: true type: string instance: @@ -3763,7 +3763,8 @@ components: type: string type: object ApplicationSummaryModel: - description: Model of ApplicationSummary + description: Used for the /me endpoint. Contains information about the currently + authenticated application that we accept to give to our clients example: organizationId: 6 name: name @@ -12686,7 +12687,6 @@ components: required: - bodyTextColor - callsToAction - - creativeBackgrounColor - logoBase64String - pricesColor - productImageDisplay @@ -13814,6 +13814,7 @@ components: - identityLink - gum - customerid + - phoneNumber nullable: true type: string identifiers: diff --git a/sdks/marketingsolutions_2023-10/build.gradle b/sdks/marketingsolutions_2023-10/build.gradle index 991c9a9f..3fb31ee7 100644 --- a/sdks/marketingsolutions_2023-10/build.gradle +++ b/sdks/marketingsolutions_2023-10/build.gradle @@ -23,7 +23,7 @@ if (JavaVersion.current().isJava8Compatible()) { } group = 'com.criteo' -version = '2023.10.0.240626' +version = '2023.10.0.240731' repositories { jcenter() @@ -74,7 +74,7 @@ publishing { mavenJava(MavenPublication) { groupId 'com.criteo' artifactId 'criteo-api-marketingsolutions-sdk' - version '2023.10.0.240626' + version '2023.10.0.240731' from components.java artifact sourcesJar artifact javadocJar diff --git a/sdks/marketingsolutions_2023-10/docs/ApplicationSummaryModel.md b/sdks/marketingsolutions_2023-10/docs/ApplicationSummaryModel.md index 704b26ad..d5e84458 100644 --- a/sdks/marketingsolutions_2023-10/docs/ApplicationSummaryModel.md +++ b/sdks/marketingsolutions_2023-10/docs/ApplicationSummaryModel.md @@ -2,7 +2,7 @@ # ApplicationSummaryModel -Model of ApplicationSummary +Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients ## Properties diff --git a/sdks/marketingsolutions_2023-10/docs/ApplicationSummaryModelResource.md b/sdks/marketingsolutions_2023-10/docs/ApplicationSummaryModelResource.md index 81ed2c97..af688c5d 100644 --- a/sdks/marketingsolutions_2023-10/docs/ApplicationSummaryModelResource.md +++ b/sdks/marketingsolutions_2023-10/docs/ApplicationSummaryModelResource.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResource -A class that represents a ValueType in a guild compliant way +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/marketingsolutions_2023-10/docs/ApplicationSummaryModelResponse.md b/sdks/marketingsolutions_2023-10/docs/ApplicationSummaryModelResponse.md index 47b6bd74..658b5549 100644 --- a/sdks/marketingsolutions_2023-10/docs/ApplicationSummaryModelResponse.md +++ b/sdks/marketingsolutions_2023-10/docs/ApplicationSummaryModelResponse.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResponse -Response of ApplicationSummaryModel +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/marketingsolutions_2023-10/docs/CommonProblem.md b/sdks/marketingsolutions_2023-10/docs/CommonProblem.md index 1ee7a1f1..3f7f164b 100644 --- a/sdks/marketingsolutions_2023-10/docs/CommonProblem.md +++ b/sdks/marketingsolutions_2023-10/docs/CommonProblem.md @@ -2,7 +2,7 @@ # CommonProblem -Common problem object. Can be specialized as needed. +Common problem object. ## Properties @@ -11,7 +11,7 @@ Common problem object. Can be specialized as needed. |**traceId** | **String** | The request correlation ID this problem comes from. | [optional] | |**traceIdentifier** | **String** | The request correlation ID this problem comes from. (deprecated, use traceId instead) | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The problem's category. | [optional] | -|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | +|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | |**instance** | **String** | A URI that identifies the specific occurrence of the problem. | [optional] | |**title** | **String** | A short human-readable description of the problem type | [optional] | |**detail** | **String** | A human-readable explanation specific to this occurrence of the problem | [optional] | diff --git a/sdks/marketingsolutions_2023-10/docs/ContactlistAmendmentAttributes.md b/sdks/marketingsolutions_2023-10/docs/ContactlistAmendmentAttributes.md index 2315fdd4..f0a2c263 100644 --- a/sdks/marketingsolutions_2023-10/docs/ContactlistAmendmentAttributes.md +++ b/sdks/marketingsolutions_2023-10/docs/ContactlistAmendmentAttributes.md @@ -33,6 +33,7 @@ the name of the entity type | IDENTITYLINK | "identityLink" | | GUM | "gum" | | CUSTOMERID | "customerid" | +| PHONENUMBER | "phoneNumber" | diff --git a/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/ApiClient.java b/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/ApiClient.java index a9a17b9c..e431d4c2 100644 --- a/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/ApiClient.java +++ b/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/ApiClient.java @@ -213,7 +213,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2023.10.0.240626/java"); + setUserAgent("OpenAPI-Generator/2023.10.0.240731/java"); authentications = new HashMap(); } diff --git a/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ApplicationSummaryModel.java b/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ApplicationSummaryModel.java index f0887a09..f641df2e 100644 --- a/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ApplicationSummaryModel.java +++ b/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ApplicationSummaryModel.java @@ -45,7 +45,7 @@ import com.criteo.api.marketingsolutions.v2023_10.JSON; /** - * Model of ApplicationSummary + * Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModel { diff --git a/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ApplicationSummaryModelResource.java b/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ApplicationSummaryModelResource.java index 6d5392ca..ab749404 100644 --- a/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ApplicationSummaryModelResource.java +++ b/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ApplicationSummaryModelResource.java @@ -46,7 +46,7 @@ import com.criteo.api.marketingsolutions.v2023_10.JSON; /** - * A class that represents a ValueType in a guild compliant way + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResource { diff --git a/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ApplicationSummaryModelResponse.java b/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ApplicationSummaryModelResponse.java index 952a2c45..9b845f83 100644 --- a/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ApplicationSummaryModelResponse.java +++ b/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ApplicationSummaryModelResponse.java @@ -49,7 +49,7 @@ import com.criteo.api.marketingsolutions.v2023_10.JSON; /** - * Response of ApplicationSummaryModel + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResponse { diff --git a/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/CommonProblem.java b/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/CommonProblem.java index 6f39a760..4402bdfc 100644 --- a/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/CommonProblem.java +++ b/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/CommonProblem.java @@ -47,7 +47,7 @@ import com.criteo.api.marketingsolutions.v2023_10.JSON; /** - * Common problem object. Can be specialized as needed. + * Common problem object. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CommonProblem { @@ -222,7 +222,7 @@ public CommonProblem code(String code) { } /** - * A machine-readable error code, expressed as a string value. + * A machine-readable error code, expressed as a string value. * @return code **/ @javax.annotation.Nullable diff --git a/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ContactlistAmendmentAttributes.java b/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ContactlistAmendmentAttributes.java index fa19d371..1915c4a1 100644 --- a/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ContactlistAmendmentAttributes.java +++ b/sdks/marketingsolutions_2023-10/src/main/java/com/criteo/api/marketingsolutions/v2023_10/model/ContactlistAmendmentAttributes.java @@ -115,7 +115,9 @@ public enum IdentifierTypeEnum { GUM("gum"), - CUSTOMERID("customerid"); + CUSTOMERID("customerid"), + + PHONENUMBER("phoneNumber"); private String value; diff --git a/sdks/marketingsolutions_2024-01/README.md b/sdks/marketingsolutions_2024-01/README.md index f749d96d..9e5c3d3f 100644 --- a/sdks/marketingsolutions_2024-01/README.md +++ b/sdks/marketingsolutions_2024-01/README.md @@ -8,7 +8,7 @@ More information: [https://developers.criteo.com/](https://developers.criteo.com Criteo API -- Package version: 2024.01.0.240626 +- Package version: 2024.01.0.240731 *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -38,7 +38,7 @@ Add this dependency to your project's POM: com.criteo criteo-api-marketingsolutions-sdk - 2024.01.0.240626 + 2024.01.0.240731 compile ``` @@ -48,7 +48,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.criteo:criteo-api-marketingsolutions-sdk:2024.01.0.240626" +compile "com.criteo:criteo-api-marketingsolutions-sdk:2024.01.0.240731" ``` ### Others @@ -61,7 +61,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* `build/libs/criteo-api-marketingsolutions-sdk-2024.01.0.240626.jar` +* `build/libs/criteo-api-marketingsolutions-sdk-2024.01.0.240731.jar` ## Example diff --git a/sdks/marketingsolutions_2024-01/api/openapi.yaml b/sdks/marketingsolutions_2024-01/api/openapi.yaml index 77c2b3ec..d0da8242 100644 --- a/sdks/marketingsolutions_2024-01/api/openapi.yaml +++ b/sdks/marketingsolutions_2024-01/api/openapi.yaml @@ -3608,7 +3608,8 @@ components: type: string type: object ApplicationSummaryModelResponse: - description: Response of ApplicationSummaryModel + description: A top-level object that encapsulates a Criteo API response for + a single value example: data: attributes: @@ -3669,17 +3670,16 @@ components: nullable: true readOnly: true type: array - uniqueItems: false errors: items: $ref: '#/components/schemas/CommonProblem' nullable: true readOnly: true type: array - uniqueItems: false type: object ApplicationSummaryModelResource: - description: A class that represents a ValueType in a guild compliant way + description: A top-level object that encapsulates a Criteo API response for + a single value example: attributes: organizationId: 6 @@ -3696,7 +3696,7 @@ components: $ref: '#/components/schemas/ApplicationSummaryModel' type: object CommonProblem: - description: Common problem object. Can be specialized as needed. + description: Common problem object. example: traceId: traceId traceIdentifier: traceIdentifier @@ -3732,7 +3732,7 @@ components: nullable: true type: string code: - description: "A machine-readable error code, expressed as a string value." + description: "A machine-readable error code, expressed as a string value." nullable: true type: string instance: @@ -3760,7 +3760,8 @@ components: type: string type: object ApplicationSummaryModel: - description: Model of ApplicationSummary + description: Used for the /me endpoint. Contains information about the currently + authenticated application that we accept to give to our clients example: organizationId: 6 name: name @@ -13068,7 +13069,6 @@ components: required: - bodyTextColor - callsToAction - - creativeBackgrounColor - logoBase64String - pricesColor - productImageDisplay @@ -14196,6 +14196,7 @@ components: - identityLink - gum - customerid + - phoneNumber nullable: true type: string identifiers: diff --git a/sdks/marketingsolutions_2024-01/build.gradle b/sdks/marketingsolutions_2024-01/build.gradle index e82b32df..186cf49c 100644 --- a/sdks/marketingsolutions_2024-01/build.gradle +++ b/sdks/marketingsolutions_2024-01/build.gradle @@ -23,7 +23,7 @@ if (JavaVersion.current().isJava8Compatible()) { } group = 'com.criteo' -version = '2024.01.0.240626' +version = '2024.01.0.240731' repositories { jcenter() @@ -74,7 +74,7 @@ publishing { mavenJava(MavenPublication) { groupId 'com.criteo' artifactId 'criteo-api-marketingsolutions-sdk' - version '2024.01.0.240626' + version '2024.01.0.240731' from components.java artifact sourcesJar artifact javadocJar diff --git a/sdks/marketingsolutions_2024-01/docs/ApplicationSummaryModel.md b/sdks/marketingsolutions_2024-01/docs/ApplicationSummaryModel.md index 704b26ad..d5e84458 100644 --- a/sdks/marketingsolutions_2024-01/docs/ApplicationSummaryModel.md +++ b/sdks/marketingsolutions_2024-01/docs/ApplicationSummaryModel.md @@ -2,7 +2,7 @@ # ApplicationSummaryModel -Model of ApplicationSummary +Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients ## Properties diff --git a/sdks/marketingsolutions_2024-01/docs/ApplicationSummaryModelResource.md b/sdks/marketingsolutions_2024-01/docs/ApplicationSummaryModelResource.md index 81ed2c97..af688c5d 100644 --- a/sdks/marketingsolutions_2024-01/docs/ApplicationSummaryModelResource.md +++ b/sdks/marketingsolutions_2024-01/docs/ApplicationSummaryModelResource.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResource -A class that represents a ValueType in a guild compliant way +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/marketingsolutions_2024-01/docs/ApplicationSummaryModelResponse.md b/sdks/marketingsolutions_2024-01/docs/ApplicationSummaryModelResponse.md index 47b6bd74..658b5549 100644 --- a/sdks/marketingsolutions_2024-01/docs/ApplicationSummaryModelResponse.md +++ b/sdks/marketingsolutions_2024-01/docs/ApplicationSummaryModelResponse.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResponse -Response of ApplicationSummaryModel +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/marketingsolutions_2024-01/docs/CommonProblem.md b/sdks/marketingsolutions_2024-01/docs/CommonProblem.md index 1ee7a1f1..3f7f164b 100644 --- a/sdks/marketingsolutions_2024-01/docs/CommonProblem.md +++ b/sdks/marketingsolutions_2024-01/docs/CommonProblem.md @@ -2,7 +2,7 @@ # CommonProblem -Common problem object. Can be specialized as needed. +Common problem object. ## Properties @@ -11,7 +11,7 @@ Common problem object. Can be specialized as needed. |**traceId** | **String** | The request correlation ID this problem comes from. | [optional] | |**traceIdentifier** | **String** | The request correlation ID this problem comes from. (deprecated, use traceId instead) | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The problem's category. | [optional] | -|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | +|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | |**instance** | **String** | A URI that identifies the specific occurrence of the problem. | [optional] | |**title** | **String** | A short human-readable description of the problem type | [optional] | |**detail** | **String** | A human-readable explanation specific to this occurrence of the problem | [optional] | diff --git a/sdks/marketingsolutions_2024-01/docs/ContactlistAmendmentAttributes.md b/sdks/marketingsolutions_2024-01/docs/ContactlistAmendmentAttributes.md index 2315fdd4..f0a2c263 100644 --- a/sdks/marketingsolutions_2024-01/docs/ContactlistAmendmentAttributes.md +++ b/sdks/marketingsolutions_2024-01/docs/ContactlistAmendmentAttributes.md @@ -33,6 +33,7 @@ the name of the entity type | IDENTITYLINK | "identityLink" | | GUM | "gum" | | CUSTOMERID | "customerid" | +| PHONENUMBER | "phoneNumber" | diff --git a/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/ApiClient.java b/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/ApiClient.java index 0580ee3b..ad0ac992 100644 --- a/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/ApiClient.java +++ b/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/ApiClient.java @@ -213,7 +213,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2024.01.0.240626/java"); + setUserAgent("OpenAPI-Generator/2024.01.0.240731/java"); authentications = new HashMap(); } diff --git a/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ApplicationSummaryModel.java b/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ApplicationSummaryModel.java index cf08a80c..ab526f69 100644 --- a/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ApplicationSummaryModel.java +++ b/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ApplicationSummaryModel.java @@ -45,7 +45,7 @@ import com.criteo.api.marketingsolutions.v2024_01.JSON; /** - * Model of ApplicationSummary + * Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModel { diff --git a/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ApplicationSummaryModelResource.java b/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ApplicationSummaryModelResource.java index 5458e4c6..1e119823 100644 --- a/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ApplicationSummaryModelResource.java +++ b/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ApplicationSummaryModelResource.java @@ -46,7 +46,7 @@ import com.criteo.api.marketingsolutions.v2024_01.JSON; /** - * A class that represents a ValueType in a guild compliant way + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResource { diff --git a/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ApplicationSummaryModelResponse.java b/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ApplicationSummaryModelResponse.java index 4f554de5..bb97ee0f 100644 --- a/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ApplicationSummaryModelResponse.java +++ b/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ApplicationSummaryModelResponse.java @@ -49,7 +49,7 @@ import com.criteo.api.marketingsolutions.v2024_01.JSON; /** - * Response of ApplicationSummaryModel + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResponse { diff --git a/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/CommonProblem.java b/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/CommonProblem.java index d3075836..48c206d5 100644 --- a/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/CommonProblem.java +++ b/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/CommonProblem.java @@ -47,7 +47,7 @@ import com.criteo.api.marketingsolutions.v2024_01.JSON; /** - * Common problem object. Can be specialized as needed. + * Common problem object. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CommonProblem { @@ -222,7 +222,7 @@ public CommonProblem code(String code) { } /** - * A machine-readable error code, expressed as a string value. + * A machine-readable error code, expressed as a string value. * @return code **/ @javax.annotation.Nullable diff --git a/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ContactlistAmendmentAttributes.java b/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ContactlistAmendmentAttributes.java index cc215c70..f41dab6f 100644 --- a/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ContactlistAmendmentAttributes.java +++ b/sdks/marketingsolutions_2024-01/src/main/java/com/criteo/api/marketingsolutions/v2024_01/model/ContactlistAmendmentAttributes.java @@ -115,7 +115,9 @@ public enum IdentifierTypeEnum { GUM("gum"), - CUSTOMERID("customerid"); + CUSTOMERID("customerid"), + + PHONENUMBER("phoneNumber"); private String value; diff --git a/sdks/marketingsolutions_2024-04/README.md b/sdks/marketingsolutions_2024-04/README.md index 7115ca7c..16da7970 100644 --- a/sdks/marketingsolutions_2024-04/README.md +++ b/sdks/marketingsolutions_2024-04/README.md @@ -8,7 +8,7 @@ More information: [https://developers.criteo.com/](https://developers.criteo.com Criteo API -- Package version: 2024.04.0.240626 +- Package version: 2024.04.0.240731 *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -38,7 +38,7 @@ Add this dependency to your project's POM: com.criteo criteo-api-marketingsolutions-sdk - 2024.04.0.240626 + 2024.04.0.240731 compile ``` @@ -48,7 +48,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.criteo:criteo-api-marketingsolutions-sdk:2024.04.0.240626" +compile "com.criteo:criteo-api-marketingsolutions-sdk:2024.04.0.240731" ``` ### Others @@ -61,7 +61,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* `build/libs/criteo-api-marketingsolutions-sdk-2024.04.0.240626.jar` +* `build/libs/criteo-api-marketingsolutions-sdk-2024.04.0.240731.jar` ## Example diff --git a/sdks/marketingsolutions_2024-04/api/openapi.yaml b/sdks/marketingsolutions_2024-04/api/openapi.yaml index c1e90c6d..9ef825bf 100644 --- a/sdks/marketingsolutions_2024-04/api/openapi.yaml +++ b/sdks/marketingsolutions_2024-04/api/openapi.yaml @@ -3608,7 +3608,8 @@ components: type: string type: object ApplicationSummaryModelResponse: - description: Response of ApplicationSummaryModel + description: A top-level object that encapsulates a Criteo API response for + a single value example: data: attributes: @@ -3669,17 +3670,16 @@ components: nullable: true readOnly: true type: array - uniqueItems: false errors: items: $ref: '#/components/schemas/CommonProblem' nullable: true readOnly: true type: array - uniqueItems: false type: object ApplicationSummaryModelResource: - description: A class that represents a ValueType in a guild compliant way + description: A top-level object that encapsulates a Criteo API response for + a single value example: attributes: organizationId: 6 @@ -3696,7 +3696,7 @@ components: $ref: '#/components/schemas/ApplicationSummaryModel' type: object CommonProblem: - description: Common problem object. Can be specialized as needed. + description: Common problem object. example: traceId: traceId traceIdentifier: traceIdentifier @@ -3732,7 +3732,7 @@ components: nullable: true type: string code: - description: "A machine-readable error code, expressed as a string value." + description: "A machine-readable error code, expressed as a string value." nullable: true type: string instance: @@ -3760,7 +3760,8 @@ components: type: string type: object ApplicationSummaryModel: - description: Model of ApplicationSummary + description: Used for the /me endpoint. Contains information about the currently + authenticated application that we accept to give to our clients example: organizationId: 6 name: name @@ -13068,7 +13069,6 @@ components: required: - bodyTextColor - callsToAction - - creativeBackgrounColor - logoBase64String - pricesColor - productImageDisplay @@ -14196,6 +14196,7 @@ components: - identityLink - gum - customerid + - phoneNumber nullable: true type: string identifiers: diff --git a/sdks/marketingsolutions_2024-04/build.gradle b/sdks/marketingsolutions_2024-04/build.gradle index 90d057a9..424c6751 100644 --- a/sdks/marketingsolutions_2024-04/build.gradle +++ b/sdks/marketingsolutions_2024-04/build.gradle @@ -23,7 +23,7 @@ if (JavaVersion.current().isJava8Compatible()) { } group = 'com.criteo' -version = '2024.04.0.240626' +version = '2024.04.0.240731' repositories { jcenter() @@ -74,7 +74,7 @@ publishing { mavenJava(MavenPublication) { groupId 'com.criteo' artifactId 'criteo-api-marketingsolutions-sdk' - version '2024.04.0.240626' + version '2024.04.0.240731' from components.java artifact sourcesJar artifact javadocJar diff --git a/sdks/marketingsolutions_2024-04/docs/ApplicationSummaryModel.md b/sdks/marketingsolutions_2024-04/docs/ApplicationSummaryModel.md index 704b26ad..d5e84458 100644 --- a/sdks/marketingsolutions_2024-04/docs/ApplicationSummaryModel.md +++ b/sdks/marketingsolutions_2024-04/docs/ApplicationSummaryModel.md @@ -2,7 +2,7 @@ # ApplicationSummaryModel -Model of ApplicationSummary +Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients ## Properties diff --git a/sdks/marketingsolutions_2024-04/docs/ApplicationSummaryModelResource.md b/sdks/marketingsolutions_2024-04/docs/ApplicationSummaryModelResource.md index 81ed2c97..af688c5d 100644 --- a/sdks/marketingsolutions_2024-04/docs/ApplicationSummaryModelResource.md +++ b/sdks/marketingsolutions_2024-04/docs/ApplicationSummaryModelResource.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResource -A class that represents a ValueType in a guild compliant way +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/marketingsolutions_2024-04/docs/ApplicationSummaryModelResponse.md b/sdks/marketingsolutions_2024-04/docs/ApplicationSummaryModelResponse.md index 47b6bd74..658b5549 100644 --- a/sdks/marketingsolutions_2024-04/docs/ApplicationSummaryModelResponse.md +++ b/sdks/marketingsolutions_2024-04/docs/ApplicationSummaryModelResponse.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResponse -Response of ApplicationSummaryModel +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/marketingsolutions_2024-04/docs/CommonProblem.md b/sdks/marketingsolutions_2024-04/docs/CommonProblem.md index 1ee7a1f1..3f7f164b 100644 --- a/sdks/marketingsolutions_2024-04/docs/CommonProblem.md +++ b/sdks/marketingsolutions_2024-04/docs/CommonProblem.md @@ -2,7 +2,7 @@ # CommonProblem -Common problem object. Can be specialized as needed. +Common problem object. ## Properties @@ -11,7 +11,7 @@ Common problem object. Can be specialized as needed. |**traceId** | **String** | The request correlation ID this problem comes from. | [optional] | |**traceIdentifier** | **String** | The request correlation ID this problem comes from. (deprecated, use traceId instead) | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The problem's category. | [optional] | -|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | +|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | |**instance** | **String** | A URI that identifies the specific occurrence of the problem. | [optional] | |**title** | **String** | A short human-readable description of the problem type | [optional] | |**detail** | **String** | A human-readable explanation specific to this occurrence of the problem | [optional] | diff --git a/sdks/marketingsolutions_2024-04/docs/ContactlistAmendmentAttributes.md b/sdks/marketingsolutions_2024-04/docs/ContactlistAmendmentAttributes.md index 2315fdd4..f0a2c263 100644 --- a/sdks/marketingsolutions_2024-04/docs/ContactlistAmendmentAttributes.md +++ b/sdks/marketingsolutions_2024-04/docs/ContactlistAmendmentAttributes.md @@ -33,6 +33,7 @@ the name of the entity type | IDENTITYLINK | "identityLink" | | GUM | "gum" | | CUSTOMERID | "customerid" | +| PHONENUMBER | "phoneNumber" | diff --git a/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/ApiClient.java b/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/ApiClient.java index 0eec98fa..23324d60 100644 --- a/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/ApiClient.java +++ b/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/ApiClient.java @@ -213,7 +213,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2024.04.0.240626/java"); + setUserAgent("OpenAPI-Generator/2024.04.0.240731/java"); authentications = new HashMap(); } diff --git a/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ApplicationSummaryModel.java b/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ApplicationSummaryModel.java index 698b7a28..ec13128a 100644 --- a/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ApplicationSummaryModel.java +++ b/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ApplicationSummaryModel.java @@ -45,7 +45,7 @@ import com.criteo.api.marketingsolutions.v2024_04.JSON; /** - * Model of ApplicationSummary + * Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModel { diff --git a/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ApplicationSummaryModelResource.java b/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ApplicationSummaryModelResource.java index 599db8b1..afb08963 100644 --- a/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ApplicationSummaryModelResource.java +++ b/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ApplicationSummaryModelResource.java @@ -46,7 +46,7 @@ import com.criteo.api.marketingsolutions.v2024_04.JSON; /** - * A class that represents a ValueType in a guild compliant way + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResource { diff --git a/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ApplicationSummaryModelResponse.java b/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ApplicationSummaryModelResponse.java index 173f2a56..423349b4 100644 --- a/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ApplicationSummaryModelResponse.java +++ b/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ApplicationSummaryModelResponse.java @@ -49,7 +49,7 @@ import com.criteo.api.marketingsolutions.v2024_04.JSON; /** - * Response of ApplicationSummaryModel + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResponse { diff --git a/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/CommonProblem.java b/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/CommonProblem.java index ebfb22c6..15a8e2b3 100644 --- a/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/CommonProblem.java +++ b/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/CommonProblem.java @@ -47,7 +47,7 @@ import com.criteo.api.marketingsolutions.v2024_04.JSON; /** - * Common problem object. Can be specialized as needed. + * Common problem object. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CommonProblem { @@ -222,7 +222,7 @@ public CommonProblem code(String code) { } /** - * A machine-readable error code, expressed as a string value. + * A machine-readable error code, expressed as a string value. * @return code **/ @javax.annotation.Nullable diff --git a/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ContactlistAmendmentAttributes.java b/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ContactlistAmendmentAttributes.java index 6b281c66..bb26916a 100644 --- a/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ContactlistAmendmentAttributes.java +++ b/sdks/marketingsolutions_2024-04/src/main/java/com/criteo/api/marketingsolutions/v2024_04/model/ContactlistAmendmentAttributes.java @@ -115,7 +115,9 @@ public enum IdentifierTypeEnum { GUM("gum"), - CUSTOMERID("customerid"); + CUSTOMERID("customerid"), + + PHONENUMBER("phoneNumber"); private String value; diff --git a/sdks/marketingsolutions_2023-04/.github/workflows/maven.yml b/sdks/marketingsolutions_2024-07/.github/workflows/maven.yml similarity index 100% rename from sdks/marketingsolutions_2023-04/.github/workflows/maven.yml rename to sdks/marketingsolutions_2024-07/.github/workflows/maven.yml diff --git a/sdks/marketingsolutions_2023-04/.gitignore b/sdks/marketingsolutions_2024-07/.gitignore similarity index 100% rename from sdks/marketingsolutions_2023-04/.gitignore rename to sdks/marketingsolutions_2024-07/.gitignore diff --git a/sdks/marketingsolutions_2024-07/.openapi-generator/FILES b/sdks/marketingsolutions_2024-07/.openapi-generator/FILES new file mode 100644 index 00000000..cfdfe3b7 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/.openapi-generator/FILES @@ -0,0 +1,544 @@ +.github/workflows/maven.yml +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +api/openapi.yaml +build.gradle +build.sbt +docs/Ad.md +docs/AdListResponse.md +docs/AdResource.md +docs/AdResponse.md +docs/AdSetAudienceLinkEntityV1.md +docs/AdSetAudienceLinkEntityV1Resource.md +docs/AdSetAudienceLinkEntityV1Response.md +docs/AdSetAudienceLinkInputEntityV1.md +docs/AdSetCategoryBid.md +docs/AdSetCategoryBidListResponse.md +docs/AdSetCategoryBidResource.md +docs/AdSetDeliveryLimitationsV24Q1.md +docs/AdSetDisplayMultiplier.md +docs/AdSetDisplayMultiplierListResponse.md +docs/AdSetDisplayMultiplierResource.md +docs/AdSetFrequencyCappingV24Q1.md +docs/AdSetGeoLocationV24Q1.md +docs/AdSetSearchFilterV24Q1.md +docs/AdSetSearchRequestV24Q1.md +docs/AdSetTargetingRuleV24Q1.md +docs/AdSetTargetingV24Q1.md +docs/AdWrite.md +docs/AdWriteRequest.md +docs/AdWriteResource.md +docs/AdaptiveAttributes.md +docs/AdaptiveColors.md +docs/AdaptiveWriteAttributes.md +docs/AdvertiserApi.md +docs/AlgebraNodeV1.md +docs/AnalyticsApi.md +docs/ApplicationSummaryModel.md +docs/ApplicationSummaryModelResource.md +docs/ApplicationSummaryModelResponse.md +docs/AudienceApi.md +docs/AudienceBulkCreateInputV1.md +docs/AudienceBulkDeleteInputV1.md +docs/AudienceBulkUpdateInputV1.md +docs/AudienceComputeSizeEntityV1Resource.md +docs/AudienceComputeSizesInputV1.md +docs/AudienceCreateEntityV1.md +docs/AudienceCreateEntityV1Resource.md +docs/AudienceDeleteEntityV1Resource.md +docs/AudienceEntityV1.md +docs/AudienceEntityV1AudienceSearchMetadataV1ListResponse.md +docs/AudienceEntityV1ListResponse.md +docs/AudienceEntityV1Resource.md +docs/AudienceError.md +docs/AudienceEstimateSizeEntityV1.md +docs/AudienceEstimateSizeEntityV1Resource.md +docs/AudienceEstimateSizeInputV1.md +docs/AudienceIdEntityV1ListResponse.md +docs/AudienceIdEntityV1Resource.md +docs/AudienceNameDescription.md +docs/AudienceSearchEntityV1.md +docs/AudienceSearchEntityV1Resource.md +docs/AudienceSearchInputV1.md +docs/AudienceSearchMetadataV1.md +docs/AudienceSegmentBulkCreateInputV1.md +docs/AudienceSegmentBulkDeleteInputV1.md +docs/AudienceSegmentBulkUpdateInputV1.md +docs/AudienceSegmentComputeSizeEntityV1Resource.md +docs/AudienceSegmentComputeSizesInputV1.md +docs/AudienceSegmentCreateEntityV1.md +docs/AudienceSegmentCreateEntityV1Resource.md +docs/AudienceSegmentDeleteEntityV1Resource.md +docs/AudienceSegmentEntityV1.md +docs/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.md +docs/AudienceSegmentEntityV1ListResponse.md +docs/AudienceSegmentEntityV1Resource.md +docs/AudienceSegmentEstimateSizeInputV1.md +docs/AudienceSegmentIdEntityV1ListResponse.md +docs/AudienceSegmentIdEntityV1Resource.md +docs/AudienceSegmentSearchEntityV1.md +docs/AudienceSegmentSearchEntityV1Resource.md +docs/AudienceSegmentSearchInputV1.md +docs/AudienceSegmentSearchMetadataV1.md +docs/AudienceSegmentSizeEntityV1.md +docs/AudienceSegmentSizeEntityV1ListResponse.md +docs/AudienceSegmentSizeEntityV1Resource.md +docs/AudienceSegmentSizeEstimationEntityV1.md +docs/AudienceSegmentSizeEstimationEntityV1Resource.md +docs/AudienceSegmentSizeEstimationV1.md +docs/AudienceSegmentSizeEstimationV1Resource.md +docs/AudienceSegmentSizeEstimationV1Response.md +docs/AudienceSegmentUpdateEntityV1.md +docs/AudienceSegmentUpdateEntityV1Resource.md +docs/AudienceSizeEntityV1.md +docs/AudienceSizeEntityV1ListResponse.md +docs/AudienceSizeEntityV1Resource.md +docs/AudienceSizeEstimationV1.md +docs/AudienceSizeEstimationV1Resource.md +docs/AudienceSizeEstimationV1Response.md +docs/AudienceUpdateEntityV1.md +docs/AudienceUpdateEntityV1Resource.md +docs/AudienceWarning.md +docs/BasicAudienceDefinition.md +docs/BehavioralV1.md +docs/CampaignApi.md +docs/CampaignSearchFiltersV23Q1.md +docs/CampaignSearchRequestV23Q1.md +docs/CampaignSpendLimitV23Q1.md +docs/CampaignV23Q1.md +docs/CampaignV23Q1ListResponse.md +docs/CampaignV23Q1Resource.md +docs/CampaignV23Q1Response.md +docs/CommonProblem.md +docs/ContactListStatisticsEntityV1.md +docs/ContactListStatisticsEntityV1Resource.md +docs/ContactListStatisticsEntityV1Response.md +docs/ContactListV1.md +docs/ContactlistAmendment.md +docs/ContactlistAmendmentAttributes.md +docs/ContactlistAmendmentRequest.md +docs/ContactlistOperation.md +docs/ContactlistOperationAttributes.md +docs/Coupon.md +docs/CouponListResponse.md +docs/CouponResource.md +docs/CouponResponse.md +docs/CouponSupportedSizes.md +docs/CouponSupportedSizesResource.md +docs/CouponSupportedSizesResponse.md +docs/CreateAdSetBiddingV24Q1.md +docs/CreateAdSetBudgetV24Q1.md +docs/CreateAdSetGeoLocationV24Q1.md +docs/CreateAdSetScheduleV24Q1.md +docs/CreateAdSetTargetingV24Q1.md +docs/CreateAdSetV24Q1.md +docs/CreateAdSetV24Q1Request.md +docs/CreateAdSetV24Q1Resource.md +docs/CreateCampaign.md +docs/CreateCampaignRequest.md +docs/CreateCampaignResource.md +docs/CreateCampaignSpendLimit.md +docs/CreateCoupon.md +docs/CreateCouponRequest.md +docs/CreateCouponResource.md +docs/CreateImageSlide.md +docs/Creative.md +docs/CreativeApi.md +docs/CreativeListResponse.md +docs/CreativeResource.md +docs/CreativeResponse.md +docs/CreativeWrite.md +docs/CreativeWriteRequest.md +docs/CreativeWriteResource.md +docs/CriteoApiError.md +docs/CriteoApiWarning.md +docs/DeleteAudienceContactListResponse.md +docs/DynamicAttributes.md +docs/DynamicWriteAttributes.md +docs/EntityOfPortfolioMessage.md +docs/ErrorCodeResponse.md +docs/GatewayApi.md +docs/GetPortfolioResponse.md +docs/HtmlTagAttributes.md +docs/HtmlTagWriteAttributes.md +docs/ImageAttributes.md +docs/ImageSet.md +docs/ImageSetBase64.md +docs/ImageShape.md +docs/ImageSlide.md +docs/ImageWriteAttributes.md +docs/InMarketAudienceSegmentBrandEntityV1.md +docs/InMarketAudienceSegmentBrandEntityV1ListResponse.md +docs/InMarketAudienceSegmentBrandEntityV1Resource.md +docs/InMarketAudienceSegmentInterestEntityV1.md +docs/InMarketAudienceSegmentInterestEntityV1ListResponse.md +docs/InMarketAudienceSegmentInterestEntityV1Resource.md +docs/InMarketCreateV1.md +docs/InMarketSizeEstimationV1.md +docs/InMarketUpdateV1.md +docs/InMarketV1.md +docs/LocationCreateV1.md +docs/LocationSizeEstimationV1.md +docs/LocationUpdateV1.md +docs/LocationV1.md +docs/LookalikeCreateV1.md +docs/LookalikeUpdateV1.md +docs/LookalikeV1.md +docs/ModifyAudienceResponse.md +docs/NillableAdSetTargetingRuleV24Q1.md +docs/NillableAdSetTargetingRuleV24Q1Value.md +docs/NillableDateTime.md +docs/NillableDecimal.md +docs/NillableGenderV1.md +docs/NillableInt32.md +docs/NillableString.md +docs/PatchAdSetBiddingV24Q1.md +docs/PatchAdSetBudgetV24Q1.md +docs/PatchAdSetCategoryBid.md +docs/PatchAdSetCategoryBidListRequest.md +docs/PatchAdSetCategoryBidResource.md +docs/PatchAdSetCategoryBidResultListResponse.md +docs/PatchAdSetCategoryBidResultResource.md +docs/PatchAdSetDisplayMultiplier.md +docs/PatchAdSetDisplayMultiplierListRequest.md +docs/PatchAdSetDisplayMultiplierResource.md +docs/PatchAdSetDisplayMultiplierResultListResponse.md +docs/PatchAdSetDisplayMultiplierResultResource.md +docs/PatchAdSetSchedulingV24Q1.md +docs/PatchAdSetV24Q1.md +docs/PatchCampaign.md +docs/PatchCampaignListRequest.md +docs/PatchCampaignSpendLimit.md +docs/PatchCampaignWriteResource.md +docs/PatchResultCampaignListResponse.md +docs/PatchResultCampaignReadResource.md +docs/PlacementsReportQueryDataMessage.md +docs/PlacementsReportQueryEntityMessage.md +docs/PlacementsReportQueryMessage.md +docs/PointOfInterestV1.md +docs/PortfolioMessage.md +docs/ProblemDetails.md +docs/ProblemsDetails.md +docs/ProspectingCreateV1.md +docs/ProspectingUpdateV1.md +docs/ProspectingV1.md +docs/ReadAdSetBiddingV24Q1.md +docs/ReadAdSetBudgetV24Q1.md +docs/ReadAdSetScheduleV24Q1.md +docs/ReadAdSetV24Q1.md +docs/ReadModelAdSetId.md +docs/ReadModelAdSetIdV24Q1.md +docs/ReadModelReadAdSetV24Q1.md +docs/RequestsAdSetId.md +docs/RequestsPatchAdSetV24Q1.md +docs/ResponseReadAdSetV24Q1.md +docs/ResponsesAdSetId.md +docs/ResponsesAdSetIdV24Q1.md +docs/ResponsesReadAdSetV24Q1.md +docs/RetargetingCreateV1.md +docs/RetargetingUpdateV1.md +docs/RetargetingV1.md +docs/Size.md +docs/StatisticsReportQueryMessage.md +docs/Tag.md +docs/TransactionsReportQueryDataMessage.md +docs/TransactionsReportQueryEntityMessage.md +docs/TransactionsReportQueryMessage.md +docs/TransparencyQueryMessage.md +docs/TransparencyReportAttributes.md +docs/TransparencyReportDataMessage.md +docs/TransparencyReportEntityMessage.md +docs/TransparencyReportFile.md +docs/UpdateCoupon.md +docs/UpdateCouponRequest.md +docs/UpdateCouponResource.md +docs/VideoDetail.md +docs/WriteModelAdSetId.md +docs/WriteModelPatchAdSetV24Q1.md +git_push.sh +gradle.properties +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +pom.xml +settings.gradle +src/main/AndroidManifest.xml +src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiCallback.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiClient.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiClientBuilder.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiException.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/Configuration.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/GzipRequestInterceptor.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/JSON.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/Pair.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/ProgressRequestBody.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/ProgressResponseBody.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/ServerConfiguration.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/ServerVariable.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/StringUtil.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/AdvertiserApi.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/AnalyticsApi.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/AudienceApi.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/CampaignApi.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/CreativeApi.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/GatewayApi.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/ApiKeyAuth.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/Authentication.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/HttpBasicAuth.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/HttpBearerAuth.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/OAuth.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/OAuthFlow.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/OAuthOkHttpClient.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/RetryingOAuth.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AbstractOpenApiSchema.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Ad.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1Response.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkInputEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetCategoryBid.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetCategoryBidListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetCategoryBidResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDeliveryLimitationsV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDisplayMultiplier.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDisplayMultiplierListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDisplayMultiplierResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetFrequencyCappingV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetGeoLocationV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetSearchFilterV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetSearchRequestV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetTargetingRuleV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetTargetingV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWrite.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWriteRequest.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWriteResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveAttributes.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveColors.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveWriteAttributes.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AlgebraNodeV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ApplicationSummaryModel.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ApplicationSummaryModelResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ApplicationSummaryModelResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkCreateInputV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkDeleteInputV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkUpdateInputV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceComputeSizeEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceComputeSizesInputV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceCreateEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceCreateEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceDeleteEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1AudienceSearchMetadataV1ListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1ListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceError.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeInputV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceIdEntityV1ListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceIdEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceNameDescription.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchInputV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchMetadataV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkCreateInputV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkDeleteInputV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkUpdateInputV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentComputeSizeEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentComputeSizesInputV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentCreateEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentCreateEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentDeleteEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1ListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEstimateSizeInputV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentIdEntityV1ListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentIdEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchInputV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchMetadataV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1ListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1Response.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentUpdateEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentUpdateEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1ListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1Response.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceUpdateEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceUpdateEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceWarning.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/BasicAudienceDefinition.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/BehavioralV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSearchFiltersV23Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSearchRequestV23Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSpendLimitV23Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1ListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1Response.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CommonProblem.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1Response.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistAmendment.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistAmendmentAttributes.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistAmendmentRequest.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistOperation.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistOperationAttributes.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Coupon.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizes.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizesResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizesResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetBiddingV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetBudgetV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetGeoLocationV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetScheduleV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetTargetingV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1Request.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaign.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignRequest.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignSpendLimit.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCoupon.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCouponRequest.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCouponResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateImageSlide.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Creative.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWrite.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWriteRequest.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWriteResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CriteoApiError.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CriteoApiWarning.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DeleteAudienceContactListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DynamicAttributes.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DynamicWriteAttributes.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/EntityOfPortfolioMessage.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ErrorCodeResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/GetPortfolioResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/HtmlTagAttributes.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/HtmlTagWriteAttributes.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageAttributes.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSet.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSetBase64.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageShape.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSlide.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageWriteAttributes.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1ListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1ListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1Resource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketCreateV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketSizeEstimationV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketUpdateV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationCreateV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationSizeEstimationV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationUpdateV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeCreateV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeUpdateV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ModifyAudienceResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableAdSetTargetingRuleV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableAdSetTargetingRuleV24Q1Value.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableDateTime.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableDecimal.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableGenderV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableInt32.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableString.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetBiddingV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetBudgetV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBid.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidListRequest.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidResultListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidResultResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplier.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierListRequest.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierResultListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierResultResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetSchedulingV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaign.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaignListRequest.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaignSpendLimit.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaignWriteResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchResultCampaignListResponse.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchResultCampaignReadResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PlacementsReportQueryDataMessage.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PlacementsReportQueryEntityMessage.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PlacementsReportQueryMessage.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PointOfInterestV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PortfolioMessage.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProblemDetails.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProblemsDetails.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingCreateV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingUpdateV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetBiddingV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetBudgetV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetScheduleV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelAdSetId.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelAdSetIdV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelReadAdSetV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RequestsAdSetId.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RequestsPatchAdSetV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponseReadAdSetV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesAdSetId.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesAdSetIdV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesReadAdSetV24Q1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingCreateV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingUpdateV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingV1.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Size.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/StatisticsReportQueryMessage.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Tag.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransactionsReportQueryDataMessage.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransactionsReportQueryEntityMessage.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransactionsReportQueryMessage.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyQueryMessage.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportAttributes.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportDataMessage.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportEntityMessage.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportFile.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCoupon.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCouponRequest.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCouponResource.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/VideoDetail.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/WriteModelAdSetId.java +src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/WriteModelPatchAdSetV24Q1.java +src/test/java/com/criteo/api/marketingsolutions/v2024_07/ExampleApplication.java +src/test/java/com/criteo/api/marketingsolutions/v2024_07/GatewayApiTest.java diff --git a/sdks/marketingsolutions_2023-04/.openapi-generator/VERSION b/sdks/marketingsolutions_2024-07/.openapi-generator/VERSION similarity index 100% rename from sdks/marketingsolutions_2023-04/.openapi-generator/VERSION rename to sdks/marketingsolutions_2024-07/.openapi-generator/VERSION diff --git a/sdks/marketingsolutions_2024-07/README.md b/sdks/marketingsolutions_2024-07/README.md new file mode 100644 index 00000000..7e28886c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/README.md @@ -0,0 +1,388 @@ +# JAVA SDK for Criteo API marketingsolutions for 2024_07 version + +## Introduction +API Client Libraries can facilitate your use of the Criteo API allowing you to build unique and customized solutions to serve your businesses and clients. +These libraries can reduce the amount of code you need to write in order to start accessing Criteo programmatically. They also can help expedite troubleshooting, should you encounter any issues. + +More information: [https://developers.criteo.com/](https://developers.criteo.com/) + +Criteo API + +- Package version: 2024.07.0.240731 + + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + +## Requirements + +Building the API client library requires: + +1. Java 1.8+ +2. Gradle + +## How to build + +To build the jar, simply execute: + +```shell +./gradlew jar +``` + +The built jar will be available in build/libs. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + com.criteo + criteo-api-marketingsolutions-sdk + 2024.07.0.240731 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "com.criteo:criteo-api-marketingsolutions-sdk:2024.07.0.240731" +``` + +### Others + +At first generate the JAR by executing: + +```shell +./gradlew jar +``` + +Then manually install the following JARs: + +* `build/libs/criteo-api-marketingsolutions-sdk-2024.07.0.240731.jar` + +## Example + +Please see [src/test/java/com/criteo/api/marketingsolutions/v2024_07/ExampleApplication.java](src/test/java/com/criteo/api/marketingsolutions/v2024_07/ExampleApplication.java) for an example on how to perform a simple call. + +## Documentation for API Endpoints + +All URIs are relative to *https://api.criteo.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AdvertiserApi* | [**apiPortfolioGet**](docs/AdvertiserApi.md#apiPortfolioGet) | **GET** /2024-07/advertisers/me | +*AnalyticsApi* | [**getAdsetReport**](docs/AnalyticsApi.md#getAdsetReport) | **POST** /2024-07/statistics/report | +*AnalyticsApi* | [**getPlacementsReport**](docs/AnalyticsApi.md#getPlacementsReport) | **POST** /2024-07/placements/report | +*AnalyticsApi* | [**getTransactionsReport**](docs/AnalyticsApi.md#getTransactionsReport) | **POST** /2024-07/transactions/report | +*AnalyticsApi* | [**getTransparencyReport**](docs/AnalyticsApi.md#getTransparencyReport) | **POST** /2024-07/log-level/advertisers/{advertiser-id}/report | +*AudienceApi* | [**bulkCreateAudienceSegments**](docs/AudienceApi.md#bulkCreateAudienceSegments) | **POST** /2024-07/marketing-solutions/audience-segments/create | +*AudienceApi* | [**bulkCreateAudiences**](docs/AudienceApi.md#bulkCreateAudiences) | **POST** /2024-07/marketing-solutions/audiences/create | +*AudienceApi* | [**bulkDeleteAudienceSegments**](docs/AudienceApi.md#bulkDeleteAudienceSegments) | **POST** /2024-07/marketing-solutions/audience-segments/delete | +*AudienceApi* | [**bulkDeleteAudiences**](docs/AudienceApi.md#bulkDeleteAudiences) | **POST** /2024-07/marketing-solutions/audiences/delete | +*AudienceApi* | [**bulkUpdateAudienceSegments**](docs/AudienceApi.md#bulkUpdateAudienceSegments) | **PATCH** /2024-07/marketing-solutions/audience-segments | +*AudienceApi* | [**bulkUpdateAudiences**](docs/AudienceApi.md#bulkUpdateAudiences) | **PATCH** /2024-07/marketing-solutions/audiences | +*AudienceApi* | [**computeAudienceSegmentsSizes**](docs/AudienceApi.md#computeAudienceSegmentsSizes) | **POST** /2024-07/marketing-solutions/audience-segments/compute-sizes | +*AudienceApi* | [**computeAudiencesSizes**](docs/AudienceApi.md#computeAudiencesSizes) | **POST** /2024-07/marketing-solutions/audiences/compute-sizes | +*AudienceApi* | [**deleteContactListIdentifiers**](docs/AudienceApi.md#deleteContactListIdentifiers) | **DELETE** /2024-07/marketing-solutions/audience-segments/{audience-segment-id}/contact-list | +*AudienceApi* | [**estimateAudienceSegmentSize**](docs/AudienceApi.md#estimateAudienceSegmentSize) | **POST** /2024-07/marketing-solutions/audience-segments/estimate-size | +*AudienceApi* | [**estimateAudienceSize**](docs/AudienceApi.md#estimateAudienceSize) | **POST** /2024-07/marketing-solutions/audiences/estimate-size | +*AudienceApi* | [**getAudienceSegmentContactListStatistics**](docs/AudienceApi.md#getAudienceSegmentContactListStatistics) | **GET** /2024-07/marketing-solutions/audience-segments/{audience-segment-id}/contact-list/statistics | +*AudienceApi* | [**getAudienceSegmentsInMarketBrands**](docs/AudienceApi.md#getAudienceSegmentsInMarketBrands) | **GET** /2024-07/marketing-solutions/audience-segments/in-market-brands | +*AudienceApi* | [**getAudienceSegmentsInMarketInterests**](docs/AudienceApi.md#getAudienceSegmentsInMarketInterests) | **GET** /2024-07/marketing-solutions/audience-segments/in-market-interests | +*AudienceApi* | [**searchAudienceSegments**](docs/AudienceApi.md#searchAudienceSegments) | **POST** /2024-07/marketing-solutions/audience-segments/search | +*AudienceApi* | [**searchAudiences**](docs/AudienceApi.md#searchAudiences) | **POST** /2024-07/marketing-solutions/audiences/search | +*AudienceApi* | [**updateContactListIdentifiers**](docs/AudienceApi.md#updateContactListIdentifiers) | **PATCH** /2024-07/marketing-solutions/audience-segments/{audience-segment-id}/contact-list | +*CampaignApi* | [**createAdSetV24Q1**](docs/CampaignApi.md#createAdSetV24Q1) | **POST** /2024-07/marketing-solutions/ad-sets | +*CampaignApi* | [**createCampaign**](docs/CampaignApi.md#createCampaign) | **POST** /2024-07/marketing-solutions/campaigns | +*CampaignApi* | [**getAdSetV24Q1**](docs/CampaignApi.md#getAdSetV24Q1) | **GET** /2024-07/marketing-solutions/ad-sets/{ad-set-id} | +*CampaignApi* | [**getCampaignV23Q1**](docs/CampaignApi.md#getCampaignV23Q1) | **GET** /2024-07/marketing-solutions/campaigns/{campaign-id} | +*CampaignApi* | [**getCategoryBidList**](docs/CampaignApi.md#getCategoryBidList) | **GET** /2024-07/marketing-solutions/ad-sets/{ad-set-id}/category-bids | +*CampaignApi* | [**getDisplayMultipliers**](docs/CampaignApi.md#getDisplayMultipliers) | **GET** /2024-07/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers | +*CampaignApi* | [**patchAdSetsV24Q1**](docs/CampaignApi.md#patchAdSetsV24Q1) | **PATCH** /2024-07/marketing-solutions/ad-sets | +*CampaignApi* | [**patchCampaigns**](docs/CampaignApi.md#patchCampaigns) | **PATCH** /2024-07/marketing-solutions/campaigns | +*CampaignApi* | [**patchCategoryBidList**](docs/CampaignApi.md#patchCategoryBidList) | **PATCH** /2024-07/marketing-solutions/ad-sets/{ad-set-id}/category-bids | +*CampaignApi* | [**patchDisplayMultipliers**](docs/CampaignApi.md#patchDisplayMultipliers) | **PATCH** /2024-07/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers | +*CampaignApi* | [**searchAdSetsV24Q1**](docs/CampaignApi.md#searchAdSetsV24Q1) | **POST** /2024-07/marketing-solutions/ad-sets/search | +*CampaignApi* | [**searchCampaignsV23Q1**](docs/CampaignApi.md#searchCampaignsV23Q1) | **POST** /2024-07/marketing-solutions/campaigns/search | +*CampaignApi* | [**startAdSets**](docs/CampaignApi.md#startAdSets) | **POST** /2024-07/marketing-solutions/ad-sets/start | +*CampaignApi* | [**stopAdSets**](docs/CampaignApi.md#stopAdSets) | **POST** /2024-07/marketing-solutions/ad-sets/stop | +*CampaignApi* | [**updateAdSetAudience**](docs/CampaignApi.md#updateAdSetAudience) | **PUT** /2024-07/marketing-solutions/ad-sets/{ad-set-id}/audience | +*CreativeApi* | [**createAdvertiserAd**](docs/CreativeApi.md#createAdvertiserAd) | **POST** /2024-07/marketing-solutions/advertisers/{advertiser-id}/ads | +*CreativeApi* | [**createAdvertiserCoupon**](docs/CreativeApi.md#createAdvertiserCoupon) | **POST** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons | +*CreativeApi* | [**createAdvertiserCreative**](docs/CreativeApi.md#createAdvertiserCreative) | **POST** /2024-07/marketing-solutions/advertisers/{advertiser-id}/creatives | +*CreativeApi* | [**deleteAd**](docs/CreativeApi.md#deleteAd) | **DELETE** /2024-07/marketing-solutions/ads/{id} | +*CreativeApi* | [**deleteAdvertiserCoupon**](docs/CreativeApi.md#deleteAdvertiserCoupon) | **DELETE** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id} | +*CreativeApi* | [**deleteCreative**](docs/CreativeApi.md#deleteCreative) | **DELETE** /2024-07/marketing-solutions/creatives/{id} | +*CreativeApi* | [**editAdvertiserCoupon**](docs/CreativeApi.md#editAdvertiserCoupon) | **PUT** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id} | +*CreativeApi* | [**editCreative**](docs/CreativeApi.md#editCreative) | **PUT** /2024-07/marketing-solutions/creatives/{id} | +*CreativeApi* | [**generateCreativePreview**](docs/CreativeApi.md#generateCreativePreview) | **POST** /2024-07/marketing-solutions/creatives/{id}/preview | +*CreativeApi* | [**getAd**](docs/CreativeApi.md#getAd) | **GET** /2024-07/marketing-solutions/ads/{id} | +*CreativeApi* | [**getAdvertiserAds**](docs/CreativeApi.md#getAdvertiserAds) | **GET** /2024-07/marketing-solutions/advertisers/{advertiser-id}/ads | +*CreativeApi* | [**getAdvertiserCoupon**](docs/CreativeApi.md#getAdvertiserCoupon) | **GET** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id} | +*CreativeApi* | [**getAdvertiserCouponPreview**](docs/CreativeApi.md#getAdvertiserCouponPreview) | **GET** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id}/preview | +*CreativeApi* | [**getAdvertiserCouponSupportedSizes**](docs/CreativeApi.md#getAdvertiserCouponSupportedSizes) | **GET** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons-supported-sizes | +*CreativeApi* | [**getAdvertiserCoupons**](docs/CreativeApi.md#getAdvertiserCoupons) | **GET** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons | +*CreativeApi* | [**getAdvertiserCreatives**](docs/CreativeApi.md#getAdvertiserCreatives) | **GET** /2024-07/marketing-solutions/advertisers/{advertiser-id}/creatives | +*CreativeApi* | [**getCreative**](docs/CreativeApi.md#getCreative) | **GET** /2024-07/marketing-solutions/creatives/{id} | +*GatewayApi* | [**getCurrentApplication**](docs/GatewayApi.md#getCurrentApplication) | **GET** /2024-07/marketing-solutions/me | + + +## Documentation for Models + + - [Ad](docs/Ad.md) + - [AdListResponse](docs/AdListResponse.md) + - [AdResource](docs/AdResource.md) + - [AdResponse](docs/AdResponse.md) + - [AdSetAudienceLinkEntityV1](docs/AdSetAudienceLinkEntityV1.md) + - [AdSetAudienceLinkEntityV1Resource](docs/AdSetAudienceLinkEntityV1Resource.md) + - [AdSetAudienceLinkEntityV1Response](docs/AdSetAudienceLinkEntityV1Response.md) + - [AdSetAudienceLinkInputEntityV1](docs/AdSetAudienceLinkInputEntityV1.md) + - [AdSetCategoryBid](docs/AdSetCategoryBid.md) + - [AdSetCategoryBidListResponse](docs/AdSetCategoryBidListResponse.md) + - [AdSetCategoryBidResource](docs/AdSetCategoryBidResource.md) + - [AdSetDeliveryLimitationsV24Q1](docs/AdSetDeliveryLimitationsV24Q1.md) + - [AdSetDisplayMultiplier](docs/AdSetDisplayMultiplier.md) + - [AdSetDisplayMultiplierListResponse](docs/AdSetDisplayMultiplierListResponse.md) + - [AdSetDisplayMultiplierResource](docs/AdSetDisplayMultiplierResource.md) + - [AdSetFrequencyCappingV24Q1](docs/AdSetFrequencyCappingV24Q1.md) + - [AdSetGeoLocationV24Q1](docs/AdSetGeoLocationV24Q1.md) + - [AdSetSearchFilterV24Q1](docs/AdSetSearchFilterV24Q1.md) + - [AdSetSearchRequestV24Q1](docs/AdSetSearchRequestV24Q1.md) + - [AdSetTargetingRuleV24Q1](docs/AdSetTargetingRuleV24Q1.md) + - [AdSetTargetingV24Q1](docs/AdSetTargetingV24Q1.md) + - [AdWrite](docs/AdWrite.md) + - [AdWriteRequest](docs/AdWriteRequest.md) + - [AdWriteResource](docs/AdWriteResource.md) + - [AdaptiveAttributes](docs/AdaptiveAttributes.md) + - [AdaptiveColors](docs/AdaptiveColors.md) + - [AdaptiveWriteAttributes](docs/AdaptiveWriteAttributes.md) + - [AlgebraNodeV1](docs/AlgebraNodeV1.md) + - [ApplicationSummaryModel](docs/ApplicationSummaryModel.md) + - [ApplicationSummaryModelResource](docs/ApplicationSummaryModelResource.md) + - [ApplicationSummaryModelResponse](docs/ApplicationSummaryModelResponse.md) + - [AudienceBulkCreateInputV1](docs/AudienceBulkCreateInputV1.md) + - [AudienceBulkDeleteInputV1](docs/AudienceBulkDeleteInputV1.md) + - [AudienceBulkUpdateInputV1](docs/AudienceBulkUpdateInputV1.md) + - [AudienceComputeSizeEntityV1Resource](docs/AudienceComputeSizeEntityV1Resource.md) + - [AudienceComputeSizesInputV1](docs/AudienceComputeSizesInputV1.md) + - [AudienceCreateEntityV1](docs/AudienceCreateEntityV1.md) + - [AudienceCreateEntityV1Resource](docs/AudienceCreateEntityV1Resource.md) + - [AudienceDeleteEntityV1Resource](docs/AudienceDeleteEntityV1Resource.md) + - [AudienceEntityV1](docs/AudienceEntityV1.md) + - [AudienceEntityV1AudienceSearchMetadataV1ListResponse](docs/AudienceEntityV1AudienceSearchMetadataV1ListResponse.md) + - [AudienceEntityV1ListResponse](docs/AudienceEntityV1ListResponse.md) + - [AudienceEntityV1Resource](docs/AudienceEntityV1Resource.md) + - [AudienceError](docs/AudienceError.md) + - [AudienceEstimateSizeEntityV1](docs/AudienceEstimateSizeEntityV1.md) + - [AudienceEstimateSizeEntityV1Resource](docs/AudienceEstimateSizeEntityV1Resource.md) + - [AudienceEstimateSizeInputV1](docs/AudienceEstimateSizeInputV1.md) + - [AudienceIdEntityV1ListResponse](docs/AudienceIdEntityV1ListResponse.md) + - [AudienceIdEntityV1Resource](docs/AudienceIdEntityV1Resource.md) + - [AudienceNameDescription](docs/AudienceNameDescription.md) + - [AudienceSearchEntityV1](docs/AudienceSearchEntityV1.md) + - [AudienceSearchEntityV1Resource](docs/AudienceSearchEntityV1Resource.md) + - [AudienceSearchInputV1](docs/AudienceSearchInputV1.md) + - [AudienceSearchMetadataV1](docs/AudienceSearchMetadataV1.md) + - [AudienceSegmentBulkCreateInputV1](docs/AudienceSegmentBulkCreateInputV1.md) + - [AudienceSegmentBulkDeleteInputV1](docs/AudienceSegmentBulkDeleteInputV1.md) + - [AudienceSegmentBulkUpdateInputV1](docs/AudienceSegmentBulkUpdateInputV1.md) + - [AudienceSegmentComputeSizeEntityV1Resource](docs/AudienceSegmentComputeSizeEntityV1Resource.md) + - [AudienceSegmentComputeSizesInputV1](docs/AudienceSegmentComputeSizesInputV1.md) + - [AudienceSegmentCreateEntityV1](docs/AudienceSegmentCreateEntityV1.md) + - [AudienceSegmentCreateEntityV1Resource](docs/AudienceSegmentCreateEntityV1Resource.md) + - [AudienceSegmentDeleteEntityV1Resource](docs/AudienceSegmentDeleteEntityV1Resource.md) + - [AudienceSegmentEntityV1](docs/AudienceSegmentEntityV1.md) + - [AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse](docs/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.md) + - [AudienceSegmentEntityV1ListResponse](docs/AudienceSegmentEntityV1ListResponse.md) + - [AudienceSegmentEntityV1Resource](docs/AudienceSegmentEntityV1Resource.md) + - [AudienceSegmentEstimateSizeInputV1](docs/AudienceSegmentEstimateSizeInputV1.md) + - [AudienceSegmentIdEntityV1ListResponse](docs/AudienceSegmentIdEntityV1ListResponse.md) + - [AudienceSegmentIdEntityV1Resource](docs/AudienceSegmentIdEntityV1Resource.md) + - [AudienceSegmentSearchEntityV1](docs/AudienceSegmentSearchEntityV1.md) + - [AudienceSegmentSearchEntityV1Resource](docs/AudienceSegmentSearchEntityV1Resource.md) + - [AudienceSegmentSearchInputV1](docs/AudienceSegmentSearchInputV1.md) + - [AudienceSegmentSearchMetadataV1](docs/AudienceSegmentSearchMetadataV1.md) + - [AudienceSegmentSizeEntityV1](docs/AudienceSegmentSizeEntityV1.md) + - [AudienceSegmentSizeEntityV1ListResponse](docs/AudienceSegmentSizeEntityV1ListResponse.md) + - [AudienceSegmentSizeEntityV1Resource](docs/AudienceSegmentSizeEntityV1Resource.md) + - [AudienceSegmentSizeEstimationEntityV1](docs/AudienceSegmentSizeEstimationEntityV1.md) + - [AudienceSegmentSizeEstimationEntityV1Resource](docs/AudienceSegmentSizeEstimationEntityV1Resource.md) + - [AudienceSegmentSizeEstimationV1](docs/AudienceSegmentSizeEstimationV1.md) + - [AudienceSegmentSizeEstimationV1Resource](docs/AudienceSegmentSizeEstimationV1Resource.md) + - [AudienceSegmentSizeEstimationV1Response](docs/AudienceSegmentSizeEstimationV1Response.md) + - [AudienceSegmentUpdateEntityV1](docs/AudienceSegmentUpdateEntityV1.md) + - [AudienceSegmentUpdateEntityV1Resource](docs/AudienceSegmentUpdateEntityV1Resource.md) + - [AudienceSizeEntityV1](docs/AudienceSizeEntityV1.md) + - [AudienceSizeEntityV1ListResponse](docs/AudienceSizeEntityV1ListResponse.md) + - [AudienceSizeEntityV1Resource](docs/AudienceSizeEntityV1Resource.md) + - [AudienceSizeEstimationV1](docs/AudienceSizeEstimationV1.md) + - [AudienceSizeEstimationV1Resource](docs/AudienceSizeEstimationV1Resource.md) + - [AudienceSizeEstimationV1Response](docs/AudienceSizeEstimationV1Response.md) + - [AudienceUpdateEntityV1](docs/AudienceUpdateEntityV1.md) + - [AudienceUpdateEntityV1Resource](docs/AudienceUpdateEntityV1Resource.md) + - [AudienceWarning](docs/AudienceWarning.md) + - [BasicAudienceDefinition](docs/BasicAudienceDefinition.md) + - [BehavioralV1](docs/BehavioralV1.md) + - [CampaignSearchFiltersV23Q1](docs/CampaignSearchFiltersV23Q1.md) + - [CampaignSearchRequestV23Q1](docs/CampaignSearchRequestV23Q1.md) + - [CampaignSpendLimitV23Q1](docs/CampaignSpendLimitV23Q1.md) + - [CampaignV23Q1](docs/CampaignV23Q1.md) + - [CampaignV23Q1ListResponse](docs/CampaignV23Q1ListResponse.md) + - [CampaignV23Q1Resource](docs/CampaignV23Q1Resource.md) + - [CampaignV23Q1Response](docs/CampaignV23Q1Response.md) + - [CommonProblem](docs/CommonProblem.md) + - [ContactListStatisticsEntityV1](docs/ContactListStatisticsEntityV1.md) + - [ContactListStatisticsEntityV1Resource](docs/ContactListStatisticsEntityV1Resource.md) + - [ContactListStatisticsEntityV1Response](docs/ContactListStatisticsEntityV1Response.md) + - [ContactListV1](docs/ContactListV1.md) + - [ContactlistAmendment](docs/ContactlistAmendment.md) + - [ContactlistAmendmentAttributes](docs/ContactlistAmendmentAttributes.md) + - [ContactlistAmendmentRequest](docs/ContactlistAmendmentRequest.md) + - [ContactlistOperation](docs/ContactlistOperation.md) + - [ContactlistOperationAttributes](docs/ContactlistOperationAttributes.md) + - [Coupon](docs/Coupon.md) + - [CouponListResponse](docs/CouponListResponse.md) + - [CouponResource](docs/CouponResource.md) + - [CouponResponse](docs/CouponResponse.md) + - [CouponSupportedSizes](docs/CouponSupportedSizes.md) + - [CouponSupportedSizesResource](docs/CouponSupportedSizesResource.md) + - [CouponSupportedSizesResponse](docs/CouponSupportedSizesResponse.md) + - [CreateAdSetBiddingV24Q1](docs/CreateAdSetBiddingV24Q1.md) + - [CreateAdSetBudgetV24Q1](docs/CreateAdSetBudgetV24Q1.md) + - [CreateAdSetGeoLocationV24Q1](docs/CreateAdSetGeoLocationV24Q1.md) + - [CreateAdSetScheduleV24Q1](docs/CreateAdSetScheduleV24Q1.md) + - [CreateAdSetTargetingV24Q1](docs/CreateAdSetTargetingV24Q1.md) + - [CreateAdSetV24Q1](docs/CreateAdSetV24Q1.md) + - [CreateAdSetV24Q1Request](docs/CreateAdSetV24Q1Request.md) + - [CreateAdSetV24Q1Resource](docs/CreateAdSetV24Q1Resource.md) + - [CreateCampaign](docs/CreateCampaign.md) + - [CreateCampaignRequest](docs/CreateCampaignRequest.md) + - [CreateCampaignResource](docs/CreateCampaignResource.md) + - [CreateCampaignSpendLimit](docs/CreateCampaignSpendLimit.md) + - [CreateCoupon](docs/CreateCoupon.md) + - [CreateCouponRequest](docs/CreateCouponRequest.md) + - [CreateCouponResource](docs/CreateCouponResource.md) + - [CreateImageSlide](docs/CreateImageSlide.md) + - [Creative](docs/Creative.md) + - [CreativeListResponse](docs/CreativeListResponse.md) + - [CreativeResource](docs/CreativeResource.md) + - [CreativeResponse](docs/CreativeResponse.md) + - [CreativeWrite](docs/CreativeWrite.md) + - [CreativeWriteRequest](docs/CreativeWriteRequest.md) + - [CreativeWriteResource](docs/CreativeWriteResource.md) + - [CriteoApiError](docs/CriteoApiError.md) + - [CriteoApiWarning](docs/CriteoApiWarning.md) + - [DeleteAudienceContactListResponse](docs/DeleteAudienceContactListResponse.md) + - [DynamicAttributes](docs/DynamicAttributes.md) + - [DynamicWriteAttributes](docs/DynamicWriteAttributes.md) + - [EntityOfPortfolioMessage](docs/EntityOfPortfolioMessage.md) + - [ErrorCodeResponse](docs/ErrorCodeResponse.md) + - [GetPortfolioResponse](docs/GetPortfolioResponse.md) + - [HtmlTagAttributes](docs/HtmlTagAttributes.md) + - [HtmlTagWriteAttributes](docs/HtmlTagWriteAttributes.md) + - [ImageAttributes](docs/ImageAttributes.md) + - [ImageSet](docs/ImageSet.md) + - [ImageSetBase64](docs/ImageSetBase64.md) + - [ImageShape](docs/ImageShape.md) + - [ImageSlide](docs/ImageSlide.md) + - [ImageWriteAttributes](docs/ImageWriteAttributes.md) + - [InMarketAudienceSegmentBrandEntityV1](docs/InMarketAudienceSegmentBrandEntityV1.md) + - [InMarketAudienceSegmentBrandEntityV1ListResponse](docs/InMarketAudienceSegmentBrandEntityV1ListResponse.md) + - [InMarketAudienceSegmentBrandEntityV1Resource](docs/InMarketAudienceSegmentBrandEntityV1Resource.md) + - [InMarketAudienceSegmentInterestEntityV1](docs/InMarketAudienceSegmentInterestEntityV1.md) + - [InMarketAudienceSegmentInterestEntityV1ListResponse](docs/InMarketAudienceSegmentInterestEntityV1ListResponse.md) + - [InMarketAudienceSegmentInterestEntityV1Resource](docs/InMarketAudienceSegmentInterestEntityV1Resource.md) + - [InMarketCreateV1](docs/InMarketCreateV1.md) + - [InMarketSizeEstimationV1](docs/InMarketSizeEstimationV1.md) + - [InMarketUpdateV1](docs/InMarketUpdateV1.md) + - [InMarketV1](docs/InMarketV1.md) + - [LocationCreateV1](docs/LocationCreateV1.md) + - [LocationSizeEstimationV1](docs/LocationSizeEstimationV1.md) + - [LocationUpdateV1](docs/LocationUpdateV1.md) + - [LocationV1](docs/LocationV1.md) + - [LookalikeCreateV1](docs/LookalikeCreateV1.md) + - [LookalikeUpdateV1](docs/LookalikeUpdateV1.md) + - [LookalikeV1](docs/LookalikeV1.md) + - [ModifyAudienceResponse](docs/ModifyAudienceResponse.md) + - [NillableAdSetTargetingRuleV24Q1](docs/NillableAdSetTargetingRuleV24Q1.md) + - [NillableAdSetTargetingRuleV24Q1Value](docs/NillableAdSetTargetingRuleV24Q1Value.md) + - [NillableDateTime](docs/NillableDateTime.md) + - [NillableDecimal](docs/NillableDecimal.md) + - [NillableGenderV1](docs/NillableGenderV1.md) + - [NillableInt32](docs/NillableInt32.md) + - [NillableString](docs/NillableString.md) + - [PatchAdSetBiddingV24Q1](docs/PatchAdSetBiddingV24Q1.md) + - [PatchAdSetBudgetV24Q1](docs/PatchAdSetBudgetV24Q1.md) + - [PatchAdSetCategoryBid](docs/PatchAdSetCategoryBid.md) + - [PatchAdSetCategoryBidListRequest](docs/PatchAdSetCategoryBidListRequest.md) + - [PatchAdSetCategoryBidResource](docs/PatchAdSetCategoryBidResource.md) + - [PatchAdSetCategoryBidResultListResponse](docs/PatchAdSetCategoryBidResultListResponse.md) + - [PatchAdSetCategoryBidResultResource](docs/PatchAdSetCategoryBidResultResource.md) + - [PatchAdSetDisplayMultiplier](docs/PatchAdSetDisplayMultiplier.md) + - [PatchAdSetDisplayMultiplierListRequest](docs/PatchAdSetDisplayMultiplierListRequest.md) + - [PatchAdSetDisplayMultiplierResource](docs/PatchAdSetDisplayMultiplierResource.md) + - [PatchAdSetDisplayMultiplierResultListResponse](docs/PatchAdSetDisplayMultiplierResultListResponse.md) + - [PatchAdSetDisplayMultiplierResultResource](docs/PatchAdSetDisplayMultiplierResultResource.md) + - [PatchAdSetSchedulingV24Q1](docs/PatchAdSetSchedulingV24Q1.md) + - [PatchAdSetV24Q1](docs/PatchAdSetV24Q1.md) + - [PatchCampaign](docs/PatchCampaign.md) + - [PatchCampaignListRequest](docs/PatchCampaignListRequest.md) + - [PatchCampaignSpendLimit](docs/PatchCampaignSpendLimit.md) + - [PatchCampaignWriteResource](docs/PatchCampaignWriteResource.md) + - [PatchResultCampaignListResponse](docs/PatchResultCampaignListResponse.md) + - [PatchResultCampaignReadResource](docs/PatchResultCampaignReadResource.md) + - [PlacementsReportQueryDataMessage](docs/PlacementsReportQueryDataMessage.md) + - [PlacementsReportQueryEntityMessage](docs/PlacementsReportQueryEntityMessage.md) + - [PlacementsReportQueryMessage](docs/PlacementsReportQueryMessage.md) + - [PointOfInterestV1](docs/PointOfInterestV1.md) + - [PortfolioMessage](docs/PortfolioMessage.md) + - [ProblemDetails](docs/ProblemDetails.md) + - [ProblemsDetails](docs/ProblemsDetails.md) + - [ProspectingCreateV1](docs/ProspectingCreateV1.md) + - [ProspectingUpdateV1](docs/ProspectingUpdateV1.md) + - [ProspectingV1](docs/ProspectingV1.md) + - [ReadAdSetBiddingV24Q1](docs/ReadAdSetBiddingV24Q1.md) + - [ReadAdSetBudgetV24Q1](docs/ReadAdSetBudgetV24Q1.md) + - [ReadAdSetScheduleV24Q1](docs/ReadAdSetScheduleV24Q1.md) + - [ReadAdSetV24Q1](docs/ReadAdSetV24Q1.md) + - [ReadModelAdSetId](docs/ReadModelAdSetId.md) + - [ReadModelAdSetIdV24Q1](docs/ReadModelAdSetIdV24Q1.md) + - [ReadModelReadAdSetV24Q1](docs/ReadModelReadAdSetV24Q1.md) + - [RequestsAdSetId](docs/RequestsAdSetId.md) + - [RequestsPatchAdSetV24Q1](docs/RequestsPatchAdSetV24Q1.md) + - [ResponseReadAdSetV24Q1](docs/ResponseReadAdSetV24Q1.md) + - [ResponsesAdSetId](docs/ResponsesAdSetId.md) + - [ResponsesAdSetIdV24Q1](docs/ResponsesAdSetIdV24Q1.md) + - [ResponsesReadAdSetV24Q1](docs/ResponsesReadAdSetV24Q1.md) + - [RetargetingCreateV1](docs/RetargetingCreateV1.md) + - [RetargetingUpdateV1](docs/RetargetingUpdateV1.md) + - [RetargetingV1](docs/RetargetingV1.md) + - [Size](docs/Size.md) + - [StatisticsReportQueryMessage](docs/StatisticsReportQueryMessage.md) + - [Tag](docs/Tag.md) + - [TransactionsReportQueryDataMessage](docs/TransactionsReportQueryDataMessage.md) + - [TransactionsReportQueryEntityMessage](docs/TransactionsReportQueryEntityMessage.md) + - [TransactionsReportQueryMessage](docs/TransactionsReportQueryMessage.md) + - [TransparencyQueryMessage](docs/TransparencyQueryMessage.md) + - [TransparencyReportAttributes](docs/TransparencyReportAttributes.md) + - [TransparencyReportDataMessage](docs/TransparencyReportDataMessage.md) + - [TransparencyReportEntityMessage](docs/TransparencyReportEntityMessage.md) + - [TransparencyReportFile](docs/TransparencyReportFile.md) + - [UpdateCoupon](docs/UpdateCoupon.md) + - [UpdateCouponRequest](docs/UpdateCouponRequest.md) + - [UpdateCouponResource](docs/UpdateCouponResource.md) + - [VideoDetail](docs/VideoDetail.md) + - [WriteModelAdSetId](docs/WriteModelAdSetId.md) + - [WriteModelPatchAdSetV24Q1](docs/WriteModelPatchAdSetV24Q1.md) + + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Disclaimer + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/sdks/marketingsolutions_2024-07/api/openapi.yaml b/sdks/marketingsolutions_2024-07/api/openapi.yaml new file mode 100644 index 00000000..5edbf83a --- /dev/null +++ b/sdks/marketingsolutions_2024-07/api/openapi.yaml @@ -0,0 +1,13799 @@ +openapi: 3.0.1 +info: + description: Criteo API - MarketingSolutions + title: Criteo API + version: 2024-07 +servers: +- url: https://api.criteo.com +security: +- oauth: [] +paths: + /2024-07/marketing-solutions/audience-segments/{audience-segment-id}/contact-list: + delete: + description: Delete all identifiers from a contact list audience-segment. + operationId: deleteContactListIdentifiers + parameters: + - description: The id of the contact list audience-segment to amend + explode: false + in: path + name: audience-segment-id + required: true + schema: + format: int32 + type: string + style: simple + responses: + "200": + content: + application/json: + example: + data: + id: "1" + type: AudienceContactlist + errors: [] + warnings: + - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 + type: deprecation + code: deprecated-field + instance: /audiences/314195 + title: '''nbValidIds'' is deprecated' + detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers + schema: + $ref: '#/components/schemas/DeleteAudienceContactListResponse' + description: The Contact List was emptied + "403": + content: + application/json: + example: + errors: + - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 + type: validation + code: audience-invalid + instance: /audience/314159 + title: Audience is invalid + detail: "Audience is not found, please choose a valid audience" + warnings: + - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 + type: deprecation + code: deprecated-field + instance: /audiences/314195 + title: '''nbValidIds'' is deprecated' + detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers + schema: + $ref: '#/components/schemas/ErrorCodeResponse' + description: Forbidden + tags: + - Audience + x-accepts: application/json + patch: + description: Add/remove identifiers to or from a contact list audience-segment. + operationId: updateContactListIdentifiers + parameters: + - description: The id of the contact list audience-segment to amend + explode: false + in: path + name: audience-segment-id + required: true + schema: + format: int32 + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ContactlistAmendmentRequest' + required: true + x-bodyName: body + responses: + "200": + content: + application/json: + example: + data: + type: ContactlistAmendment + attributes: + contactListId: 12 + operation: add + requestDate: 2018-12-10T10:00:50.0000000+00:00 + identifierType: madid + nbValidIdentifiers: 7343 + nbInvalidIdentifiers: 13 + sampleInvalidIdentifiers: + - InvalidIdentifier + errors: [] + warnings: + - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 + type: deprecation + code: deprecated-field + instance: /audiences/314195 + title: '''nbValidIds'' is deprecated' + detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers + schema: + $ref: '#/components/schemas/ModifyAudienceResponse' + description: Summary of created request + "403": + content: + application/json: + example: + errors: + - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 + type: validation + code: audience-invalid + instance: /audience/314159 + title: Audience is invalid + detail: "Audience is not found, please choose a valid audience" + warnings: + - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 + type: deprecation + code: deprecated-field + instance: /audiences/314195 + title: '''nbValidIds'' is deprecated' + detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers + schema: + $ref: '#/components/schemas/ErrorCodeResponse' + description: Forbidden + "404": + content: + application/json: + example: + errors: + - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 + type: validation + code: audience-invalid + instance: /audience/314159 + title: Audience is invalid + detail: "Audience is not found, please choose a valid audience" + warnings: + - traceId: 56ed4096-f96a-4944-8881-05468efe0ec9 + type: deprecation + code: deprecated-field + instance: /audiences/314195 + title: '''nbValidIds'' is deprecated' + detail: The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers + schema: + $ref: '#/components/schemas/ErrorCodeResponse' + description: Audience 123 not found + tags: + - Audience + x-content-type: application/json + x-accepts: application/json + /2024-07/marketing-solutions/me: + get: + description: Get information about the currently logged application + operationId: GetCurrentApplication + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationSummaryModelResponse' + description: Success + "404": + content: + application/json: {} + description: Not Found + tags: + - Gateway + x-accepts: application/json + /2024-07/marketing-solutions/ad-sets/{ad-set-id}/audience: + put: + description: Link or unlink an audience with an ad set + operationId: updateAdSetAudience + parameters: + - description: The ad set ID. + explode: false + in: path + name: ad-set-id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AdSetAudienceLinkInputEntityV1' + application/json: + schema: + $ref: '#/components/schemas/AdSetAudienceLinkInputEntityV1' + text/json: + schema: + $ref: '#/components/schemas/AdSetAudienceLinkInputEntityV1' + application/*+json: + schema: + $ref: '#/components/schemas/AdSetAudienceLinkInputEntityV1' + description: Ad set-Audience update request. + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AdSetAudienceLinkEntityV1Response' + application/json: + schema: + $ref: '#/components/schemas/AdSetAudienceLinkEntityV1Response' + text/json: + schema: + $ref: '#/components/schemas/AdSetAudienceLinkEntityV1Response' + description: Success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Campaign + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/audience-segments: + patch: + description: "Updates the properties of all segments with a valid configuration,\ + \ and returns their IDs. For those that cannot be updated, one or multiple\ + \ errors are returned." + operationId: bulkUpdateAudienceSegments + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AudienceSegmentBulkUpdateInputV1' + application/json: + schema: + $ref: '#/components/schemas/AudienceSegmentBulkUpdateInputV1' + text/json: + schema: + $ref: '#/components/schemas/AudienceSegmentBulkUpdateInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/AudienceSegmentBulkUpdateInputV1' + description: Segment Update request + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AudienceSegmentEntityV1ListResponse' + application/json: + schema: + $ref: '#/components/schemas/AudienceSegmentEntityV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/AudienceSegmentEntityV1ListResponse' + description: Success or partial success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/audience-segments/compute-sizes: + post: + description: Gets the size of all segments. An error is returned for those whose + size calculation is not supported. + operationId: computeAudienceSegmentsSizes + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AudienceSegmentComputeSizesInputV1' + application/json: + schema: + $ref: '#/components/schemas/AudienceSegmentComputeSizesInputV1' + text/json: + schema: + $ref: '#/components/schemas/AudienceSegmentComputeSizesInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/AudienceSegmentComputeSizesInputV1' + description: "" + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AudienceSegmentSizeEntityV1ListResponse' + application/json: + schema: + $ref: '#/components/schemas/AudienceSegmentSizeEntityV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/AudienceSegmentSizeEntityV1ListResponse' + description: Success or partial success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/audience-segments/create: + post: + description: "Creates all segments with a valid configuration, and returns their\ + \ IDs. For those that cannot be created, one or multiple errors are returned." + operationId: bulkCreateAudienceSegments + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AudienceSegmentBulkCreateInputV1' + application/json: + schema: + $ref: '#/components/schemas/AudienceSegmentBulkCreateInputV1' + text/json: + schema: + $ref: '#/components/schemas/AudienceSegmentBulkCreateInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/AudienceSegmentBulkCreateInputV1' + description: Segment creation parameter + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AudienceSegmentEntityV1ListResponse' + application/json: + schema: + $ref: '#/components/schemas/AudienceSegmentEntityV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/AudienceSegmentEntityV1ListResponse' + description: Success or partial success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/audience-segments/delete: + post: + description: Delete the segments associated to the given audience IDs. + operationId: bulkDeleteAudienceSegments + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AudienceSegmentBulkDeleteInputV1' + application/json: + schema: + $ref: '#/components/schemas/AudienceSegmentBulkDeleteInputV1' + text/json: + schema: + $ref: '#/components/schemas/AudienceSegmentBulkDeleteInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/AudienceSegmentBulkDeleteInputV1' + description: Segment delete request. + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AudienceSegmentIdEntityV1ListResponse' + application/json: + schema: + $ref: '#/components/schemas/AudienceSegmentIdEntityV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/AudienceSegmentIdEntityV1ListResponse' + description: Success or partial success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/audience-segments/estimate-size: + post: + description: Gets the size estimation of a non existent segment. An error is + returned when size calculation is not supported. + operationId: estimateAudienceSegmentSize + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AudienceSegmentEstimateSizeInputV1' + application/json: + schema: + $ref: '#/components/schemas/AudienceSegmentEstimateSizeInputV1' + text/json: + schema: + $ref: '#/components/schemas/AudienceSegmentEstimateSizeInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/AudienceSegmentEstimateSizeInputV1' + description: "" + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AudienceSegmentSizeEstimationV1Response' + application/json: + schema: + $ref: '#/components/schemas/AudienceSegmentSizeEstimationV1Response' + text/json: + schema: + $ref: '#/components/schemas/AudienceSegmentSizeEstimationV1Response' + description: Success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/audience-segments/in-market-brands: + get: + description: Returns a list with all available in-market brands that can be + used to define an in-market segment. + operationId: getAudienceSegmentsInMarketBrands + parameters: + - description: The advertiser ID. + explode: true + in: query + name: advertiser-id + required: true + schema: + type: string + style: form + - description: The ISO 3166-1 alpha-2 country code. + explode: true + in: query + name: country + required: true + schema: + type: string + style: form + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/InMarketAudienceSegmentBrandEntityV1ListResponse' + application/json: + schema: + $ref: '#/components/schemas/InMarketAudienceSegmentBrandEntityV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/InMarketAudienceSegmentBrandEntityV1ListResponse' + description: Success + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-accepts: application/json + /2024-07/marketing-solutions/audience-segments/in-market-interests: + get: + description: Returns a list with all available in-market interests that can + be used to define an in-market segment. These in-market interests correspond + to the Google product taxonomy. + operationId: getAudienceSegmentsInMarketInterests + parameters: + - description: The advertiser ID. + explode: true + in: query + name: advertiser-id + required: true + schema: + type: string + style: form + - description: The ISO 3166-1 alpha-2 country code. + explode: true + in: query + name: country + required: true + schema: + type: string + style: form + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/InMarketAudienceSegmentInterestEntityV1ListResponse' + application/json: + schema: + $ref: '#/components/schemas/InMarketAudienceSegmentInterestEntityV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/InMarketAudienceSegmentInterestEntityV1ListResponse' + description: Success + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-accepts: application/json + /2024-07/marketing-solutions/audience-segments/search: + post: + description: "Returns a list of segments that match the provided filters. If\ + \ present, the filters are AND'ed together when applied." + operationId: searchAudienceSegments + parameters: + - description: The number of elements to be returned. The default is 50 and + the maximum is 100. + explode: true + in: query + name: limit + required: false + schema: + default: 50 + format: int32 + maximum: 100 + minimum: 0 + type: integer + style: form + - description: The (zero-based) offset into the collection. The default is 0. + explode: true + in: query + name: offset + required: false + schema: + default: 0 + format: int32 + type: integer + style: form + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AudienceSegmentSearchInputV1' + application/json: + schema: + $ref: '#/components/schemas/AudienceSegmentSearchInputV1' + text/json: + schema: + $ref: '#/components/schemas/AudienceSegmentSearchInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/AudienceSegmentSearchInputV1' + description: Segment search filters. + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse' + application/json: + schema: + $ref: '#/components/schemas/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse' + description: Success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/audience-segments/{audience-segment-id}/contact-list/statistics: + get: + description: Returns the statistics of a contact list segment. + operationId: getAudienceSegmentContactListStatistics + parameters: + - description: The segment ID. + explode: false + in: path + name: audience-segment-id + required: true + schema: + format: int32 + type: integer + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/ContactListStatisticsEntityV1Response' + application/json: + schema: + $ref: '#/components/schemas/ContactListStatisticsEntityV1Response' + text/json: + schema: + $ref: '#/components/schemas/ContactListStatisticsEntityV1Response' + description: Success + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-accepts: application/json + /2024-07/marketing-solutions/audiences: + patch: + description: "Updates the properties of all audiences with a valid configuration,\ + \ and returns their IDs. For those that cannot be updated, one or multiple\ + \ errors are returned." + operationId: bulkUpdateAudiences + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AudienceBulkUpdateInputV1' + application/json: + schema: + $ref: '#/components/schemas/AudienceBulkUpdateInputV1' + text/json: + schema: + $ref: '#/components/schemas/AudienceBulkUpdateInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/AudienceBulkUpdateInputV1' + description: "" + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AudienceEntityV1ListResponse' + application/json: + schema: + $ref: '#/components/schemas/AudienceEntityV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/AudienceEntityV1ListResponse' + description: Success or partial success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/audiences/compute-sizes: + post: + description: Gets the size of all audiences. An error is returned for those + whose size calculation is not supported. + operationId: computeAudiencesSizes + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AudienceComputeSizesInputV1' + application/json: + schema: + $ref: '#/components/schemas/AudienceComputeSizesInputV1' + text/json: + schema: + $ref: '#/components/schemas/AudienceComputeSizesInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/AudienceComputeSizesInputV1' + description: "" + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AudienceSizeEntityV1ListResponse' + application/json: + schema: + $ref: '#/components/schemas/AudienceSizeEntityV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/AudienceSizeEntityV1ListResponse' + description: Success or partial success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/audiences/create: + post: + description: "Creates all audiences with a valid configuration, and returns\ + \ their IDs. For those that cannot be created, one or multiple errors are\ + \ returned." + operationId: bulkCreateAudiences + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AudienceBulkCreateInputV1' + application/json: + schema: + $ref: '#/components/schemas/AudienceBulkCreateInputV1' + text/json: + schema: + $ref: '#/components/schemas/AudienceBulkCreateInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/AudienceBulkCreateInputV1' + description: "" + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AudienceEntityV1ListResponse' + application/json: + schema: + $ref: '#/components/schemas/AudienceEntityV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/AudienceEntityV1ListResponse' + description: Success or partial success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/audiences/delete: + post: + description: Deletes the audiences associated to the given audience IDs. + operationId: bulkDeleteAudiences + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AudienceBulkDeleteInputV1' + application/json: + schema: + $ref: '#/components/schemas/AudienceBulkDeleteInputV1' + text/json: + schema: + $ref: '#/components/schemas/AudienceBulkDeleteInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/AudienceBulkDeleteInputV1' + description: "" + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AudienceIdEntityV1ListResponse' + application/json: + schema: + $ref: '#/components/schemas/AudienceIdEntityV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/AudienceIdEntityV1ListResponse' + description: Success + "204": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Success or partial success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/audiences/estimate-size: + post: + description: Gets the size estimation of a non existent audience. An error is + returned when size calculation is not supported. + operationId: estimateAudienceSize + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AudienceEstimateSizeInputV1' + application/json: + schema: + $ref: '#/components/schemas/AudienceEstimateSizeInputV1' + text/json: + schema: + $ref: '#/components/schemas/AudienceEstimateSizeInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/AudienceEstimateSizeInputV1' + description: "" + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AudienceSizeEstimationV1Response' + application/json: + schema: + $ref: '#/components/schemas/AudienceSizeEstimationV1Response' + text/json: + schema: + $ref: '#/components/schemas/AudienceSizeEstimationV1Response' + description: Success or partial success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/audiences/search: + post: + description: "Returns a list of audiences that match the provided filters. If\ + \ present, the filters are AND'ed together when applied." + operationId: searchAudiences + parameters: + - description: The number of elements to be returned. The default is 50 and + the maximum is 100. + explode: true + in: query + name: limit + required: false + schema: + default: 50 + format: int32 + maximum: 100 + minimum: 0 + type: integer + style: form + - description: The (zero-based) offset into the collection. The default is 0. + explode: true + in: query + name: offset + required: false + schema: + default: 0 + format: int32 + type: integer + style: form + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AudienceSearchInputV1' + application/json: + schema: + $ref: '#/components/schemas/AudienceSearchInputV1' + text/json: + schema: + $ref: '#/components/schemas/AudienceSearchInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/AudienceSearchInputV1' + description: Audience search filters. + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AudienceEntityV1AudienceSearchMetadataV1ListResponse' + application/json: + schema: + $ref: '#/components/schemas/AudienceEntityV1AudienceSearchMetadataV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/AudienceEntityV1AudienceSearchMetadataV1ListResponse' + description: Success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/ad-sets: + patch: + description: Patch a list of AdSets. + operationId: PatchAdSetsV24Q1 + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/RequestsPatchAdSetV24Q1' + application/json: + schema: + $ref: '#/components/schemas/RequestsPatchAdSetV24Q1' + text/json: + schema: + $ref: '#/components/schemas/RequestsPatchAdSetV24Q1' + application/*+json: + schema: + $ref: '#/components/schemas/RequestsPatchAdSetV24Q1' + description: List of adsets to patch. + x-bodyName: adSets + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/ResponsesAdSetIdV24Q1' + application/json: + schema: + $ref: '#/components/schemas/ResponsesAdSetIdV24Q1' + text/json: + schema: + $ref: '#/components/schemas/ResponsesAdSetIdV24Q1' + description: List of patched adSets. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource or + the resource does not exist. + tags: + - Campaign + x-content-type: application/json-patch+json + x-accepts: application/json + post: + description: Create the specified ad set + operationId: CreateAdSetV24Q1 + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/CreateAdSetV24Q1Request' + application/json: + schema: + $ref: '#/components/schemas/CreateAdSetV24Q1Request' + text/json: + schema: + $ref: '#/components/schemas/CreateAdSetV24Q1Request' + application/*+json: + schema: + $ref: '#/components/schemas/CreateAdSetV24Q1Request' + description: the ad sets to create + required: true + x-bodyName: adSet + responses: + "201": + content: + text/plain: + schema: + $ref: '#/components/schemas/ResponseReadAdSetV24Q1' + application/json: + schema: + $ref: '#/components/schemas/ResponseReadAdSetV24Q1' + text/json: + schema: + $ref: '#/components/schemas/ResponseReadAdSetV24Q1' + description: The ad set that has been created and errors / warnings + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad Request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + tags: + - Campaign + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/ad-sets/search: + post: + description: Search for ad sets + operationId: SearchAdSetsV24Q1 + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AdSetSearchRequestV24Q1' + application/json: + schema: + $ref: '#/components/schemas/AdSetSearchRequestV24Q1' + text/json: + schema: + $ref: '#/components/schemas/AdSetSearchRequestV24Q1' + application/*+json: + schema: + $ref: '#/components/schemas/AdSetSearchRequestV24Q1' + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/ResponsesReadAdSetV24Q1' + application/json: + schema: + $ref: '#/components/schemas/ResponsesReadAdSetV24Q1' + text/json: + schema: + $ref: '#/components/schemas/ResponsesReadAdSetV24Q1' + description: data for the ad sets + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad Request + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource or + the resource does not exist. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + tags: + - Campaign + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/ad-sets/start: + post: + description: Start the specified list of ad sets + operationId: StartAdSets + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/RequestsAdSetId' + application/json: + schema: + $ref: '#/components/schemas/RequestsAdSetId' + text/json: + schema: + $ref: '#/components/schemas/RequestsAdSetId' + application/*+json: + schema: + $ref: '#/components/schemas/RequestsAdSetId' + description: All the ad sets to start + x-bodyName: adSets + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/ResponsesAdSetId' + application/json: + schema: + $ref: '#/components/schemas/ResponsesAdSetId' + text/json: + schema: + $ref: '#/components/schemas/ResponsesAdSetId' + description: List of ad sets that have been started and errors / warnings + by ad set + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad Request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + tags: + - Campaign + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/ad-sets/stop: + post: + description: Stop the specified list of ad sets + operationId: StopAdSets + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/RequestsAdSetId' + application/json: + schema: + $ref: '#/components/schemas/RequestsAdSetId' + text/json: + schema: + $ref: '#/components/schemas/RequestsAdSetId' + application/*+json: + schema: + $ref: '#/components/schemas/RequestsAdSetId' + description: All the ad sets to stop + x-bodyName: adSets + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/ResponsesAdSetId' + application/json: + schema: + $ref: '#/components/schemas/ResponsesAdSetId' + text/json: + schema: + $ref: '#/components/schemas/ResponsesAdSetId' + description: List of ad sets that have been stopped and errors / warnings + by ad set + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad Request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + tags: + - Campaign + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/ad-sets/{ad-set-id}: + get: + description: Get the data for the specified ad set + operationId: GetAdSetV24Q1 + parameters: + - description: Id of the ad set + explode: false + in: path + name: ad-set-id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/ResponseReadAdSetV24Q1' + application/json: + schema: + $ref: '#/components/schemas/ResponseReadAdSetV24Q1' + text/json: + schema: + $ref: '#/components/schemas/ResponseReadAdSetV24Q1' + description: data for the ad set + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource or + the resource does not exist. + tags: + - Campaign + x-accepts: application/json + /2024-07/marketing-solutions/ad-sets/{ad-set-id}/category-bids: + get: + description: Get the Category Bids for all valid Categories associated to an + Ad Set + operationId: GetCategoryBidList + parameters: + - description: Id of the Ad Set + explode: false + in: path + name: ad-set-id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AdSetCategoryBidListResponse' + application/json: + schema: + $ref: '#/components/schemas/AdSetCategoryBidListResponse' + text/json: + schema: + $ref: '#/components/schemas/AdSetCategoryBidListResponse' + description: List of Category Bids for all valid Categories associated to + an Ad Set. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad Request + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource or + the resource does not exist. + tags: + - Campaign + x-accepts: application/json + patch: + description: Patch Category Bids for one or more Categories in a single request. + Partial success policy is followed. + operationId: PatchCategoryBidList + parameters: + - description: Id of the Ad Set + explode: false + in: path + name: ad-set-id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/PatchAdSetCategoryBidListRequest' + application/json: + schema: + $ref: '#/components/schemas/PatchAdSetCategoryBidListRequest' + text/json: + schema: + $ref: '#/components/schemas/PatchAdSetCategoryBidListRequest' + application/*+json: + schema: + $ref: '#/components/schemas/PatchAdSetCategoryBidListRequest' + x-bodyName: categoryBidsToUpdate + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/PatchAdSetCategoryBidResultListResponse' + application/json: + schema: + $ref: '#/components/schemas/PatchAdSetCategoryBidResultListResponse' + text/json: + schema: + $ref: '#/components/schemas/PatchAdSetCategoryBidResultListResponse' + description: List of updated Category Bids for given Categories associated + to an Ad Set. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad Request + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource or + the resource does not exist. + tags: + - Campaign + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers: + get: + description: Get the Display Multipliers for all valid Categories associated + to an Ad Set + operationId: GetDisplayMultipliers + parameters: + - description: Id of the Ad Set + explode: false + in: path + name: ad-set-id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AdSetDisplayMultiplierListResponse' + application/json: + schema: + $ref: '#/components/schemas/AdSetDisplayMultiplierListResponse' + text/json: + schema: + $ref: '#/components/schemas/AdSetDisplayMultiplierListResponse' + description: List of Display Multipliers for all valid Categories associated + to an Ad Set. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad Request + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource or + the resource does not exist. + tags: + - Campaign + x-accepts: application/json + patch: + description: Patch Display Multipliers for one or more Categories in a single + request. Partial success policy is followed. + operationId: PatchDisplayMultipliers + parameters: + - description: Id of the Ad Set + explode: false + in: path + name: ad-set-id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/PatchAdSetDisplayMultiplierListRequest' + application/json: + schema: + $ref: '#/components/schemas/PatchAdSetDisplayMultiplierListRequest' + text/json: + schema: + $ref: '#/components/schemas/PatchAdSetDisplayMultiplierListRequest' + application/*+json: + schema: + $ref: '#/components/schemas/PatchAdSetDisplayMultiplierListRequest' + x-bodyName: displayMultipliersToUpdate + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/PatchAdSetDisplayMultiplierResultListResponse' + application/json: + schema: + $ref: '#/components/schemas/PatchAdSetDisplayMultiplierResultListResponse' + text/json: + schema: + $ref: '#/components/schemas/PatchAdSetDisplayMultiplierResultListResponse' + description: List of updated Display Multipliers for given Categories associated + to an Ad Set. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad Request + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource or + the resource does not exist. + tags: + - Campaign + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/campaigns: + patch: + description: Patch a list of Campaigns. + operationId: PatchCampaigns + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/PatchCampaignListRequest' + application/json: + schema: + $ref: '#/components/schemas/PatchCampaignListRequest' + text/json: + schema: + $ref: '#/components/schemas/PatchCampaignListRequest' + application/*+json: + schema: + $ref: '#/components/schemas/PatchCampaignListRequest' + description: List of campaigns to patch. + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/PatchResultCampaignListResponse' + application/json: + schema: + $ref: '#/components/schemas/PatchResultCampaignListResponse' + text/json: + schema: + $ref: '#/components/schemas/PatchResultCampaignListResponse' + description: List of patched campaigns. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource or + the resource does not exist. + tags: + - Campaign + x-content-type: application/json-patch+json + x-accepts: application/json + post: + description: Create the specified campaign + operationId: CreateCampaign + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/CreateCampaignRequest' + application/json: + schema: + $ref: '#/components/schemas/CreateCampaignRequest' + text/json: + schema: + $ref: '#/components/schemas/CreateCampaignRequest' + application/*+json: + schema: + $ref: '#/components/schemas/CreateCampaignRequest' + description: the campaigns to create + required: true + x-bodyName: marketingCampaign + responses: + "201": + content: + text/plain: + schema: + $ref: '#/components/schemas/CampaignV23Q1Response' + application/json: + schema: + $ref: '#/components/schemas/CampaignV23Q1Response' + text/json: + schema: + $ref: '#/components/schemas/CampaignV23Q1Response' + description: The campaign that has been created and errors / warnings + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad Request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + tags: + - Campaign + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/campaigns/search: + post: + description: Search for campaigns + operationId: SearchCampaignsV23Q1 + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/CampaignSearchRequestV23Q1' + application/json: + schema: + $ref: '#/components/schemas/CampaignSearchRequestV23Q1' + text/json: + schema: + $ref: '#/components/schemas/CampaignSearchRequestV23Q1' + application/*+json: + schema: + $ref: '#/components/schemas/CampaignSearchRequestV23Q1' + description: filters on campaigns + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/CampaignV23Q1ListResponse' + application/json: + schema: + $ref: '#/components/schemas/CampaignV23Q1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/CampaignV23Q1ListResponse' + description: data for the campaigns + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad Request + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Forbidden + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + tags: + - Campaign + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/campaigns/{campaign-id}: + get: + description: Get the data for the specified campaign + operationId: GetCampaignV23Q1 + parameters: + - description: Id of the campaign + explode: false + in: path + name: campaign-id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/CampaignV23Q1Response' + application/json: + schema: + $ref: '#/components/schemas/CampaignV23Q1Response' + text/json: + schema: + $ref: '#/components/schemas/CampaignV23Q1Response' + description: data for the campaign + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource or + the resource does not exist. + tags: + - Campaign + x-accepts: application/json + /2024-07/marketing-solutions/ads/{id}: + delete: + description: Delete an Ad + operationId: DeleteAd + parameters: + - description: The ad identifier to delete. + explode: false + in: path + name: id + required: true + schema: + format: int32 + type: integer + style: simple + responses: + "204": + description: The ad was deleted. + "400": + description: The request contained invalid parameters. + "401": + description: The request was not properly authorized. + "500": + description: A non-request based error occurred on the server. + tags: + - Creative + x-accepts: application/json + get: + description: Get an Ad from its id + operationId: GetAd + parameters: + - description: The ad identifier to retrieve. + explode: false + in: path + name: id + required: true + schema: + format: int32 + type: integer + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AdResponse' + application/json: + schema: + $ref: '#/components/schemas/AdResponse' + text/json: + schema: + $ref: '#/components/schemas/AdResponse' + description: The found ad is returned. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request was not properly authorized. + "500": + content: + text/plain: {} + application/json: {} + text/json: {} + description: A non-request based error occurred on the server. + tags: + - Creative + x-accepts: application/json + /2024-07/marketing-solutions/advertisers/{advertiser-id}/ads: + get: + description: Get the list of self-services Ads for a given advertiser + operationId: GetAdvertiserAds + parameters: + - description: The advertiser identifier. + explode: false + in: path + name: advertiser-id + required: true + schema: + type: string + style: simple + - description: The number of ads to be returned. The default is 50. + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: The (zero-based) offset into the collection of ads. The default + is 0. + explode: true + in: query + name: offset + required: false + schema: + format: int32 + type: integer + style: form + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AdListResponse' + application/json: + schema: + $ref: '#/components/schemas/AdListResponse' + text/json: + schema: + $ref: '#/components/schemas/AdListResponse' + description: The list of self-services Ads is returned. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request was not properly authorized. + "500": + content: + text/plain: {} + application/json: {} + text/json: {} + description: A non-request based error occurred on the server. + tags: + - Creative + x-accepts: application/json + post: + description: Create an Ad + operationId: CreateAdvertiserAd + parameters: + - description: The advertiser identifier. + explode: false + in: path + name: advertiser-id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AdWriteRequest' + application/json: + schema: + $ref: '#/components/schemas/AdWriteRequest' + text/json: + schema: + $ref: '#/components/schemas/AdWriteRequest' + application/*+json: + schema: + $ref: '#/components/schemas/AdWriteRequest' + required: true + x-bodyName: request + responses: + "201": + content: + text/plain: + schema: + $ref: '#/components/schemas/AdResponse' + application/json: + schema: + $ref: '#/components/schemas/AdResponse' + text/json: + schema: + $ref: '#/components/schemas/AdResponse' + description: The created Ad is returned. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request was not properly authorized. + "500": + content: + text/plain: {} + application/json: {} + text/json: {} + description: A non-request based error occurred on the server. + tags: + - Creative + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons: + get: + description: Get the list of self-services Coupons for a given advertiser + operationId: GetAdvertiserCoupons + parameters: + - description: The advertiser identifier. + explode: false + in: path + name: advertiser-id + required: true + schema: + type: string + style: simple + - description: The number of coupons to be returned. The default is 50. + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: The (zero-based) offset into the collection of coupons. The default + is 0. + explode: true + in: query + name: offset + required: false + schema: + format: int32 + type: integer + style: form + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/CouponListResponse' + application/json: + schema: + $ref: '#/components/schemas/CouponListResponse' + text/json: + schema: + $ref: '#/components/schemas/CouponListResponse' + description: The list of self-services Coupons is returned. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request was not properly authorized. + tags: + - Creative + x-accepts: application/json + post: + description: Create a Coupon + operationId: CreateAdvertiserCoupon + parameters: + - description: The advertiser identifier. + explode: false + in: path + name: advertiser-id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/CreateCouponRequest' + application/json: + schema: + $ref: '#/components/schemas/CreateCouponRequest' + text/json: + schema: + $ref: '#/components/schemas/CreateCouponRequest' + application/*+json: + schema: + $ref: '#/components/schemas/CreateCouponRequest' + required: true + x-bodyName: request + responses: + "201": + content: + text/plain: + schema: + $ref: '#/components/schemas/CouponResponse' + application/json: + schema: + $ref: '#/components/schemas/CouponResponse' + text/json: + schema: + $ref: '#/components/schemas/CouponResponse' + description: The created Coupon is returned. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request was not properly authorized. + tags: + - Creative + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons-supported-sizes: + get: + description: Get the list of Coupon supported sizes + operationId: GetAdvertiserCouponSupportedSizes + parameters: + - description: The advertiser identifier. + explode: false + in: path + name: advertiser-id + required: true + schema: + type: string + style: simple + - description: The ad set id on which you want to check the Coupon supported + sizes. + explode: true + in: query + name: ad-set-id + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/CouponSupportedSizesResponse' + application/json: + schema: + $ref: '#/components/schemas/CouponSupportedSizesResponse' + text/json: + schema: + $ref: '#/components/schemas/CouponSupportedSizesResponse' + description: The list of Coupon supported sizes is returned. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request was not properly authorized. + tags: + - Creative + x-accepts: application/json + /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id}: + delete: + description: Delete a Coupon + operationId: DeleteAdvertiserCoupon + parameters: + - description: The advertiser identifier. + explode: false + in: path + name: advertiser-id + required: true + schema: + type: string + style: simple + - description: The Coupon identifier to delete. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: The Coupon was deleted. + "400": + description: The request contained invalid parameters. + "403": + description: The request was not properly authorized. + tags: + - Creative + x-accepts: application/json + get: + description: Get a Coupon from its id + operationId: GetAdvertiserCoupon + parameters: + - description: The advertiser identifier. + explode: false + in: path + name: advertiser-id + required: true + schema: + type: string + style: simple + - description: The Coupon identifier to retrieve. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/CouponResponse' + application/json: + schema: + $ref: '#/components/schemas/CouponResponse' + text/json: + schema: + $ref: '#/components/schemas/CouponResponse' + description: The found Coupon is returned. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request was not properly authorized. + tags: + - Creative + x-accepts: application/json + put: + description: Edit a specific Coupon + operationId: EditAdvertiserCoupon + parameters: + - description: The advertiser identifier. + explode: false + in: path + name: advertiser-id + required: true + schema: + type: string + style: simple + - description: The Coupon identifier to edit. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/UpdateCouponRequest' + application/json: + schema: + $ref: '#/components/schemas/UpdateCouponRequest' + text/json: + schema: + $ref: '#/components/schemas/UpdateCouponRequest' + application/*+json: + schema: + $ref: '#/components/schemas/UpdateCouponRequest' + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/CouponResponse' + application/json: + schema: + $ref: '#/components/schemas/CouponResponse' + text/json: + schema: + $ref: '#/components/schemas/CouponResponse' + description: The edited Coupon is returned. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + tags: + - Creative + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id}/preview: + get: + description: Get the preview of a specific Coupon + operationId: GetAdvertiserCouponPreview + parameters: + - description: The advertiser identifier. + explode: false + in: path + name: advertiser-id + required: true + schema: + type: string + style: simple + - description: The Coupon identifier to preview. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: The width of the coupon to preview. + explode: true + in: query + name: width + required: false + schema: + format: int32 + type: integer + style: form + - description: The height of the coupon to preview. + explode: true + in: query + name: height + required: false + schema: + format: int32 + type: integer + style: form + responses: + "200": + content: + text/html: + schema: + type: string + application/json: + schema: + type: string + text/json: + schema: + type: string + description: The preview HTML of a specific Coupon is returned. + "400": + content: + text/html: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + "403": + content: + text/html: {} + application/json: {} + text/json: {} + description: The request was not properly authorized. + tags: + - Creative + x-accepts: application/json + /2024-07/marketing-solutions/advertisers/{advertiser-id}/creatives: + get: + description: Get the list of self-services Creatives for a given advertiser + operationId: GetAdvertiserCreatives + parameters: + - description: The advertiser identifier. + explode: false + in: path + name: advertiser-id + required: true + schema: + type: string + style: simple + - description: The number of creatives to be returned. The default is 50. + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: The (zero-based) offset into the collection of creatives. The + default is 0. + explode: true + in: query + name: offset + required: false + schema: + format: int32 + type: integer + style: form + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/CreativeListResponse' + application/json: + schema: + $ref: '#/components/schemas/CreativeListResponse' + text/json: + schema: + $ref: '#/components/schemas/CreativeListResponse' + description: The list of self-services Creatives is returned. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request was not properly authorized. + "500": + content: + text/plain: {} + application/json: {} + text/json: {} + description: A non-request based error occurred on the server. + tags: + - Creative + x-accepts: application/json + post: + description: Create a Creative + operationId: CreateAdvertiserCreative + parameters: + - description: The advertiser identifier. + explode: false + in: path + name: advertiser-id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/CreativeWriteRequest' + application/json: + schema: + $ref: '#/components/schemas/CreativeWriteRequest' + text/json: + schema: + $ref: '#/components/schemas/CreativeWriteRequest' + application/*+json: + schema: + $ref: '#/components/schemas/CreativeWriteRequest' + required: true + x-bodyName: request + responses: + "201": + content: + text/plain: + schema: + $ref: '#/components/schemas/CreativeResponse' + application/json: + schema: + $ref: '#/components/schemas/CreativeResponse' + text/json: + schema: + $ref: '#/components/schemas/CreativeResponse' + description: The created creative is returned. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request was not properly authorized. + "500": + content: + text/plain: {} + application/json: {} + text/json: {} + description: A non-request based error occurred on the server. + tags: + - Creative + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/creatives/{id}: + delete: + description: Delete a Creative if there are no ads binded to it + operationId: DeleteCreative + parameters: + - description: The creative identifier to delete. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "204": + description: The creative was deleted. + "400": + description: The request contained invalid parameters. + "401": + description: The request was not properly authorized. + "500": + description: A non-request based error occurred on the server. + tags: + - Creative + x-accepts: application/json + get: + description: Get a Creative from its id + operationId: GetCreative + parameters: + - description: The creative identifier to retrieve. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/CreativeResponse' + application/json: + schema: + $ref: '#/components/schemas/CreativeResponse' + text/json: + schema: + $ref: '#/components/schemas/CreativeResponse' + description: The found creative is returned. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request was not properly authorized. + "500": + content: + text/plain: {} + application/json: {} + text/json: {} + description: A non-request based error occurred on the server. + tags: + - Creative + x-accepts: application/json + put: + description: Edit a specific Creative + operationId: EditCreative + parameters: + - description: The creative identifier to edit. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/CreativeWriteRequest' + application/json: + schema: + $ref: '#/components/schemas/CreativeWriteRequest' + text/json: + schema: + $ref: '#/components/schemas/CreativeWriteRequest' + application/*+json: + schema: + $ref: '#/components/schemas/CreativeWriteRequest' + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/CreativeResponse' + application/json: + schema: + $ref: '#/components/schemas/CreativeResponse' + text/json: + schema: + $ref: '#/components/schemas/CreativeResponse' + description: The edited creative is returned. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The request was not properly authorized. + "500": + content: + text/plain: {} + application/json: {} + text/json: {} + description: A non-request based error occurred on the server. + tags: + - Creative + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/marketing-solutions/creatives/{id}/preview: + post: + description: Generate a preview of a specific Creative + operationId: GenerateCreativePreview + parameters: + - description: The Creative identifier to preview. + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: The width of the Creative to preview. + explode: true + in: query + name: width + required: false + schema: + format: int32 + type: integer + style: form + - description: The height of the Creative to preview. + explode: true + in: query + name: height + required: false + schema: + format: int32 + type: integer + style: form + responses: + "200": + content: + text/html: + schema: + type: string + application/json: + schema: + type: string + text/json: + schema: + type: string + description: The preview HTML of a specific Creative is returned. + "400": + content: + text/html: {} + application/json: {} + text/json: {} + description: The request contained invalid parameters. + "403": + content: + text/html: {} + application/json: {} + text/json: {} + description: The request was not properly authorized. + tags: + - Creative + x-accepts: application/json + /2024-07/log-level/advertisers/{advertiser-id}/report: + post: + description: This Statistics endpoint provides publisher data. + operationId: GetTransparencyReport + parameters: + - description: The advertiser id to fetch the transparency data. + explode: false + in: path + name: advertiser-id + required: true + schema: + format: int32 + type: integer + style: simple + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/TransparencyQueryMessage' + application/json: + schema: + $ref: '#/components/schemas/TransparencyQueryMessage' + text/json: + schema: + $ref: '#/components/schemas/TransparencyQueryMessage' + application/*+json: + schema: + $ref: '#/components/schemas/TransparencyQueryMessage' + x-bodyName: queryMessage + responses: + "200": + content: + application/json: + example: + data: + - type: TransparencyReport + attributes: + advertiserId: "123" + tokenValidUntil: 2021-01-31T00:00:00.0000000+00:00 + files: + - fileName: report.csv + url: https://www.example.com/transparency + schema: + $ref: '#/components/schemas/TransparencyReportDataMessage' + text/plain: + schema: + $ref: '#/components/schemas/TransparencyReportDataMessage' + text/json: + schema: + $ref: '#/components/schemas/TransparencyReportDataMessage' + description: Success + "400": + content: + application/json: + example: + errors: + - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 + traceIdentifier: 1234e1717d88aa8a + type: validation + code: required-field + instance: /report + title: Start date and end date are required. + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/plain: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemsDetails' + description: Bad Request + "403": + content: + application/json: + example: + errors: + - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 + traceIdentifier: 1234e1717d88aa8a + type: access-control + code: insufficient-advertiser-permission + instance: /report + title: Insufficient advertiser permission. + detail: You do not have the rights to report on this advertiser. + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/plain: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemsDetails' + description: Forbidden + tags: + - Analytics + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/placements/report: + post: + description: "Your ads are placed in different domains (publishers) and environments\ + \ (websites and apps). Thanks to the placements endpoint, you can analyse\ + \ the performances for each publisher, comparing displays, clicks and sales\ + \ generated." + operationId: GetPlacementsReport + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/PlacementsReportQueryDataMessage' + application/json: + schema: + $ref: '#/components/schemas/PlacementsReportQueryDataMessage' + text/json: + schema: + $ref: '#/components/schemas/PlacementsReportQueryDataMessage' + application/*+json: + schema: + $ref: '#/components/schemas/PlacementsReportQueryDataMessage' + x-bodyName: dataMessage + responses: + "200": + content: + text/plain: + schema: + format: binary + type: string + application/json: + schema: + format: binary + type: string + text/json: + schema: + format: binary + type: string + text/csv: + schema: + format: binary + type: string + text/xml: + schema: + format: binary + type: string + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: + schema: + format: binary + type: string + description: Success + "400": + content: + application/json: + example: + errors: + - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 + traceIdentifier: 1234e1717d88aa8a + type: validation + code: required-field + instance: /report + title: Start date and end date are required. + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/plain: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/csv: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/xml: + schema: + $ref: '#/components/schemas/ProblemsDetails' + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: + schema: + $ref: '#/components/schemas/ProblemsDetails' + description: Bad Request + "403": + content: + application/json: + example: + errors: + - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 + traceIdentifier: 1234e1717d88aa8a + type: access-control + code: insufficient-advertiser-permission + instance: /report + title: Insufficient advertiser permission. + detail: You do not have the rights to report on this advertiser. + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/plain: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/csv: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/xml: + schema: + $ref: '#/components/schemas/ProblemsDetails' + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: + schema: + $ref: '#/components/schemas/ProblemsDetails' + description: Forbidden + tags: + - Analytics + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/statistics/report: + post: + description: "This Statistics endpoint provides adset related data. It is an\ + \ upgrade of our previous Statistics endpoint, and includes new metrics and\ + \ customization capabilities." + operationId: GetAdsetReport + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/StatisticsReportQueryMessage' + application/json: + schema: + $ref: '#/components/schemas/StatisticsReportQueryMessage' + text/json: + schema: + $ref: '#/components/schemas/StatisticsReportQueryMessage' + application/*+json: + schema: + $ref: '#/components/schemas/StatisticsReportQueryMessage' + x-bodyName: reportQuery + responses: + "200": + content: + text/plain: + schema: + format: binary + type: string + application/json: + schema: + format: binary + type: string + text/json: + schema: + format: binary + type: string + text/csv: + schema: + format: binary + type: string + text/xml: + schema: + format: binary + type: string + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: + schema: + format: binary + type: string + description: Success + "400": + content: + application/json: + example: + errors: + - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 + traceIdentifier: 1234e1717d88aa8a + type: validation + code: required-field + instance: /report + title: Start date and end date are required. + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/plain: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/csv: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/xml: + schema: + $ref: '#/components/schemas/ProblemsDetails' + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: + schema: + $ref: '#/components/schemas/ProblemsDetails' + description: Bad Request + "403": + content: + application/json: + example: + errors: + - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 + traceIdentifier: 1234e1717d88aa8a + type: access-control + code: insufficient-advertiser-permission + instance: /report + title: Insufficient advertiser permission. + detail: You do not have the rights to report on this advertiser. + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/plain: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/csv: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/xml: + schema: + $ref: '#/components/schemas/ProblemsDetails' + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: + schema: + $ref: '#/components/schemas/ProblemsDetails' + description: Forbidden + tags: + - Analytics + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/transactions/report: + post: + description: This Transactions endpoint provides transactions id related data. + operationId: GetTransactionsReport + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/TransactionsReportQueryDataMessage' + application/json: + schema: + $ref: '#/components/schemas/TransactionsReportQueryDataMessage' + text/json: + schema: + $ref: '#/components/schemas/TransactionsReportQueryDataMessage' + application/*+json: + schema: + $ref: '#/components/schemas/TransactionsReportQueryDataMessage' + x-bodyName: dataMessage + responses: + "200": + content: + text/plain: + schema: + format: binary + type: string + application/json: + schema: + format: binary + type: string + text/json: + schema: + format: binary + type: string + text/csv: + schema: + format: binary + type: string + text/xml: + schema: + format: binary + type: string + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: + schema: + format: binary + type: string + description: Success + "400": + content: + application/json: + example: + errors: + - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 + traceIdentifier: 1234e1717d88aa8a + type: validation + code: required-field + instance: /report + title: Start date and end date are required. + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/plain: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/csv: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/xml: + schema: + $ref: '#/components/schemas/ProblemsDetails' + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: + schema: + $ref: '#/components/schemas/ProblemsDetails' + description: Bad Request + "403": + content: + application/json: + example: + errors: + - traceId: b7888125-dddb-c94e-9240-eb930c4ea146 + traceIdentifier: 1234e1717d88aa8a + type: access-control + code: insufficient-advertiser-permission + instance: /report + title: Insufficient advertiser permission. + detail: You do not have the rights to report on this advertiser. + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/plain: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/json: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/csv: + schema: + $ref: '#/components/schemas/ProblemsDetails' + text/xml: + schema: + $ref: '#/components/schemas/ProblemsDetails' + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: + schema: + $ref: '#/components/schemas/ProblemsDetails' + description: Forbidden + tags: + - Analytics + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/advertisers/me: + get: + description: Fetch the portfolio of Advertisers for this account + operationId: ApiPortfolioGet + responses: + "200": + content: + application/json: + example: + data: + - type: advertiser + id: "13" + attributes: + advertiserName: ClientName1 + - type: advertiser + id: "1352" + attributes: + advertiserName: ClientName2 + - type: advertiser + id: "73550" + attributes: + advertiserName: ClientName3 + errors: [] + warnings: [] + schema: + $ref: '#/components/schemas/GetPortfolioResponse' + text/plain: + schema: + $ref: '#/components/schemas/GetPortfolioResponse' + text/json: + schema: + $ref: '#/components/schemas/GetPortfolioResponse' + description: Success + "401": + content: + text/plain: + schema: + $ref: '#/components/schemas/GetPortfolioResponse' + application/json: + schema: + $ref: '#/components/schemas/GetPortfolioResponse' + text/json: + schema: + $ref: '#/components/schemas/GetPortfolioResponse' + description: Unauthorized + tags: + - Advertiser + x-accepts: application/json +components: + schemas: + DeleteAudienceContactListResponse: + description: Response of a contactlist deletion + example: + data: + attributes: + name: name + description: description + id: id + type: type + warnings: + - traceId: traceId + code: code + instance: instance + detail: detail + source: "{}" + stackTrace: + - stackTrace + - stackTrace + type: access-control + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: "{}" + stackTrace: + - stackTrace + - stackTrace + type: access-control + title: title + errors: + - traceId: traceId + code: code + instance: instance + detail: detail + source: "{}" + stackTrace: + - stackTrace + - stackTrace + type: access-control + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: "{}" + stackTrace: + - stackTrace + - stackTrace + type: access-control + title: title + properties: + data: + $ref: '#/components/schemas/BasicAudienceDefinition' + errors: + items: + $ref: '#/components/schemas/AudienceError' + type: array + warnings: + items: + $ref: '#/components/schemas/AudienceWarning' + type: array + required: + - data + - errors + - warnings + type: object + ErrorCodeResponse: + description: Definition of the error code + properties: + errors: + items: + $ref: '#/components/schemas/AudienceError' + type: array + warnings: + items: + $ref: '#/components/schemas/AudienceWarning' + nullable: true + type: array + required: + - errors + type: object + ModifyAudienceResponse: + description: Parameters to modify an audience + example: + data: + attributes: + nbValidIdentifiers: 6 + nbInvalidIdentifiers: 1 + sampleInvalidIdentifiers: + - sampleInvalidIdentifiers + - sampleInvalidIdentifiers + contactListId: 0 + requestDate: 2000-01-23T04:56:07.000+00:00 + identifierType: identifierType + operation: operation + type: type + warnings: + - traceId: traceId + code: code + instance: instance + detail: detail + source: "{}" + stackTrace: + - stackTrace + - stackTrace + type: access-control + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: "{}" + stackTrace: + - stackTrace + - stackTrace + type: access-control + title: title + errors: + - traceId: traceId + code: code + instance: instance + detail: detail + source: "{}" + stackTrace: + - stackTrace + - stackTrace + type: access-control + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: "{}" + stackTrace: + - stackTrace + - stackTrace + type: access-control + title: title + properties: + data: + $ref: '#/components/schemas/ContactlistOperation' + errors: + items: + $ref: '#/components/schemas/AudienceError' + type: array + warnings: + items: + $ref: '#/components/schemas/AudienceWarning' + type: array + required: + - data + - errors + - warnings + type: object + ContactlistAmendmentRequest: + description: Request for a contactlist amendment + example: + data: + attributes: + gumCallerId: 0 + identifiers: + - identifiers + - identifiers + identifierType: email + operation: add + type: ContactlistAmendment + properties: + data: + $ref: '#/components/schemas/ContactlistAmendment' + required: + - data + type: object + BasicAudienceDefinition: + description: Common definition of an audience + example: + attributes: + name: name + description: description + id: id + type: type + properties: + id: + description: the id of the entity type + type: string + type: + description: the name of the entity type + type: string + attributes: + $ref: '#/components/schemas/AudienceNameDescription' + required: + - id + - type + type: object + AudienceError: + description: Definition of an audience error + example: + traceId: traceId + code: code + instance: instance + detail: detail + source: "{}" + stackTrace: + - stackTrace + - stackTrace + type: access-control + title: title + properties: + traceId: + description: (REQUIRED) The Correlation ID provided by the Gateway. It is + also a unique identifier for this particular occurrence of the problem. + nullable: true + type: string + type: + description: (REQUIRED) The classification of the error + enum: + - access-control + - authentication + - authorization + - availability + - deprecation + - quota + - validation + type: string + code: + description: "(REQUIRED) A machine-readable unique error code, expressed\ + \ as a string value. The format used must be kebab-case." + type: string + instance: + description: (REQUIRED) A URI reference that identifies the specific occurrence + of the problem + type: string + title: + description: "(RECOMMENDED) A short, human-readable summary of the problem\ + \ type" + nullable: true + type: string + detail: + description: (RECOMMENDED) A human-readable explanation specific to this + occurrence of the problem + nullable: true + type: string + source: + description: (OPTIONAL) A machine-readable structure to reference to the + exact location(s) causing the error(s) + nullable: true + type: object + stackTrace: + description: (NEVER IN PRODUCTION) A human-readable stacktrace produced + by the implementation technology + items: + type: string + nullable: true + type: array + required: + - code + - instance + - type + type: object + AudienceWarning: + description: Definition of the warning + example: + traceId: traceId + code: code + instance: instance + detail: detail + source: "{}" + stackTrace: + - stackTrace + - stackTrace + type: access-control + title: title + properties: + traceId: + description: (REQUIRED) The Correlation ID provided by the Gateway. It is + also a unique identifier for this particular occurrence of the problem. + nullable: true + type: string + type: + description: (REQUIRED) The classification of the error + enum: + - access-control + - authentication + - authorization + - availability + - deprecation + - quota + - validation + type: string + code: + description: "(REQUIRED) A machine-readable unique error code, expressed\ + \ as a string value. The format used must be kebab-case." + type: string + instance: + description: (REQUIRED) A URI reference that identifies the specific occurrence + of the problem + type: string + title: + description: "(RECOMMENDED) A short, human-readable summary of the problem\ + \ type" + nullable: true + type: string + detail: + description: (REQUIRED) A human-readable explanation specific to this occurrence + of the problem + type: string + source: + description: (OPTIONAL) A machine-readable structure to reference to the + exact location(s) causing the error(s) + nullable: true + type: object + stackTrace: + description: (NEVER IN PRODUCTION) A human-readable stacktrace produced + by the implementation technology + items: + type: string + nullable: true + type: array + required: + - code + - detail + - instance + - type + type: object + ContactlistOperation: + description: Response definition of a contactlist operation + example: + attributes: + nbValidIdentifiers: 6 + nbInvalidIdentifiers: 1 + sampleInvalidIdentifiers: + - sampleInvalidIdentifiers + - sampleInvalidIdentifiers + contactListId: 0 + requestDate: 2000-01-23T04:56:07.000+00:00 + identifierType: identifierType + operation: operation + type: type + properties: + type: + description: the name of the entity type + type: string + attributes: + $ref: '#/components/schemas/ContactlistOperation_attributes' + required: + - attributes + - type + type: object + ContactlistAmendment: + description: Parameters for the amendment of a contactlist + example: + attributes: + gumCallerId: 0 + identifiers: + - identifiers + - identifiers + identifierType: email + operation: add + type: ContactlistAmendment + properties: + type: + description: User List + example: ContactlistAmendment + type: string + attributes: + $ref: '#/components/schemas/ContactlistAmendment_attributes' + required: + - attributes + - type + type: object + AudienceNameDescription: + description: Description of an audience with name and detailed description + example: + name: name + description: description + properties: + name: + description: The name to designate the audience by + nullable: true + type: string + description: + description: The description of the audience + nullable: true + type: string + type: object + ApplicationSummaryModelResponse: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + data: + attributes: + organizationId: 6 + name: name + description: description + criteoService: criteoService + applicationId: 0 + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/ApplicationSummaryModelResource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + ApplicationSummaryModelResource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + organizationId: 6 + name: name + description: description + criteoService: criteoService + applicationId: 0 + type: type + properties: + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/ApplicationSummaryModel' + type: object + CommonProblem: + description: Common problem object. + example: + traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + traceId: + description: The request correlation ID this problem comes from. + nullable: true + type: string + traceIdentifier: + description: "The request correlation ID this problem comes from. (deprecated,\ + \ use traceId instead)" + nullable: true + type: string + type: + description: The problem's category. + enum: + - unknown + - access-control + - authentication + - authorization + - availability + - deprecation + - quota + - validation + nullable: true + type: string + code: + description: "A machine-readable error code, expressed as a string value." + nullable: true + type: string + instance: + description: A URI that identifies the specific occurrence of the problem. + nullable: true + type: string + title: + description: A short human-readable description of the problem type + nullable: true + type: string + detail: + description: A human-readable explanation specific to this occurrence of + the problem + nullable: true + type: string + source: + additionalProperties: + type: string + description: A machine-readable structure to reference to the exact location(s) + causing the error(s) + nullable: true + type: object + stackTrace: + nullable: true + type: string + type: object + ApplicationSummaryModel: + description: Used for the /me endpoint. Contains information about the currently + authenticated application that we accept to give to our clients + example: + organizationId: 6 + name: name + description: description + criteoService: criteoService + applicationId: 0 + properties: + applicationId: + format: int32 + nullable: true + type: integer + name: + nullable: true + type: string + organizationId: + format: int32 + nullable: true + type: integer + description: + nullable: true + type: string + criteoService: + nullable: true + type: string + type: object + AdSetAudienceLinkEntityV1Response: + description: A top-level object that encapsulates a Criteo API response for + a single entity + example: + data: + attributes: + audienceId: audienceId + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/AdSetAudienceLinkEntityV1Resource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + AudienceSegmentEntityV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities + example: + data: + - attributes: + prospecting: + daysSinceLastVisitMax: 6 + usersType: Unknown + daysSinceLastVisitMin: 0 + description: description + retargeting: + visitorsType: Unknown + daysSinceLastVisitMax: 7 + daysSinceLastVisitMin: 2 + type: Unknown + lookalike: + targetSize: 9 + seedSegmentId: seedSegmentId + advertiserId: advertiserId + createdAt: 2000-01-23T04:56:07.000+00:00 + contactList: + isReadOnly: true + behavioral: + country: country + endDate: 2000-01-23T04:56:07.000+00:00 + category: Unknown + startDate: 2000-01-23T04:56:07.000+00:00 + name: name + location: + registryType: Unknown + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 5 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Unknown + - Unknown + gender: Unknown + brandIds: + - brandIds + - brandIds + priceRange: + - Unknown + - Unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + - attributes: + prospecting: + daysSinceLastVisitMax: 6 + usersType: Unknown + daysSinceLastVisitMin: 0 + description: description + retargeting: + visitorsType: Unknown + daysSinceLastVisitMax: 7 + daysSinceLastVisitMin: 2 + type: Unknown + lookalike: + targetSize: 9 + seedSegmentId: seedSegmentId + advertiserId: advertiserId + createdAt: 2000-01-23T04:56:07.000+00:00 + contactList: + isReadOnly: true + behavioral: + country: country + endDate: 2000-01-23T04:56:07.000+00:00 + category: Unknown + startDate: 2000-01-23T04:56:07.000+00:00 + name: name + location: + registryType: Unknown + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 5 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Unknown + - Unknown + gender: Unknown + brandIds: + - brandIds + - brandIds + priceRange: + - Unknown + - Unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/AudienceSegmentEntityV1Resource' + nullable: true + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + AudienceSegmentSizeEntityV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities + example: + data: + - attributes: + size: 0 + id: id + type: type + - attributes: + size: 0 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/AudienceSegmentSizeEntityV1Resource' + nullable: true + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + AudienceSegmentIdEntityV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities + example: + data: + - attributes: "{}" + id: id + type: type + - attributes: "{}" + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/AudienceSegmentIdEntityV1Resource' + nullable: true + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + AudienceSegmentSizeEstimationV1Response: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + data: + attributes: + size: 0 + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/AudienceSegmentSizeEstimationV1Resource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + InMarketAudienceSegmentBrandEntityV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities + example: + data: + - attributes: + size: 0 + name: name + id: id + type: type + - attributes: + size: 0 + name: name + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/InMarketAudienceSegmentBrandEntityV1Resource' + nullable: true + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + InMarketAudienceSegmentInterestEntityV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities + example: + data: + - attributes: + parentId: parentId + id: id + type: type + - attributes: + parentId: parentId + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/InMarketAudienceSegmentInterestEntityV1Resource' + nullable: true + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities and metadata + example: + data: + - attributes: + prospecting: + daysSinceLastVisitMax: 6 + usersType: Unknown + daysSinceLastVisitMin: 0 + description: description + retargeting: + visitorsType: Unknown + daysSinceLastVisitMax: 7 + daysSinceLastVisitMin: 2 + type: Unknown + lookalike: + targetSize: 9 + seedSegmentId: seedSegmentId + advertiserId: advertiserId + createdAt: 2000-01-23T04:56:07.000+00:00 + contactList: + isReadOnly: true + behavioral: + country: country + endDate: 2000-01-23T04:56:07.000+00:00 + category: Unknown + startDate: 2000-01-23T04:56:07.000+00:00 + name: name + location: + registryType: Unknown + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 5 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Unknown + - Unknown + gender: Unknown + brandIds: + - brandIds + - brandIds + priceRange: + - Unknown + - Unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + - attributes: + prospecting: + daysSinceLastVisitMax: 6 + usersType: Unknown + daysSinceLastVisitMin: 0 + description: description + retargeting: + visitorsType: Unknown + daysSinceLastVisitMax: 7 + daysSinceLastVisitMin: 2 + type: Unknown + lookalike: + targetSize: 9 + seedSegmentId: seedSegmentId + advertiserId: advertiserId + createdAt: 2000-01-23T04:56:07.000+00:00 + contactList: + isReadOnly: true + behavioral: + country: country + endDate: 2000-01-23T04:56:07.000+00:00 + category: Unknown + startDate: 2000-01-23T04:56:07.000+00:00 + name: name + location: + registryType: Unknown + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 5 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Unknown + - Unknown + gender: Unknown + brandIds: + - brandIds + - brandIds + priceRange: + - Unknown + - Unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + meta: + totalItems: 0 + offset: 1 + limit: 6 + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + meta: + $ref: '#/components/schemas/AudienceSegmentSearchMetadataV1' + data: + items: + $ref: '#/components/schemas/AudienceSegmentEntityV1Resource' + nullable: true + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + ContactListStatisticsEntityV1Response: + description: A top-level object that encapsulates a Criteo API response for + a single entity + example: + data: + attributes: + numberOfIdentifiers: 0 + matchRate: 1.4658129805029452 + numberOfMatches: 6 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/ContactListStatisticsEntityV1Resource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + AudienceEntityV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities + example: + data: + - attributes: + createdAt: 2000-01-23T04:56:07.000+00:00 + adSetIds: + - adSetIds + - adSetIds + name: name + description: description + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + updatedAt: 2000-01-23T04:56:07.000+00:00 + advertiserId: advertiserId + id: id + type: type + - attributes: + createdAt: 2000-01-23T04:56:07.000+00:00 + adSetIds: + - adSetIds + - adSetIds + name: name + description: description + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + updatedAt: 2000-01-23T04:56:07.000+00:00 + advertiserId: advertiserId + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/AudienceEntityV1Resource' + nullable: true + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + AudienceSizeEntityV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities + example: + data: + - attributes: + size: 0 + id: id + type: type + - attributes: + size: 0 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/AudienceSizeEntityV1Resource' + nullable: true + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + AudienceIdEntityV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities + example: + data: + - attributes: "{}" + id: id + type: type + - attributes: "{}" + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/AudienceIdEntityV1Resource' + nullable: true + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + AudienceSizeEstimationV1Response: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + data: + attributes: + size: 0 + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/AudienceSizeEstimationV1Resource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + AudienceEntityV1AudienceSearchMetadataV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities and metadata + example: + data: + - attributes: + createdAt: 2000-01-23T04:56:07.000+00:00 + adSetIds: + - adSetIds + - adSetIds + name: name + description: description + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + updatedAt: 2000-01-23T04:56:07.000+00:00 + advertiserId: advertiserId + id: id + type: type + - attributes: + createdAt: 2000-01-23T04:56:07.000+00:00 + adSetIds: + - adSetIds + - adSetIds + name: name + description: description + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + updatedAt: 2000-01-23T04:56:07.000+00:00 + advertiserId: advertiserId + id: id + type: type + meta: + totalItems: 0 + offset: 1 + limit: 6 + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + meta: + $ref: '#/components/schemas/AudienceSearchMetadataV1' + data: + items: + $ref: '#/components/schemas/AudienceEntityV1Resource' + nullable: true + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + AdSetAudienceLinkInputEntityV1: + description: Input to set audience ad set link. + example: + data: + attributes: + audienceId: audienceId + id: id + type: type + properties: + data: + $ref: '#/components/schemas/AdSetAudienceLinkEntityV1Resource' + type: object + AudienceSegmentBulkUpdateInputV1: + description: Input to update one or more segments. + example: + data: + - attributes: + prospecting: + daysSinceLastVisitMax: + value: 5 + usersType: Prospects + daysSinceLastVisitMin: + value: 5 + name: name + description: + value: value + location: + registryType: PointOfInterest + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 0 + retargeting: + visitorsType: All + daysSinceLastVisitMax: 1 + daysSinceLastVisitMin: 6 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: + value: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + lookalike: + targetSize: 5 + id: id + type: type + - attributes: + prospecting: + daysSinceLastVisitMax: + value: 5 + usersType: Prospects + daysSinceLastVisitMin: + value: 5 + name: name + description: + value: value + location: + registryType: PointOfInterest + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 0 + retargeting: + visitorsType: All + daysSinceLastVisitMax: 1 + daysSinceLastVisitMin: 6 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: + value: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + lookalike: + targetSize: 5 + id: id + type: type + properties: + data: + items: + $ref: '#/components/schemas/AudienceSegmentUpdateEntityV1Resource' + nullable: true + type: array + type: object + AudienceSegmentComputeSizesInputV1: + description: Input to retrieve the size of one or more segments. + example: + data: + - attributes: "{}" + id: id + type: type + - attributes: "{}" + id: id + type: type + properties: + data: + items: + $ref: '#/components/schemas/AudienceSegmentComputeSizeEntityV1Resource' + nullable: true + type: array + type: object + AudienceSegmentBulkCreateInputV1: + description: Input to create one or more audience segments. + example: + data: + - attributes: + contactList: "{}" + prospecting: + daysSinceLastVisitMax: 6 + usersType: Prospects + daysSinceLastVisitMin: 0 + name: name + description: description + location: + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 1 + retargeting: + visitorsType: All + daysSinceLastVisitMax: 5 + daysSinceLastVisitMin: 5 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + lookalike: + targetSize: 2 + seedSegmentId: seedSegmentId + advertiserId: advertiserId + type: type + - attributes: + contactList: "{}" + prospecting: + daysSinceLastVisitMax: 6 + usersType: Prospects + daysSinceLastVisitMin: 0 + name: name + description: description + location: + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 1 + retargeting: + visitorsType: All + daysSinceLastVisitMax: 5 + daysSinceLastVisitMin: 5 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + lookalike: + targetSize: 2 + seedSegmentId: seedSegmentId + advertiserId: advertiserId + type: type + properties: + data: + items: + $ref: '#/components/schemas/AudienceSegmentCreateEntityV1Resource' + nullable: true + type: array + type: object + AudienceSegmentBulkDeleteInputV1: + description: Input to delete one or more segments. + example: + data: + - attributes: "{}" + id: id + type: type + - attributes: "{}" + id: id + type: type + properties: + data: + items: + $ref: '#/components/schemas/AudienceSegmentDeleteEntityV1Resource' + nullable: true + type: array + type: object + AudienceSegmentEstimateSizeInputV1: + description: Input to estimate the size of an audience segment.. + example: + data: + attributes: + location: + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 0 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + advertiserId: advertiserId + type: type + properties: + data: + $ref: '#/components/schemas/AudienceSegmentSizeEstimationEntityV1Resource' + type: object + AudienceSegmentSearchInputV1: + description: Audience segment search parameter + example: + data: + attributes: + advertiserIds: + - advertiserIds + - advertiserIds + audienceSegmentIds: + - audienceSegmentIds + - audienceSegmentIds + audienceSegmentTypes: + - Unknown + - Unknown + type: type + properties: + data: + $ref: '#/components/schemas/AudienceSegmentSearchEntityV1Resource' + type: object + AudienceBulkUpdateInputV1: + description: Input to update one or more audiences. + example: + data: + - attributes: + name: name + description: + value: value + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + id: id + type: type + - attributes: + name: name + description: + value: value + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + id: id + type: type + properties: + data: + items: + $ref: '#/components/schemas/AudienceUpdateEntityV1Resource' + nullable: true + type: array + type: object + AudienceComputeSizesInputV1: + description: Input to retrieve the size of one or more audiences. + example: + data: + - attributes: "{}" + id: id + type: type + - attributes: "{}" + id: id + type: type + properties: + data: + items: + $ref: '#/components/schemas/AudienceComputeSizeEntityV1Resource' + nullable: true + type: array + type: object + AudienceBulkCreateInputV1: + description: Input to create one or more audiences. + example: + data: + - attributes: + name: name + description: description + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + advertiserId: advertiserId + type: type + - attributes: + name: name + description: description + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + advertiserId: advertiserId + type: type + properties: + data: + items: + $ref: '#/components/schemas/AudienceCreateEntityV1Resource' + nullable: true + type: array + type: object + AudienceBulkDeleteInputV1: + description: Input to delete one or more audiences. + example: + data: + - attributes: "{}" + id: id + type: type + - attributes: "{}" + id: id + type: type + properties: + data: + items: + $ref: '#/components/schemas/AudienceDeleteEntityV1Resource' + nullable: true + type: array + type: object + AudienceEstimateSizeInputV1: + description: Input to estimate the size of an audience. + example: + data: + attributes: + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + advertiserId: advertiserId + type: type + properties: + data: + $ref: '#/components/schemas/AudienceEstimateSizeEntityV1Resource' + type: object + AudienceSearchInputV1: + description: Audience search parameter + example: + data: + attributes: + adSetIds: + - adSetIds + - adSetIds + advertiserIds: + - advertiserIds + - advertiserIds + audienceSegmentIds: + - audienceSegmentIds + - audienceSegmentIds + audienceIds: + - audienceIds + - audienceIds + type: type + properties: + data: + $ref: '#/components/schemas/AudienceSearchEntityV1Resource' + type: object + AdSetAudienceLinkEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + audienceId: audienceId + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/AdSetAudienceLinkEntityV1' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceSegmentEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + prospecting: + daysSinceLastVisitMax: 6 + usersType: Unknown + daysSinceLastVisitMin: 0 + description: description + retargeting: + visitorsType: Unknown + daysSinceLastVisitMax: 7 + daysSinceLastVisitMin: 2 + type: Unknown + lookalike: + targetSize: 9 + seedSegmentId: seedSegmentId + advertiserId: advertiserId + createdAt: 2000-01-23T04:56:07.000+00:00 + contactList: + isReadOnly: true + behavioral: + country: country + endDate: 2000-01-23T04:56:07.000+00:00 + category: Unknown + startDate: 2000-01-23T04:56:07.000+00:00 + name: name + location: + registryType: Unknown + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 5 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Unknown + - Unknown + gender: Unknown + brandIds: + - brandIds + - brandIds + priceRange: + - Unknown + - Unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/AudienceSegmentEntityV1' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceSegmentSizeEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + size: 0 + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/AudienceSegmentSizeEntityV1' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceSegmentIdEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: "{}" + id: id + type: type + properties: + attributes: + description: Audience Segment entity only with its ID + type: object + x-criteo-canonical: + infoType: entity + name: AudienceSegment + version: v1 + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceSegmentSizeEstimationV1Resource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + size: 0 + type: type + properties: + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/AudienceSegmentSizeEstimationV1' + type: object + InMarketAudienceSegmentBrandEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + size: 0 + name: name + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/InMarketAudienceSegmentBrandEntityV1' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + InMarketAudienceSegmentInterestEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + parentId: parentId + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/InMarketAudienceSegmentInterestEntityV1' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceSegmentSearchMetadataV1: + description: Metadata for the audience segment search response. + example: + totalItems: 0 + offset: 1 + limit: 6 + properties: + totalItems: + description: Total number of items + format: int32 + nullable: true + type: integer + limit: + description: Max item of the current page + format: int32 + nullable: true + type: integer + offset: + description: Number of item to skip + format: int32 + nullable: true + type: integer + type: object + ContactListStatisticsEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + numberOfIdentifiers: 0 + matchRate: 1.4658129805029452 + numberOfMatches: 6 + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/ContactListStatisticsEntityV1' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + createdAt: 2000-01-23T04:56:07.000+00:00 + adSetIds: + - adSetIds + - adSetIds + name: name + description: description + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + updatedAt: 2000-01-23T04:56:07.000+00:00 + advertiserId: advertiserId + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/AudienceEntityV1' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceSizeEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + size: 0 + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/AudienceSizeEntityV1' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceIdEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: "{}" + id: id + type: type + properties: + attributes: + description: Audience entity with only its ID + type: object + x-criteo-canonical: + infoType: entity + name: Audience + version: v1 + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceSizeEstimationV1Resource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + size: 0 + type: type + properties: + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/AudienceSizeEstimationV1' + type: object + AudienceSearchMetadataV1: + description: Metadata for the audience search response. + example: + totalItems: 0 + offset: 1 + limit: 6 + properties: + totalItems: + description: Total number of items + format: int32 + nullable: true + type: integer + limit: + description: Max item of the current page + format: int32 + nullable: true + type: integer + offset: + description: Number of item to skip + format: int32 + nullable: true + type: integer + type: object + AudienceSegmentUpdateEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + prospecting: + daysSinceLastVisitMax: + value: 5 + usersType: Prospects + daysSinceLastVisitMin: + value: 5 + name: name + description: + value: value + location: + registryType: PointOfInterest + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 0 + retargeting: + visitorsType: All + daysSinceLastVisitMax: 1 + daysSinceLastVisitMin: 6 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: + value: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + lookalike: + targetSize: 5 + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/AudienceSegmentUpdateEntityV1' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceSegmentComputeSizeEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: "{}" + id: id + type: type + properties: + attributes: + description: Set of rules that defines specific people to target. + type: object + x-criteo-canonical: + infoType: entity + name: AudienceSegment + version: v1 + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceSegmentCreateEntityV1Resource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + contactList: "{}" + prospecting: + daysSinceLastVisitMax: 6 + usersType: Prospects + daysSinceLastVisitMin: 0 + name: name + description: description + location: + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 1 + retargeting: + visitorsType: All + daysSinceLastVisitMax: 5 + daysSinceLastVisitMin: 5 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + lookalike: + targetSize: 2 + seedSegmentId: seedSegmentId + advertiserId: advertiserId + type: type + properties: + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/AudienceSegmentCreateEntityV1' + type: object + AudienceSegmentDeleteEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: "{}" + id: id + type: type + properties: + attributes: + description: Segment to delete + type: object + x-criteo-canonical: + infoType: entity + name: AudienceSegment + version: v1 + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceSegmentSizeEstimationEntityV1Resource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + location: + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 0 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + advertiserId: advertiserId + type: type + properties: + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/AudienceSegmentSizeEstimationEntityV1' + type: object + AudienceSegmentSearchEntityV1Resource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + advertiserIds: + - advertiserIds + - advertiserIds + audienceSegmentIds: + - audienceSegmentIds + - audienceSegmentIds + audienceSegmentTypes: + - Unknown + - Unknown + type: type + properties: + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/AudienceSegmentSearchEntityV1' + type: object + AudienceUpdateEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + name: name + description: + value: value + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/AudienceUpdateEntityV1' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceComputeSizeEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: "{}" + id: id + type: type + properties: + attributes: + description: Audience of people of interest for a marketer. + type: object + x-criteo-canonical: + infoType: entity + name: Audience + version: v1 + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceCreateEntityV1Resource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + name: name + description: description + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + advertiserId: advertiserId + type: type + properties: + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/AudienceCreateEntityV1' + type: object + AudienceDeleteEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: "{}" + id: id + type: type + properties: + attributes: + description: Audience to delete + type: object + x-criteo-canonical: + infoType: entity + name: Audience + version: v1 + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + AudienceEstimateSizeEntityV1Resource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + advertiserId: advertiserId + type: type + properties: + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/AudienceEstimateSizeEntityV1' + type: object + AudienceSearchEntityV1Resource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + adSetIds: + - adSetIds + - adSetIds + advertiserIds: + - advertiserIds + - advertiserIds + audienceSegmentIds: + - audienceSegmentIds + - audienceSegmentIds + audienceIds: + - audienceIds + - audienceIds + type: type + properties: + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/AudienceSearchEntityV1' + type: object + AdSetAudienceLinkEntityV1: + description: Link Audience with an ad set + example: + audienceId: audienceId + properties: + audienceId: + nullable: true + type: string + type: object + x-criteo-canonical: + infoType: entity + name: AdSetAudience + version: v1 + AudienceSegmentEntityV1: + description: Set of rules that defines specific people to target. + example: + prospecting: + daysSinceLastVisitMax: 6 + usersType: Unknown + daysSinceLastVisitMin: 0 + description: description + retargeting: + visitorsType: Unknown + daysSinceLastVisitMax: 7 + daysSinceLastVisitMin: 2 + type: Unknown + lookalike: + targetSize: 9 + seedSegmentId: seedSegmentId + advertiserId: advertiserId + createdAt: 2000-01-23T04:56:07.000+00:00 + contactList: + isReadOnly: true + behavioral: + country: country + endDate: 2000-01-23T04:56:07.000+00:00 + category: Unknown + startDate: 2000-01-23T04:56:07.000+00:00 + name: name + location: + registryType: Unknown + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 5 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Unknown + - Unknown + gender: Unknown + brandIds: + - brandIds + - brandIds + priceRange: + - Unknown + - Unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + name: + description: Name of the segment + nullable: true + type: string + description: + description: Description of the segment + nullable: true + type: string + type: + description: Type of segment (read-only) + enum: + - Unknown + - InMarket + - Prospecting + - ContactList + - Location + - Behavioral + - Retargeting + - Lookalike + nullable: true + type: string + createdAt: + description: ISO-8601 timestamp in UTC of segment creation (read-only) + format: date-time + nullable: true + type: string + updatedAt: + description: ISO-8601 timestamp in UTC of segment update (read-only) + format: date-time + nullable: true + type: string + advertiserId: + description: Advertiser associated to the segment + nullable: true + type: string + inMarket: + $ref: '#/components/schemas/InMarketV1' + prospecting: + $ref: '#/components/schemas/ProspectingV1' + contactList: + $ref: '#/components/schemas/ContactListV1' + location: + $ref: '#/components/schemas/LocationV1' + behavioral: + $ref: '#/components/schemas/BehavioralV1' + retargeting: + $ref: '#/components/schemas/RetargetingV1' + lookalike: + $ref: '#/components/schemas/LookalikeV1' + type: object + x-criteo-canonical: + infoType: entity + name: AudienceSegment + version: v1 + AudienceSegmentSizeEntityV1: + description: Set of rules that defines specific people to target. + example: + size: 0 + properties: + size: + format: int64 + nullable: true + type: integer + type: object + x-criteo-canonical: + infoType: entity + name: AudienceSegmentSize + version: v1 + AudienceSegmentIdEntityV1: + description: Audience Segment entity only with its ID + type: object + x-criteo-canonical: + infoType: entity + name: AudienceSegment + version: v1 + AudienceSegmentSizeEstimationV1: + description: Segment size estimation + example: + size: 0 + properties: + size: + format: int64 + nullable: true + type: integer + type: object + InMarketAudienceSegmentBrandEntityV1: + description: In-market segment brand entity + example: + size: 0 + name: name + properties: + name: + description: Name of the in-market segment brand + nullable: true + type: string + size: + description: Size of the in-market segment brand + format: int32 + nullable: true + type: integer + type: object + x-criteo-canonical: + infoType: entity + name: InMarketAudienceSegmentBrand + version: v1 + InMarketAudienceSegmentInterestEntityV1: + description: In-market segment interest entity + example: + parentId: parentId + properties: + parentId: + description: Id of the parent in-market segment interest + nullable: true + type: string + type: object + x-criteo-canonical: + infoType: entity + name: InMarketAudienceSegmentInterest + version: v1 + ContactListStatisticsEntityV1: + description: Contact list statistics. + example: + numberOfIdentifiers: 0 + matchRate: 1.4658129805029452 + numberOfMatches: 6 + properties: + numberOfIdentifiers: + description: Number of identifiers in the contact list. + format: int32 + nullable: true + type: integer + numberOfMatches: + description: Number of matched identifiers in the contact list. + format: int32 + nullable: true + type: integer + matchRate: + description: "Percentage of matched identifiers in the contact list.\r\n\ + Can differ from matches/identifiers depending on the contact list type." + format: double + nullable: true + type: number + type: object + x-criteo-canonical: + infoType: entity + name: ContactListStatistics + version: v1 + AudienceEntityV1: + description: Audience of people of interest for a marketer. + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + adSetIds: + - adSetIds + - adSetIds + name: name + description: description + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + updatedAt: 2000-01-23T04:56:07.000+00:00 + advertiserId: advertiserId + properties: + name: + description: Name of the audience + nullable: true + type: string + description: + description: Description of the audience + nullable: true + type: string + createdAt: + description: ISO-8601 timestamp in UTC of audience creation (read-only) + format: date-time + nullable: true + type: string + updatedAt: + description: ISO-8601 timestamp in UTC of audience update (read-only) + format: date-time + nullable: true + type: string + advertiserId: + description: Advertiser associated to the audience + nullable: true + type: string + adSetIds: + description: Ad sets associated to the audience + items: + type: string + nullable: true + type: array + uniqueItems: true + algebra: + $ref: '#/components/schemas/AlgebraNodeV1' + type: object + x-criteo-canonical: + infoType: entity + name: Audience + version: v1 + AudienceSizeEntityV1: + description: Audience entity only with its size + example: + size: 0 + properties: + size: + format: int64 + nullable: true + type: integer + type: object + x-criteo-canonical: + infoType: entity + name: AudienceSize + version: v1 + AudienceIdEntityV1: + description: Audience entity with only its ID + type: object + x-criteo-canonical: + infoType: entity + name: Audience + version: v1 + AudienceSizeEstimationV1: + description: Audience size estimation + example: + size: 0 + properties: + size: + format: int64 + nullable: true + type: integer + type: object + AudienceSegmentUpdateEntityV1: + description: Set of rules that defines specific people to target. + example: + prospecting: + daysSinceLastVisitMax: + value: 5 + usersType: Prospects + daysSinceLastVisitMin: + value: 5 + name: name + description: + value: value + location: + registryType: PointOfInterest + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 0 + retargeting: + visitorsType: All + daysSinceLastVisitMax: 1 + daysSinceLastVisitMin: 6 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: + value: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + lookalike: + targetSize: 5 + properties: + name: + description: Name of the segment + nullable: true + type: string + description: + $ref: '#/components/schemas/NillableString' + inMarket: + $ref: '#/components/schemas/InMarketUpdateV1' + location: + $ref: '#/components/schemas/LocationUpdateV1' + retargeting: + $ref: '#/components/schemas/RetargetingUpdateV1' + lookalike: + $ref: '#/components/schemas/LookalikeUpdateV1' + prospecting: + $ref: '#/components/schemas/ProspectingUpdateV1' + type: object + x-criteo-canonical: + infoType: entity + name: AudienceSegment + version: v1 + AudienceSegmentComputeSizeEntityV1: + description: Set of rules that defines specific people to target. + type: object + x-criteo-canonical: + infoType: entity + name: AudienceSegment + version: v1 + AudienceSegmentCreateEntityV1: + description: Set of rules that defines specific people to target. + example: + contactList: "{}" + prospecting: + daysSinceLastVisitMax: 6 + usersType: Prospects + daysSinceLastVisitMin: 0 + name: name + description: description + location: + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 1 + retargeting: + visitorsType: All + daysSinceLastVisitMax: 5 + daysSinceLastVisitMin: 5 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + lookalike: + targetSize: 2 + seedSegmentId: seedSegmentId + advertiserId: advertiserId + properties: + name: + description: Name of the segment + type: string + description: + description: Description of the segment + nullable: true + type: string + advertiserId: + description: Advertiser associated to the segment + type: string + inMarket: + $ref: '#/components/schemas/InMarketCreateV1' + prospecting: + $ref: '#/components/schemas/ProspectingCreateV1' + contactList: + description: Settings to target users with your contact lists. + type: object + location: + $ref: '#/components/schemas/LocationCreateV1' + retargeting: + $ref: '#/components/schemas/RetargetingCreateV1' + lookalike: + $ref: '#/components/schemas/LookalikeCreateV1' + required: + - advertiserId + - name + type: object + AudienceSegmentDeleteEntityV1: + description: Segment to delete + type: object + x-criteo-canonical: + infoType: entity + name: AudienceSegment + version: v1 + AudienceSegmentSizeEstimationEntityV1: + description: Set of rules that defines specific people to target. + example: + location: + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 0 + inMarket: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + advertiserId: advertiserId + properties: + advertiserId: + description: Advertiser associated to the segment + type: string + inMarket: + $ref: '#/components/schemas/InMarketSizeEstimationV1' + location: + $ref: '#/components/schemas/LocationSizeEstimationV1' + required: + - advertiserId + type: object + AudienceSegmentSearchEntityV1: + description: "Available filters to perform a search on audience segments. If\ + \ present, the filters are AND'ed together when applied." + example: + advertiserIds: + - advertiserIds + - advertiserIds + audienceSegmentIds: + - audienceSegmentIds + - audienceSegmentIds + audienceSegmentTypes: + - Unknown + - Unknown + properties: + audienceSegmentIds: + description: List of segment ids + items: + type: string + nullable: true + type: array + advertiserIds: + description: List of advertiser ids + items: + type: string + nullable: true + type: array + audienceSegmentTypes: + description: List of segment types + items: + enum: + - Unknown + - InMarket + - Prospecting + - ContactList + - Location + - Behavioral + - Retargeting + - Lookalike + type: string + nullable: true + type: array + type: object + AudienceUpdateEntityV1: + description: Audience of people of interest for a marketer. + example: + name: name + description: + value: value + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + properties: + name: + description: Name of the audience + nullable: true + type: string + description: + $ref: '#/components/schemas/NillableString' + algebra: + $ref: '#/components/schemas/AlgebraNodeV1' + type: object + x-criteo-canonical: + infoType: entity + name: Audience + version: v1 + AudienceComputeSizeEntityV1: + description: Audience of people of interest for a marketer. + type: object + x-criteo-canonical: + infoType: entity + name: Audience + version: v1 + AudienceCreateEntityV1: + description: Audience of people of interest for a marketer. + example: + name: name + description: description + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + advertiserId: advertiserId + properties: + name: + description: Name of the audience + type: string + description: + description: Description of the audience + nullable: true + type: string + advertiserId: + description: Advertiser associated to the audience + type: string + algebra: + $ref: '#/components/schemas/AlgebraNodeV1' + required: + - advertiserId + - algebra + - name + type: object + AudienceDeleteEntityV1: + description: Audience to delete + type: object + x-criteo-canonical: + infoType: entity + name: Audience + version: v1 + AudienceEstimateSizeEntityV1: + description: Audience of people of interest for a marketer. + example: + algebra: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + advertiserId: advertiserId + properties: + advertiserId: + description: Advertiser associated to the audience + type: string + algebra: + $ref: '#/components/schemas/AlgebraNodeV1' + required: + - advertiserId + - algebra + type: object + AudienceSearchEntityV1: + description: "Available filters to perform a search on segments. If present,\ + \ the filters are AND'ed together when applied." + example: + adSetIds: + - adSetIds + - adSetIds + advertiserIds: + - advertiserIds + - advertiserIds + audienceSegmentIds: + - audienceSegmentIds + - audienceSegmentIds + audienceIds: + - audienceIds + - audienceIds + properties: + audienceIds: + description: List of audience ids + items: + type: string + nullable: true + type: array + advertiserIds: + description: List of advertiser ids + items: + type: string + nullable: true + type: array + audienceSegmentIds: + description: List of segment ids (linked to the result audiences) + items: + type: string + nullable: true + type: array + adSetIds: + description: List of AdSet ids + items: + type: string + nullable: true + type: array + type: object + InMarketV1: + description: Settings to target users based on high shopping intents and demographics. + example: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Unknown + - Unknown + gender: Unknown + brandIds: + - brandIds + - brandIds + priceRange: + - Unknown + - Unknown + properties: + country: + description: Reach people of a specific country + nullable: true + type: string + buyingPower: + description: Reach people who frequently purchase high price range items + to lower price range items + items: + enum: + - Unknown + - Low + - Medium + - High + - VeryHigh + type: string + nullable: true + type: array + uniqueItems: true + gender: + description: Reach people who’ve shown interest in products made for a specific + gender + enum: + - Unknown + - Male + - Female + nullable: true + type: string + interestIds: + description: Reach new people based on their interests + items: + type: string + nullable: true + type: array + uniqueItems: true + brandIds: + description: Choose the brands your segment might be interested in + items: + type: string + nullable: true + type: array + uniqueItems: true + priceRange: + description: Reach people who’ve shown interest in products within a specific + price range + items: + enum: + - Unknown + - Low + - Medium + - High + type: string + nullable: true + type: array + uniqueItems: true + type: object + ProspectingV1: + description: Settings to target prospecting users to website visitors. + example: + daysSinceLastVisitMax: 6 + usersType: Unknown + daysSinceLastVisitMin: 0 + properties: + daysSinceLastVisitMin: + description: "When non buyers are included, include users who visited your\ + \ website before this number of days" + format: int32 + nullable: true + type: integer + daysSinceLastVisitMax: + description: "When non buyers are included, include users who visited your\ + \ website after this number of days" + format: int32 + nullable: true + type: integer + usersType: + description: Type of users to target + enum: + - Unknown + - Prospects + - ProspectsOrNonBuyers + nullable: true + type: string + type: object + ContactListV1: + description: Settings to target users with your contact lists. + example: + isReadOnly: true + properties: + isReadOnly: + description: Is the segment read-only + nullable: true + type: boolean + type: object + LocationV1: + description: Settings to target users based on their location. + example: + registryType: Unknown + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 5 + properties: + pointsOfInterest: + description: Reach users which have been historically located in the given + coordinates + items: + $ref: '#/components/schemas/PointOfInterestV1' + nullable: true + type: array + radiusInKm: + description: The expected maximum distance in kilometers between a user + and a point of interest + format: int32 + nullable: true + type: integer + registryType: + description: The kind of Location audience + enum: + - Unknown + - PointOfInterest + nullable: true + type: string + type: object + BehavioralV1: + description: Settings of a behavioral set of users provided by Criteo. + example: + country: country + endDate: 2000-01-23T04:56:07.000+00:00 + category: Unknown + startDate: 2000-01-23T04:56:07.000+00:00 + properties: + country: + description: The users' country + nullable: true + type: string + category: + description: The type of behavioral + enum: + - Unknown + - Lifestyles + - LifeEvents + - Seasonal + - BuyingPatterns + type: string + startDate: + description: Desired date when the behavioral will start + format: date-time + nullable: true + type: string + endDate: + description: Desired date when the behavioral will end + format: date-time + nullable: true + type: string + required: + - category + type: object + RetargetingV1: + description: Settings to target users based on its type and days since last + visit. + example: + visitorsType: Unknown + daysSinceLastVisitMax: 7 + daysSinceLastVisitMin: 2 + properties: + visitorsType: + description: Types of visitors. + enum: + - Unknown + - All + - Buyers + - NonBuyers + nullable: true + type: string + daysSinceLastVisitMin: + description: Minimum number of days since last visit to partner. + format: int32 + nullable: true + type: integer + daysSinceLastVisitMax: + description: Maximum number of days since last visit to partner. + format: int32 + nullable: true + type: integer + type: object + LookalikeV1: + description: Settings to target users that behave like a given seed segment + example: + targetSize: 9 + seedSegmentId: seedSegmentId + properties: + seedSegmentId: + description: Segment from which the Lookalike segment will be generated + nullable: true + type: string + targetSize: + description: Desired size of the generated Lookalike segment + format: int64 + nullable: true + type: integer + type: object + AlgebraNodeV1: + description: Node in the audience algebra definition. + example: + not: null + or: + - null + - null + and: + - null + - null + audienceSegmentId: audienceSegmentId + properties: + and: + items: + $ref: '#/components/schemas/AlgebraNodeV1' + nullable: true + type: array + or: + items: + $ref: '#/components/schemas/AlgebraNodeV1' + nullable: true + type: array + not: + $ref: '#/components/schemas/AlgebraNodeV1' + audienceSegmentId: + nullable: true + type: string + type: object + NillableString: + description: Placeholder object for string value for which "null" is a valid + business value + example: + value: value + properties: + value: + description: The string's value. If missing or null the string's value is + set to "null" + nullable: true + type: string + type: object + InMarketUpdateV1: + description: Settings to target users based on high shopping intents and demographics. + example: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: + value: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + properties: + country: + description: Reach people of a specific country + nullable: true + type: string + buyingPower: + description: Reach people who frequently purchase high price range items + to lower price range items + items: + enum: + - Low + - Medium + - High + - VeryHigh + type: string + nullable: true + type: array + uniqueItems: true + gender: + $ref: '#/components/schemas/NillableGenderV1' + interestIds: + description: Reach new people based on their interests + items: + type: string + nullable: true + type: array + uniqueItems: true + brandIds: + description: Choose the brands your segment might be interested in + items: + type: string + nullable: true + type: array + uniqueItems: true + priceRange: + description: Reach people who’ve shown interest in products within a specific + price range + items: + enum: + - Low + - Medium + - High + type: string + nullable: true + type: array + uniqueItems: true + type: object + LocationUpdateV1: + description: Settings to target users based on their location. + example: + registryType: PointOfInterest + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 0 + properties: + pointsOfInterest: + description: Reach users which have been historically located in the given + coordinates + items: + $ref: '#/components/schemas/PointOfInterestV1' + nullable: true + type: array + radiusInKm: + description: Radius in kilometers + format: int32 + nullable: true + type: integer + registryType: + description: The kind of Location audience + enum: + - PointOfInterest + nullable: true + type: string + type: object + RetargetingUpdateV1: + description: Settings to target users based on its type and days since last + visit. + example: + visitorsType: All + daysSinceLastVisitMax: 1 + daysSinceLastVisitMin: 6 + properties: + visitorsType: + description: Types of visitors. + enum: + - All + - Buyers + - NonBuyers + nullable: true + type: string + daysSinceLastVisitMin: + description: Minimum number of days since last visit to partner. + format: int32 + nullable: true + type: integer + daysSinceLastVisitMax: + description: Maximum number of days since last visit to partner. + format: int32 + nullable: true + type: integer + type: object + LookalikeUpdateV1: + description: Settings to target users that behave like a given seed segment + example: + targetSize: 5 + properties: + targetSize: + description: Desired size of the generated Lookalike segment + format: int64 + nullable: true + type: integer + type: object + ProspectingUpdateV1: + description: Settings to target prospecting users to website visitors. + example: + daysSinceLastVisitMax: + value: 5 + usersType: Prospects + daysSinceLastVisitMin: + value: 5 + properties: + daysSinceLastVisitMin: + $ref: '#/components/schemas/NillableInt32' + daysSinceLastVisitMax: + $ref: '#/components/schemas/NillableInt32' + usersType: + description: Type of users to target + enum: + - Prospects + - ProspectsOrNonBuyers + nullable: true + type: string + type: object + InMarketCreateV1: + description: Settings to target users based on high shopping intents and demographics. + example: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + properties: + country: + description: Reach people of a specific country + type: string + buyingPower: + description: Reach people who frequently purchase high price range items + to lower price range items + items: + enum: + - Low + - Medium + - High + - VeryHigh + type: string + nullable: true + type: array + uniqueItems: true + gender: + description: Reach people who’ve shown interest in products made for a specific + gender + enum: + - Male + - Female + nullable: true + type: string + interestIds: + description: Reach new people based on their interests + items: + type: string + nullable: true + type: array + uniqueItems: true + brandIds: + description: Choose the brands your segment might be interested in + items: + type: string + nullable: true + type: array + uniqueItems: true + priceRange: + description: Reach people who’ve shown interest in products within a specific + price range + items: + enum: + - Low + - Medium + - High + type: string + nullable: true + type: array + uniqueItems: true + required: + - country + type: object + ProspectingCreateV1: + description: Settings to target prospecting users to website visitors. + example: + daysSinceLastVisitMax: 6 + usersType: Prospects + daysSinceLastVisitMin: 0 + properties: + daysSinceLastVisitMin: + description: "When non buyers are included, include users who visited your\ + \ website before this number of days" + format: int32 + nullable: true + type: integer + daysSinceLastVisitMax: + description: "When non buyers are included, include users who visited your\ + \ website after this number of days" + format: int32 + nullable: true + type: integer + usersType: + description: Type of users to target + enum: + - Prospects + - ProspectsOrNonBuyers + type: string + required: + - usersType + type: object + ContactListCreateV1: + description: Settings to target users with your contact lists. + type: object + LocationCreateV1: + description: Settings to target users based on their location. + example: + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 1 + properties: + pointsOfInterest: + description: Reach users which have been historically located in the given + coordinates + items: + $ref: '#/components/schemas/PointOfInterestV1' + type: array + radiusInKm: + description: The expected maximum distance in kilometers between a user + and a point of interest + format: int32 + type: integer + required: + - pointsOfInterest + - radiusInKm + type: object + RetargetingCreateV1: + description: Settings to target users based on its type and days since last + visit. + example: + visitorsType: All + daysSinceLastVisitMax: 5 + daysSinceLastVisitMin: 5 + properties: + visitorsType: + description: Types of visitors. + enum: + - All + - Buyers + - NonBuyers + type: string + daysSinceLastVisitMin: + description: Minimum number of days since last visit to partner. + format: int32 + type: integer + daysSinceLastVisitMax: + description: Maximum number of days since last visit to partner. + format: int32 + type: integer + required: + - daysSinceLastVisitMax + - daysSinceLastVisitMin + - visitorsType + type: object + LookalikeCreateV1: + description: Settings to target users close to a given seed segment. + example: + targetSize: 2 + seedSegmentId: seedSegmentId + properties: + seedSegmentId: + description: Segment from which the Lookalike segment will be generated + type: string + targetSize: + description: Desired size of the generated Lookalike segment + format: int64 + nullable: true + type: integer + required: + - seedSegmentId + type: object + InMarketSizeEstimationV1: + description: Settings to target users based on high shopping intents and demographics. + example: + country: country + interestIds: + - interestIds + - interestIds + buyingPower: + - Low + - Low + gender: Male + brandIds: + - brandIds + - brandIds + priceRange: + - Low + - Low + properties: + country: + type: string + buyingPower: + items: + enum: + - Low + - Medium + - High + - VeryHigh + type: string + nullable: true + type: array + uniqueItems: true + gender: + enum: + - Male + - Female + nullable: true + type: string + interestIds: + items: + type: string + nullable: true + type: array + uniqueItems: true + brandIds: + items: + type: string + nullable: true + type: array + uniqueItems: true + priceRange: + items: + enum: + - Low + - Medium + - High + type: string + nullable: true + type: array + uniqueItems: true + required: + - country + type: object + LocationSizeEstimationV1: + description: Settings to define your audience based on their location. + example: + pointsOfInterest: + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + - latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + radiusInKm: 0 + properties: + pointsOfInterest: + items: + $ref: '#/components/schemas/PointOfInterestV1' + type: array + radiusInKm: + format: int32 + type: integer + required: + - pointsOfInterest + - radiusInKm + type: object + PointOfInterestV1: + description: "Named coordinate defined by its latitude and longitude.\r\nLatitude\ + \ and Longitude are rounded at 5 decimals." + example: + latitude: 1.4658129805029452 + name: name + longitude: 5.962133916683182 + properties: + name: + description: Name of the point of interest + nullable: true + type: string + latitude: + description: ISO-6709 latitude (rounded at 5 decimals) + format: double + nullable: true + type: number + longitude: + description: ISO-6709 longitude (rounded at 5 decimals) + format: double + nullable: true + type: number + type: object + NillableGenderV1: + description: Placeholder object for value for which "null" is a valid business + value + example: + value: Male + properties: + value: + description: The value. If missing or null the value is set to "null" + enum: + - Male + - Female + nullable: true + type: string + type: object + NillableInt32: + description: Placeholder object for value for which "null" is a valid business + value + example: + value: 5 + properties: + value: + description: The value. If missing or null the value is set to "null" + format: int32 + nullable: true + type: integer + type: object + ResponsesAdSetIdV24Q1: + description: List of output resources + example: + data: + - attributes: "{}" + id: id + type: AdSetIdV24Q1 + - attributes: "{}" + id: id + type: AdSetIdV24Q1 + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/ReadModelAdSetIdV24Q1' + nullable: true + readOnly: true + type: array + x-nullable: true + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + type: object + ResponseReadAdSetV24Q1: + description: output resource + example: + data: + attributes: + schedule: + endDate: + value: 2000-01-23T04:56:07.000+00:00 + activationStatus: "on" + startDate: + value: 2000-01-23T04:56:07.000+00:00 + deliveryStatus: draft + targeting: + geoLocation: + zipCodes: + value: null + countries: + value: null + subdivisions: + value: null + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + bidding: + bidAmount: 0.8008281904610115 + costController: COS + campaignId: campaignId + name: name + datasetId: datasetId + mediaType: display + destinationEnvironment: undefined + videoChannel: olv + advertiserId: advertiserId + objective: customAction + budget: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: 1.4658129805029452 + budgetRenewal: undefined + budgetStrategy: capped + id: id + type: ReadAdSetV24Q1 + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/ReadModelReadAdSetV24Q1' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + type: object + ResponsesReadAdSetV24Q1: + description: List of output resources + example: + data: + - attributes: + schedule: + endDate: + value: 2000-01-23T04:56:07.000+00:00 + activationStatus: "on" + startDate: + value: 2000-01-23T04:56:07.000+00:00 + deliveryStatus: draft + targeting: + geoLocation: + zipCodes: + value: null + countries: + value: null + subdivisions: + value: null + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + bidding: + bidAmount: 0.8008281904610115 + costController: COS + campaignId: campaignId + name: name + datasetId: datasetId + mediaType: display + destinationEnvironment: undefined + videoChannel: olv + advertiserId: advertiserId + objective: customAction + budget: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: 1.4658129805029452 + budgetRenewal: undefined + budgetStrategy: capped + id: id + type: ReadAdSetV24Q1 + - attributes: + schedule: + endDate: + value: 2000-01-23T04:56:07.000+00:00 + activationStatus: "on" + startDate: + value: 2000-01-23T04:56:07.000+00:00 + deliveryStatus: draft + targeting: + geoLocation: + zipCodes: + value: null + countries: + value: null + subdivisions: + value: null + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + bidding: + bidAmount: 0.8008281904610115 + costController: COS + campaignId: campaignId + name: name + datasetId: datasetId + mediaType: display + destinationEnvironment: undefined + videoChannel: olv + advertiserId: advertiserId + objective: customAction + budget: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: 1.4658129805029452 + budgetRenewal: undefined + budgetStrategy: capped + id: id + type: ReadAdSetV24Q1 + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/ReadModelReadAdSetV24Q1' + nullable: true + readOnly: true + type: array + x-nullable: true + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + type: object + ResponsesAdSetId: + description: List of output resources + example: + data: + - id: id + type: AdSetId + - id: id + type: AdSetId + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/ReadModelAdSetId' + nullable: true + readOnly: true + type: array + x-nullable: true + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + type: object + AdSetCategoryBidListResponse: + description: Data model for a list of response resources + example: + data: + - attributes: + bidAmount: 0.8008281904610115 + categoryName: categoryName + id: id + type: AdSetCategoryBid + - attributes: + bidAmount: 0.8008281904610115 + categoryName: categoryName + id: id + type: AdSetCategoryBid + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/AdSetCategoryBidResource' + nullable: true + type: array + x-nullable: true + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + type: object + PatchAdSetCategoryBidResultListResponse: + description: Data model for a list of response resources + example: + data: + - id: id + type: AdSetCategoryBid + - id: id + type: AdSetCategoryBid + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/PatchAdSetCategoryBidResultResource' + nullable: true + type: array + x-nullable: true + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + type: object + AdSetDisplayMultiplierListResponse: + description: Data model for a list of response resources + example: + data: + - attributes: + displayMultiplier: 0.8008281904610115 + categoryName: categoryName + id: id + type: AdSetDisplayMultiplier + - attributes: + displayMultiplier: 0.8008281904610115 + categoryName: categoryName + id: id + type: AdSetDisplayMultiplier + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/AdSetDisplayMultiplierResource' + nullable: true + type: array + x-nullable: true + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + type: object + PatchAdSetDisplayMultiplierResultListResponse: + description: Data model for a list of response resources + example: + data: + - id: id + type: AdSetDisplayMultiplier + - id: id + type: AdSetDisplayMultiplier + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/PatchAdSetDisplayMultiplierResultResource' + nullable: true + type: array + x-nullable: true + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + type: object + PatchResultCampaignListResponse: + description: List of output resources + example: + data: + - id: id + type: Campaign + - id: id + type: Campaign + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/PatchResultCampaignReadResource' + nullable: true + readOnly: true + type: array + x-nullable: true + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + type: object + CampaignV23Q1Response: + description: Data model for response resource + example: + data: + attributes: + goal: unspecified + name: name + spendLimit: + spendLimitRenewal: undefined + spendLimitAmount: + value: 0.8008281904610115 + spendLimitType: capped + advertiserId: advertiserId + id: id + type: Campaign + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/CampaignV23Q1Resource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + type: object + CampaignV23Q1ListResponse: + description: Data model for a list of response resources + example: + data: + - attributes: + goal: unspecified + name: name + spendLimit: + spendLimitRenewal: undefined + spendLimitAmount: + value: 0.8008281904610115 + spendLimitType: capped + advertiserId: advertiserId + id: id + type: Campaign + - attributes: + goal: unspecified + name: name + spendLimit: + spendLimitRenewal: undefined + spendLimitAmount: + value: 0.8008281904610115 + spendLimitType: capped + advertiserId: advertiserId + id: id + type: Campaign + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/CampaignV23Q1Resource' + nullable: true + type: array + x-nullable: true + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + type: object + RequestsPatchAdSetV24Q1: + description: List of input resources + example: + data: + - attributes: + targeting: + geoLocation: + zipCodes: + value: null + countries: + value: null + subdivisions: + value: null + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + bidding: + bidAmount: + value: 0.8008281904610115 + name: name + scheduling: + endDate: + value: 2000-01-23T04:56:07.000+00:00 + startDate: + value: 2000-01-23T04:56:07.000+00:00 + budget: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: + value: 0.8008281904610115 + budgetRenewal: undefined + budgetStrategy: capped + id: id + type: PatchAdSetV24Q1 + - attributes: + targeting: + geoLocation: + zipCodes: + value: null + countries: + value: null + subdivisions: + value: null + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + bidding: + bidAmount: + value: 0.8008281904610115 + name: name + scheduling: + endDate: + value: 2000-01-23T04:56:07.000+00:00 + startDate: + value: 2000-01-23T04:56:07.000+00:00 + budget: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: + value: 0.8008281904610115 + budgetRenewal: undefined + budgetStrategy: capped + id: id + type: PatchAdSetV24Q1 + properties: + data: + items: + $ref: '#/components/schemas/WriteModelPatchAdSetV24Q1' + nullable: true + type: array + x-nullable: true + type: object + CreateAdSetV24Q1Request: + description: Data model for an input resources + example: + data: + attributes: + schedule: + endDate: 2000-01-23T04:56:07.000+00:00 + startDate: 2000-01-23T04:56:07.000+00:00 + targeting: + geoLocation: + zipCodes: + values: + - values + - values + operand: undefined + countries: + values: + - values + - values + operand: undefined + subdivisions: + values: + - values + - values + operand: undefined + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + bidding: + bidAmount: 0.8008281904610115 + costController: COS + campaignId: campaignId + name: name + datasetId: datasetId + trackingCode: trackingCode + mediaType: display + objective: customAction + budget: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: 6.027456183070403 + budgetRenewal: undefined + budgetStrategy: capped + type: AdSet + properties: + data: + $ref: '#/components/schemas/CreateAdSetV24Q1Resource' + type: object + AdSetSearchRequestV24Q1: + description: request payload of the search endpoint + example: + filters: + adSetIds: + - adSetIds + - adSetIds + advertiserIds: + - advertiserIds + - advertiserIds + campaignIds: + - campaignIds + - campaignIds + properties: + filters: + $ref: '#/components/schemas/AdSetSearchFilterV24Q1' + type: object + RequestsAdSetId: + description: List of input resources + example: + data: + - id: id + type: AdSetId + - id: id + type: AdSetId + properties: + data: + items: + $ref: '#/components/schemas/WriteModelAdSetId' + nullable: true + type: array + x-nullable: true + type: object + PatchAdSetCategoryBidListRequest: + description: Data model for a list of input resources + example: + data: + - attributes: + bidAmount: 0.8008281904610115 + id: id + type: AdSetCategoryBid + - attributes: + bidAmount: 0.8008281904610115 + id: id + type: AdSetCategoryBid + properties: + data: + items: + $ref: '#/components/schemas/PatchAdSetCategoryBidResource' + nullable: true + type: array + x-nullable: true + type: object + PatchAdSetDisplayMultiplierListRequest: + description: Data model for a list of input resources + example: + data: + - attributes: + displayMultiplier: 0.8008281904610115 + id: id + type: AdSetDisplayMultiplier + - attributes: + displayMultiplier: 0.8008281904610115 + id: id + type: AdSetDisplayMultiplier + properties: + data: + items: + $ref: '#/components/schemas/PatchAdSetDisplayMultiplierResource' + nullable: true + type: array + x-nullable: true + type: object + PatchCampaignListRequest: + description: List of input resources + example: + data: + - attributes: + spendLimit: + spendLimitRenewal: undefined + spendLimitAmount: + value: 0.8008281904610115 + spendLimitType: capped + id: id + type: Campaign + - attributes: + spendLimit: + spendLimitRenewal: undefined + spendLimitAmount: + value: 0.8008281904610115 + spendLimitType: capped + id: id + type: Campaign + properties: + data: + items: + $ref: '#/components/schemas/PatchCampaignWriteResource' + nullable: true + type: array + x-nullable: true + type: object + CreateCampaignRequest: + description: Data model for an input resources + example: + data: + attributes: + goal: Unspecified + name: name + spendLimit: + spendLimitRenewal: undefined + spendLimitAmount: 0.8008281904610115 + spendLimitType: capped + advertiserId: advertiserId + type: Campaign + properties: + data: + $ref: '#/components/schemas/CreateCampaignResource' + type: object + CampaignSearchRequestV23Q1: + description: request payload of the search endpoint + example: + filters: + advertiserIds: + - advertiserIds + - advertiserIds + campaignIds: + - campaignIds + - campaignIds + properties: + filters: + $ref: '#/components/schemas/CampaignSearchFiltersV23Q1' + type: object + ReadModelAdSetIdV24Q1: + description: read model data for resources + example: + attributes: "{}" + id: id + type: AdSetIdV24Q1 + properties: + id: + description: Id of the entity + nullable: true + readOnly: true + type: string + x-nullable: true + type: + example: AdSetIdV24Q1 + nullable: true + readOnly: true + type: string + x-nullable: true + attributes: + description: ad set id model + type: object + type: object + ReadModelReadAdSetV24Q1: + description: read model data for resources + example: + attributes: + schedule: + endDate: + value: 2000-01-23T04:56:07.000+00:00 + activationStatus: "on" + startDate: + value: 2000-01-23T04:56:07.000+00:00 + deliveryStatus: draft + targeting: + geoLocation: + zipCodes: + value: null + countries: + value: null + subdivisions: + value: null + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + bidding: + bidAmount: 0.8008281904610115 + costController: COS + campaignId: campaignId + name: name + datasetId: datasetId + mediaType: display + destinationEnvironment: undefined + videoChannel: olv + advertiserId: advertiserId + objective: customAction + budget: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: 1.4658129805029452 + budgetRenewal: undefined + budgetStrategy: capped + id: id + type: ReadAdSetV24Q1 + properties: + id: + description: Id of the entity + nullable: true + readOnly: true + type: string + x-nullable: true + type: + example: ReadAdSetV24Q1 + nullable: true + readOnly: true + type: string + x-nullable: true + attributes: + $ref: '#/components/schemas/ReadAdSetV24Q1' + type: object + ReadModelAdSetId: + description: read model data for resources + example: + id: id + type: AdSetId + properties: + id: + description: Id of the entity + nullable: true + readOnly: true + type: string + x-nullable: true + type: + example: AdSetId + nullable: true + readOnly: true + type: string + x-nullable: true + type: object + AdSetCategoryBidResource: + description: Data model for a Resource + example: + attributes: + bidAmount: 0.8008281904610115 + categoryName: categoryName + id: id + type: AdSetCategoryBid + properties: + attributes: + $ref: '#/components/schemas/AdSetCategoryBid' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + example: AdSetCategoryBid + nullable: true + type: string + type: object + PatchAdSetCategoryBidResultResource: + description: Data model for a Resource + example: + id: id + type: AdSetCategoryBid + properties: + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + example: AdSetCategoryBid + nullable: true + type: string + type: object + AdSetDisplayMultiplierResource: + description: Data model for a Resource + example: + attributes: + displayMultiplier: 0.8008281904610115 + categoryName: categoryName + id: id + type: AdSetDisplayMultiplier + properties: + attributes: + $ref: '#/components/schemas/AdSetDisplayMultiplier' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + example: AdSetDisplayMultiplier + nullable: true + type: string + type: object + PatchAdSetDisplayMultiplierResultResource: + description: Data model for a Resource + example: + id: id + type: AdSetDisplayMultiplier + properties: + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + example: AdSetDisplayMultiplier + nullable: true + type: string + type: object + PatchResultCampaignReadResource: + description: read model data for resources + example: + id: id + type: Campaign + properties: + id: + description: Id of the entity + nullable: true + readOnly: true + type: string + x-nullable: true + type: + example: Campaign + nullable: true + readOnly: true + type: string + x-nullable: true + type: object + CampaignV23Q1Resource: + description: Data model for a Resource + example: + attributes: + goal: unspecified + name: name + spendLimit: + spendLimitRenewal: undefined + spendLimitAmount: + value: 0.8008281904610115 + spendLimitType: capped + advertiserId: advertiserId + id: id + type: Campaign + properties: + attributes: + $ref: '#/components/schemas/CampaignV23Q1' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + example: Campaign + nullable: true + type: string + type: object + WriteModelPatchAdSetV24Q1: + description: write model data for resources + example: + attributes: + targeting: + geoLocation: + zipCodes: + value: null + countries: + value: null + subdivisions: + value: null + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + bidding: + bidAmount: + value: 0.8008281904610115 + name: name + scheduling: + endDate: + value: 2000-01-23T04:56:07.000+00:00 + startDate: + value: 2000-01-23T04:56:07.000+00:00 + budget: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: + value: 0.8008281904610115 + budgetRenewal: undefined + budgetStrategy: capped + id: id + type: PatchAdSetV24Q1 + properties: + id: + description: Id of the entity + nullable: true + type: string + x-nullable: true + type: + description: Canonical type name of the entity + example: PatchAdSetV24Q1 + nullable: true + type: string + x-nullable: true + attributes: + $ref: '#/components/schemas/PatchAdSetV24Q1' + type: object + CreateAdSetV24Q1Resource: + description: Data model for a Resource + example: + attributes: + schedule: + endDate: 2000-01-23T04:56:07.000+00:00 + startDate: 2000-01-23T04:56:07.000+00:00 + targeting: + geoLocation: + zipCodes: + values: + - values + - values + operand: undefined + countries: + values: + - values + - values + operand: undefined + subdivisions: + values: + - values + - values + operand: undefined + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + bidding: + bidAmount: 0.8008281904610115 + costController: COS + campaignId: campaignId + name: name + datasetId: datasetId + trackingCode: trackingCode + mediaType: display + objective: customAction + budget: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: 6.027456183070403 + budgetRenewal: undefined + budgetStrategy: capped + type: AdSet + properties: + attributes: + $ref: '#/components/schemas/CreateAdSetV24Q1' + type: + description: Canonical type name of the entity + example: AdSet + nullable: true + type: string + type: object + AdSetSearchFilterV24Q1: + description: filter on ad set ids + example: + adSetIds: + - adSetIds + - adSetIds + advertiserIds: + - advertiserIds + - advertiserIds + campaignIds: + - campaignIds + - campaignIds + properties: + adSetIds: + items: + type: string + nullable: true + type: array + x-nullable: true + advertiserIds: + items: + type: string + nullable: true + type: array + x-nullable: true + campaignIds: + items: + type: string + nullable: true + type: array + x-nullable: true + type: object + WriteModelAdSetId: + description: write model data for resources + example: + id: id + type: AdSetId + properties: + id: + description: Id of the entity + nullable: true + type: string + x-nullable: true + type: + description: Canonical type name of the entity + example: AdSetId + nullable: true + type: string + x-nullable: true + type: object + PatchAdSetCategoryBidResource: + description: Data model for a Resource + example: + attributes: + bidAmount: 0.8008281904610115 + id: id + type: AdSetCategoryBid + properties: + attributes: + $ref: '#/components/schemas/PatchAdSetCategoryBid' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + example: AdSetCategoryBid + nullable: true + type: string + type: object + PatchAdSetDisplayMultiplierResource: + description: Data model for a Resource + example: + attributes: + displayMultiplier: 0.8008281904610115 + id: id + type: AdSetDisplayMultiplier + properties: + attributes: + $ref: '#/components/schemas/PatchAdSetDisplayMultiplier' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + example: AdSetDisplayMultiplier + nullable: true + type: string + type: object + PatchCampaignWriteResource: + description: write model data for resources + example: + attributes: + spendLimit: + spendLimitRenewal: undefined + spendLimitAmount: + value: 0.8008281904610115 + spendLimitType: capped + id: id + type: Campaign + properties: + id: + description: Id of the entity + nullable: true + type: string + x-nullable: true + type: + description: Canonical type name of the entity + example: Campaign + nullable: true + type: string + x-nullable: true + attributes: + $ref: '#/components/schemas/PatchCampaign' + type: object + CreateCampaignResource: + description: Data model for a Resource + example: + attributes: + goal: Unspecified + name: name + spendLimit: + spendLimitRenewal: undefined + spendLimitAmount: 0.8008281904610115 + spendLimitType: capped + advertiserId: advertiserId + type: Campaign + properties: + attributes: + $ref: '#/components/schemas/CreateCampaign' + type: + description: Canonical type name of the entity + example: Campaign + nullable: true + type: string + type: object + CampaignSearchFiltersV23Q1: + description: filters on campaign + example: + advertiserIds: + - advertiserIds + - advertiserIds + campaignIds: + - campaignIds + - campaignIds + properties: + campaignIds: + items: + type: string + nullable: true + type: array + x-nullable: true + advertiserIds: + items: + type: string + nullable: true + type: array + x-nullable: true + type: object + AdSetIdV24Q1: + description: ad set id model + type: object + ReadAdSetV24Q1: + description: ad set read model + example: + schedule: + endDate: + value: 2000-01-23T04:56:07.000+00:00 + activationStatus: "on" + startDate: + value: 2000-01-23T04:56:07.000+00:00 + deliveryStatus: draft + targeting: + geoLocation: + zipCodes: + value: null + countries: + value: null + subdivisions: + value: null + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + bidding: + bidAmount: 0.8008281904610115 + costController: COS + campaignId: campaignId + name: name + datasetId: datasetId + mediaType: display + destinationEnvironment: undefined + videoChannel: olv + advertiserId: advertiserId + objective: customAction + budget: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: 1.4658129805029452 + budgetRenewal: undefined + budgetStrategy: capped + properties: + name: + nullable: true + type: string + x-nullable: true + advertiserId: + nullable: true + type: string + x-nullable: true + datasetId: + nullable: true + type: string + x-nullable: true + campaignId: + nullable: true + type: string + x-nullable: true + destinationEnvironment: + enum: + - undefined + - web + - app + nullable: true + type: string + objective: + enum: + - customAction + - clicks + - conversions + - displays + - appPromotion + - revenue + - storeConversions + - value + - reach + - visits + - videoViews + nullable: true + type: string + schedule: + $ref: '#/components/schemas/ReadAdSetScheduleV24Q1' + bidding: + $ref: '#/components/schemas/ReadAdSetBiddingV24Q1' + targeting: + $ref: '#/components/schemas/AdSetTargetingV24Q1' + budget: + $ref: '#/components/schemas/ReadAdSetBudgetV24Q1' + mediaType: + enum: + - display + - video + nullable: true + type: string + x-nullable: true + videoChannel: + enum: + - olv + - ctv + nullable: true + type: string + x-nullable: true + type: object + AdSetCategoryBid: + description: Category Bid information about a Category for a given Ad Set. + example: + bidAmount: 0.8008281904610115 + categoryName: categoryName + properties: + categoryName: + description: The name of the Category to which the Category Bid has been + applied. + nullable: true + type: string + x-nullable: true + bidAmount: + description: The Bid amount applied to the given Category associated to + an Ad Set. At most 4 decimals are supported. Additional decimals are rounded. + format: double + nullable: true + type: number + type: object + AdSetDisplayMultiplier: + description: Display Multiplier information about a Category for a given Ad + Set. + example: + displayMultiplier: 0.8008281904610115 + categoryName: categoryName + properties: + categoryName: + description: The name of the Category to which the given for which the Display + Multiplier has been applied. + nullable: true + type: string + x-nullable: true + displayMultiplier: + description: The Display Multiplier applied to the given Category associated + to an Ad Set. + format: double + nullable: true + type: number + type: object + CampaignV23Q1: + description: campaign read model + example: + goal: unspecified + name: name + spendLimit: + spendLimitRenewal: undefined + spendLimitAmount: + value: 0.8008281904610115 + spendLimitType: capped + advertiserId: advertiserId + properties: + name: + nullable: true + type: string + x-nullable: true + advertiserId: + nullable: true + type: string + x-nullable: true + spendLimit: + $ref: '#/components/schemas/CampaignSpendLimitV23Q1' + goal: + enum: + - unspecified + - acquisition + - retention + nullable: true + type: string + type: object + PatchAdSetV24Q1: + description: ad set patch model + example: + targeting: + geoLocation: + zipCodes: + value: null + countries: + value: null + subdivisions: + value: null + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + bidding: + bidAmount: + value: 0.8008281904610115 + name: name + scheduling: + endDate: + value: 2000-01-23T04:56:07.000+00:00 + startDate: + value: 2000-01-23T04:56:07.000+00:00 + budget: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: + value: 0.8008281904610115 + budgetRenewal: undefined + budgetStrategy: capped + properties: + name: + nullable: true + type: string + x-nullable: true + scheduling: + $ref: '#/components/schemas/PatchAdSetSchedulingV24Q1' + bidding: + $ref: '#/components/schemas/PatchAdSetBiddingV24Q1' + targeting: + $ref: '#/components/schemas/AdSetTargetingV24Q1' + budget: + $ref: '#/components/schemas/PatchAdSetBudgetV24Q1' + type: object + CreateAdSetV24Q1: + description: ad set create model + example: + schedule: + endDate: 2000-01-23T04:56:07.000+00:00 + startDate: 2000-01-23T04:56:07.000+00:00 + targeting: + geoLocation: + zipCodes: + values: + - values + - values + operand: undefined + countries: + values: + - values + - values + operand: undefined + subdivisions: + values: + - values + - values + operand: undefined + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + bidding: + bidAmount: 0.8008281904610115 + costController: COS + campaignId: campaignId + name: name + datasetId: datasetId + trackingCode: trackingCode + mediaType: display + objective: customAction + budget: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: 6.027456183070403 + budgetRenewal: undefined + budgetStrategy: capped + properties: + name: + description: Name of the ad set + nullable: true + type: string + x-nullable: true + datasetId: + description: Dataset id of this ad set + nullable: true + type: string + x-nullable: true + campaignId: + description: Campaign id this ad set belongs to + nullable: true + type: string + x-nullable: true + objective: + description: Objective of the ad set + enum: + - customAction + - clicks + - conversions + - displays + - appPromotion + - revenue + - storeConversions + - value + - reach + - visits + - videoViews + type: string + schedule: + $ref: '#/components/schemas/CreateAdSetScheduleV24Q1' + bidding: + $ref: '#/components/schemas/CreateAdSetBiddingV24Q1' + targeting: + $ref: '#/components/schemas/CreateAdSetTargetingV24Q1' + budget: + $ref: '#/components/schemas/CreateAdSetBudgetV24Q1' + trackingCode: + description: The click tracking code associated to this Ad Set. + nullable: true + type: string + x-nullable: true + mediaType: + description: Media type for the ad set + enum: + - display + - video + type: string + required: + - bidding + - budget + - campaignId + - datasetId + - mediaType + - name + - objective + - schedule + - targeting + - trackingCode + type: object + PatchAdSetCategoryBid: + description: Category Bid to update for a given combination of Ad Set and Category. + example: + bidAmount: 0.8008281904610115 + properties: + bidAmount: + description: The Bid amount applied to the given Category associated to + an Ad Set. At most 4 decimals are supported. Additional decimals are rounded. + format: double + nullable: true + type: number + type: object + PatchAdSetDisplayMultiplier: + description: Display Multiplier to update for a given combination of Ad Set + and Category. + example: + displayMultiplier: 0.8008281904610115 + properties: + displayMultiplier: + description: Any positive decimal value. To remove the impact of the Display + Multiplier set it to 1. At most 4 decimals are supported. Additional decimals + are rounded. + format: double + nullable: true + type: number + type: object + PatchCampaign: + description: campaign patch model + example: + spendLimit: + spendLimitRenewal: undefined + spendLimitAmount: + value: 0.8008281904610115 + spendLimitType: capped + properties: + spendLimit: + $ref: '#/components/schemas/PatchCampaignSpendLimit' + type: object + CreateCampaign: + description: Campaign create model + example: + goal: Unspecified + name: name + spendLimit: + spendLimitRenewal: undefined + spendLimitAmount: 0.8008281904610115 + spendLimitType: capped + advertiserId: advertiserId + properties: + name: + description: Name of the campaign + nullable: true + type: string + x-nullable: true + advertiserId: + description: Advertiser id this campaign belongs to + nullable: true + type: string + x-nullable: true + goal: + description: Goal for the marketing campaign + enum: + - Unspecified + - Acquisition + - Retention + type: string + spendLimit: + $ref: '#/components/schemas/CreateCampaignSpendLimit' + required: + - advertiserId + - goal + - name + - spendLimit + type: object + ReadAdSetScheduleV24Q1: + description: ad set schedule read model + example: + endDate: + value: 2000-01-23T04:56:07.000+00:00 + activationStatus: "on" + startDate: + value: 2000-01-23T04:56:07.000+00:00 + deliveryStatus: draft + properties: + startDate: + $ref: '#/components/schemas/NillableDateTime' + endDate: + $ref: '#/components/schemas/NillableDateTime' + activationStatus: + enum: + - "on" + - "off" + nullable: true + type: string + deliveryStatus: + enum: + - draft + - inactive + - live + - notLive + - pausing + - paused + - scheduled + - ended + - notDelivering + - archived + nullable: true + type: string + type: object + ReadAdSetBiddingV24Q1: + description: ad set bidding read model + example: + bidAmount: 0.8008281904610115 + costController: COS + properties: + bidAmount: + description: Decimal value target relating to the `adSetObjective` specified. + May be `null` for objectives that do not require a target value. At most + 4 decimals are supported. Additional decimals are rounded. + format: double + nullable: true + type: number + x-nullable: true + costController: + description: How spend is controlled + enum: + - COS + - CPC + - CPI + - CPM + - CPO + - CPSV + - CPV + - dailyBudget + - targetCPM + nullable: true + type: string + type: object + AdSetTargetingV24Q1: + description: ad set targeting model + example: + geoLocation: + zipCodes: + value: null + countries: + value: null + subdivisions: + value: null + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + properties: + deliveryLimitations: + $ref: '#/components/schemas/AdSetDeliveryLimitationsV24Q1' + geoLocation: + $ref: '#/components/schemas/AdSetGeoLocationV24Q1' + frequencyCapping: + $ref: '#/components/schemas/AdSetFrequencyCappingV24Q1' + type: object + ReadAdSetBudgetV24Q1: + description: ad set budget read model + example: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: 1.4658129805029452 + budgetRenewal: undefined + budgetStrategy: capped + properties: + budgetStrategy: + enum: + - capped + - uncapped + nullable: true + type: string + budgetRenewal: + enum: + - undefined + - daily + - monthly + - lifetime + - weekly + nullable: true + type: string + budgetDeliverySmoothing: + enum: + - accelerated + - standard + nullable: true + type: string + x-nullable: true + budgetDeliveryWeek: + enum: + - undefined + - mondayToSunday + - tuesdayToMonday + - wednesdayToTuesday + - thursdayToWednesday + - fridayToThursday + - saturdayToFriday + - sundayToSaturday + nullable: true + type: string + budgetAmount: + format: double + nullable: true + type: number + x-nullable: true + type: object + CampaignSpendLimitV23Q1: + description: campaign spend limit model + example: + spendLimitRenewal: undefined + spendLimitAmount: + value: 0.8008281904610115 + spendLimitType: capped + properties: + spendLimitType: + enum: + - capped + - uncapped + nullable: true + type: string + spendLimitRenewal: + enum: + - undefined + - daily + - monthly + - lifetime + nullable: true + type: string + spendLimitAmount: + $ref: '#/components/schemas/NillableDecimal' + type: object + PatchAdSetSchedulingV24Q1: + description: ad set schedule patch model + example: + endDate: + value: 2000-01-23T04:56:07.000+00:00 + startDate: + value: 2000-01-23T04:56:07.000+00:00 + properties: + startDate: + $ref: '#/components/schemas/NillableDateTime' + endDate: + $ref: '#/components/schemas/NillableDateTime' + type: object + PatchAdSetBiddingV24Q1: + description: ad set bidding patch model + example: + bidAmount: + value: 0.8008281904610115 + properties: + bidAmount: + $ref: '#/components/schemas/NillableDecimal' + type: object + PatchAdSetBudgetV24Q1: + description: ad set budget patch model + example: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: + value: 0.8008281904610115 + budgetRenewal: undefined + budgetStrategy: capped + properties: + budgetStrategy: + enum: + - capped + - uncapped + nullable: true + type: string + x-nullable: true + budgetRenewal: + enum: + - undefined + - daily + - monthly + - lifetime + - weekly + nullable: true + type: string + x-nullable: true + budgetDeliverySmoothing: + enum: + - accelerated + - standard + nullable: true + type: string + x-nullable: true + budgetDeliveryWeek: + enum: + - undefined + - mondayToSunday + - tuesdayToMonday + - wednesdayToTuesday + - thursdayToWednesday + - fridayToThursday + - saturdayToFriday + - sundayToSaturday + nullable: true + type: string + x-nullable: true + budgetAmount: + $ref: '#/components/schemas/NillableDecimal' + type: object + CreateAdSetScheduleV24Q1: + description: ad set schedule create model + example: + endDate: 2000-01-23T04:56:07.000+00:00 + startDate: 2000-01-23T04:56:07.000+00:00 + properties: + startDate: + format: date-time + type: string + endDate: + format: date-time + nullable: true + type: string + x-nullable: true + required: + - startDate + type: object + CreateAdSetBiddingV24Q1: + description: ad set bidding create model + example: + bidAmount: 0.8008281904610115 + costController: COS + properties: + bidAmount: + description: Decimal value target relating to the `bidStrategy` specified. + May be `null` for strategies that do not require a target value. At most + 4 decimals are supported. Additional decimals are rounded. + format: double + nullable: true + type: number + x-nullable: true + costController: + description: How spend is controlled + enum: + - COS + - CPC + - CPI + - CPM + - CPO + - CPSV + - CPV + - dailyBudget + - targetCPM + type: string + required: + - costController + type: object + CreateAdSetTargetingV24Q1: + description: Targeting configuration of the ad set + example: + geoLocation: + zipCodes: + values: + - values + - values + operand: undefined + countries: + values: + - values + - values + operand: undefined + subdivisions: + values: + - values + - values + operand: undefined + frequencyCapping: + maximumImpressions: 6 + frequency: hourly + deliveryLimitations: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + properties: + deliveryLimitations: + $ref: '#/components/schemas/AdSetDeliveryLimitationsV24Q1' + geoLocation: + $ref: '#/components/schemas/CreateAdSetGeoLocationV24Q1' + frequencyCapping: + $ref: '#/components/schemas/AdSetFrequencyCappingV24Q1' + required: + - frequencyCapping + type: object + CreateAdSetBudgetV24Q1: + description: ad set budget create model + example: + budgetDeliverySmoothing: accelerated + budgetDeliveryWeek: undefined + budgetAmount: 6.027456183070403 + budgetRenewal: undefined + budgetStrategy: capped + properties: + budgetStrategy: + enum: + - capped + - uncapped + type: string + budgetRenewal: + enum: + - undefined + - daily + - monthly + - lifetime + - weekly + nullable: true + type: string + budgetDeliverySmoothing: + enum: + - accelerated + - standard + nullable: true + type: string + budgetDeliveryWeek: + enum: + - undefined + - mondayToSunday + - tuesdayToMonday + - wednesdayToTuesday + - thursdayToWednesday + - fridayToThursday + - saturdayToFriday + - sundayToSaturday + nullable: true + type: string + budgetAmount: + format: double + nullable: true + type: number + x-nullable: true + required: + - budgetStrategy + type: object + PatchCampaignSpendLimit: + description: campaign spend limit model + example: + spendLimitRenewal: undefined + spendLimitAmount: + value: 0.8008281904610115 + spendLimitType: capped + properties: + spendLimitType: + enum: + - capped + - uncapped + nullable: true + type: string + x-nullable: true + spendLimitRenewal: + enum: + - undefined + - daily + - monthly + - lifetime + nullable: true + type: string + x-nullable: true + spendLimitAmount: + $ref: '#/components/schemas/NillableDecimal' + type: object + CreateCampaignSpendLimit: + description: campaign spend limit create model + example: + spendLimitRenewal: undefined + spendLimitAmount: 0.8008281904610115 + spendLimitType: capped + properties: + spendLimitType: + description: Whether your spend limit is capped or not + enum: + - capped + - uncapped + type: string + spendLimitRenewal: + description: The pace of the spend limit renewal + enum: + - undefined + - daily + - monthly + - lifetime + nullable: true + type: string + spendLimitAmount: + description: The amount of the spend limit. null if spendLimitType is uncapped. + format: double + nullable: true + type: number + x-nullable: true + required: + - spendLimitType + type: object + NillableDateTime: + description: "structure that encapsulates an object that have valid business\ + \ null values. If the structure is provided (i.e. not null), then the value\ + \ in it, even null, is provided." + example: + value: 2000-01-23T04:56:07.000+00:00 + properties: + value: + format: date-time + nullable: true + type: string + x-nullable: true + type: object + AdSetDeliveryLimitationsV24Q1: + description: ad set delivery limitations model + example: + operatingSystems: + - android + - android + environments: + - web + - web + devices: + - other + - other + properties: + environments: + items: + enum: + - web + - inApp + type: string + nullable: true + type: array + x-nullable: true + devices: + items: + enum: + - other + - desktop + - mobile + - tablet + type: string + nullable: true + type: array + x-nullable: true + operatingSystems: + items: + enum: + - android + - ios + - unknown + type: string + nullable: true + type: array + x-nullable: true + type: object + AdSetGeoLocationV24Q1: + description: ad set geolocation model + example: + zipCodes: + value: null + countries: + value: null + subdivisions: + value: null + properties: + countries: + $ref: '#/components/schemas/NillableAdSetTargetingRuleV24Q1' + subdivisions: + $ref: '#/components/schemas/NillableAdSetTargetingRuleV24Q1' + zipCodes: + $ref: '#/components/schemas/NillableAdSetTargetingRuleV24Q1' + type: object + AdSetFrequencyCappingV24Q1: + description: ad set frequency capping model + example: + maximumImpressions: 6 + frequency: hourly + properties: + frequency: + enum: + - hourly + - daily + - lifetime + - advanced + nullable: true + type: string + maximumImpressions: + format: int32 + nullable: true + type: integer + type: object + NillableDecimal: + description: "structure that encapsulates an object that have valid business\ + \ null values. If the structure is provided (i.e. not null), then the value\ + \ in it, even null, is provided." + example: + value: 0.8008281904610115 + nullable: true + properties: + value: + format: double + nullable: true + type: number + x-nullable: true + type: object + x-nullable: true + CreateAdSetGeoLocationV24Q1: + description: Geolocation configuration of the ad set + example: + zipCodes: + values: + - values + - values + operand: undefined + countries: + values: + - values + - values + operand: undefined + subdivisions: + values: + - values + - values + operand: undefined + properties: + countries: + $ref: '#/components/schemas/AdSetTargetingRuleV24Q1' + subdivisions: + $ref: '#/components/schemas/AdSetTargetingRuleV24Q1' + zipCodes: + $ref: '#/components/schemas/AdSetTargetingRuleV24Q1' + type: object + NillableAdSetTargetingRuleV24Q1: + description: "structure that encapsulates an object that have valid business\ + \ null values. If the structure is provided (i.e. not null), then the value\ + \ in it, even null, is provided." + example: + value: null + properties: + value: + $ref: '#/components/schemas/NillableAdSetTargetingRuleV24Q1_value' + type: object + AdSetTargetingRuleV24Q1: + description: ad set targeting rule model + example: + values: + - values + - values + operand: undefined + properties: + operand: + enum: + - undefined + - in + - notIn + nullable: true + type: string + values: + items: + type: string + nullable: true + type: array + x-nullable: true + type: object + AdResponse: + description: Data model for response resource + example: + data: + attributes: + inventoryType: Native + endDate: endDate + name: name + adSetId: adSetId + description: description + creativeId: creativeId + startDate: startDate + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/AdResource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + type: object + AdListResponse: + description: Data model for a list of response resources + example: + data: + - attributes: + inventoryType: Native + endDate: endDate + name: name + adSetId: adSetId + description: description + creativeId: creativeId + startDate: startDate + id: id + type: type + - attributes: + inventoryType: Native + endDate: endDate + name: name + adSetId: adSetId + description: description + creativeId: creativeId + startDate: startDate + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/AdResource' + nullable: true + type: array + uniqueItems: false + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + type: object + CouponListResponse: + description: Data model for a list of response resources + example: + data: + - attributes: + showEvery: 1 + images: + - slideUrls: + - slideUrls + - slideUrls + width: 0 + height: 6 + - slideUrls: + - slideUrls + - slideUrls + width: 0 + height: 6 + endDate: endDate + author: author + format: format + description: description + showDuration: 5 + advertiserId: advertiserId + name: name + adSetId: adSetId + rotationsNumber: 5 + landingPageUrl: landingPageUrl + startDate: startDate + status: status + id: id + type: type + - attributes: + showEvery: 1 + images: + - slideUrls: + - slideUrls + - slideUrls + width: 0 + height: 6 + - slideUrls: + - slideUrls + - slideUrls + width: 0 + height: 6 + endDate: endDate + author: author + format: format + description: description + showDuration: 5 + advertiserId: advertiserId + name: name + adSetId: adSetId + rotationsNumber: 5 + landingPageUrl: landingPageUrl + startDate: startDate + status: status + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/CouponResource' + nullable: true + type: array + uniqueItems: false + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + type: object + CouponResponse: + description: Data model for response resource + example: + data: + attributes: + showEvery: 1 + images: + - slideUrls: + - slideUrls + - slideUrls + width: 0 + height: 6 + - slideUrls: + - slideUrls + - slideUrls + width: 0 + height: 6 + endDate: endDate + author: author + format: format + description: description + showDuration: 5 + advertiserId: advertiserId + name: name + adSetId: adSetId + rotationsNumber: 5 + landingPageUrl: landingPageUrl + startDate: startDate + status: status + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/CouponResource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + type: object + CouponSupportedSizesResponse: + description: Data model for response resource + example: + data: + attributes: + fullFrame: + - fullFrame + - fullFrame + logoZone: + - logoZone + - logoZone + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/CouponSupportedSizesResource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + type: object + CreativeListResponse: + description: Data model for a list of response resources + example: + data: + - attributes: + dynamicAttributes: + creativeBackgroundColor: creativeBackgroundColor + primaryFont: primaryFont + pricesColor: pricesColor + bodyTextColor: bodyTextColor + logos: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + callsToAction: + - callsToAction + - callsToAction + productImageDisplay: ShowFullImage + adaptiveAttributes: + descriptionFont: descriptionFont + imageDisplay: ShowFullImage + videos: + - duration: 1.4658129805029452 + shape: Horizontal + url: https://openapi-generator.tech + - duration: 1.4658129805029452 + shape: Horizontal + url: https://openapi-generator.tech + headlineFont: headlineFont + descriptionText: descriptionText + imageSets: + - images: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + headlineText: headlineText + - images: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + headlineText: headlineText + layouts: + - Editorial + - Editorial + logos: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + callsToAction: + - callsToAction + - callsToAction + landingPageUrl: https://openapi-generator.tech + colors: + backgroundColor: backgroundColor + text2Color: text2Color + ctaTextColor: ctaTextColor + text1Color: text1Color + ctaBackgroundColor: ctaBackgroundColor + logoAreaAndTitleColor: logoAreaAndTitleColor + headlineText: headlineText + imageAttributes: + urls: + - urls + - urls + landingPageUrl: landingPageUrl + author: author + name: name + format: format + description: description + datasetId: datasetId + status: status + advertiserId: advertiserId + htmlTagAttributes: + tags: + - htmlTag: htmlTag + size: + width: 0 + height: 6 + - htmlTag: htmlTag + size: + width: 0 + height: 6 + id: id + type: type + - attributes: + dynamicAttributes: + creativeBackgroundColor: creativeBackgroundColor + primaryFont: primaryFont + pricesColor: pricesColor + bodyTextColor: bodyTextColor + logos: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + callsToAction: + - callsToAction + - callsToAction + productImageDisplay: ShowFullImage + adaptiveAttributes: + descriptionFont: descriptionFont + imageDisplay: ShowFullImage + videos: + - duration: 1.4658129805029452 + shape: Horizontal + url: https://openapi-generator.tech + - duration: 1.4658129805029452 + shape: Horizontal + url: https://openapi-generator.tech + headlineFont: headlineFont + descriptionText: descriptionText + imageSets: + - images: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + headlineText: headlineText + - images: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + headlineText: headlineText + layouts: + - Editorial + - Editorial + logos: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + callsToAction: + - callsToAction + - callsToAction + landingPageUrl: https://openapi-generator.tech + colors: + backgroundColor: backgroundColor + text2Color: text2Color + ctaTextColor: ctaTextColor + text1Color: text1Color + ctaBackgroundColor: ctaBackgroundColor + logoAreaAndTitleColor: logoAreaAndTitleColor + headlineText: headlineText + imageAttributes: + urls: + - urls + - urls + landingPageUrl: landingPageUrl + author: author + name: name + format: format + description: description + datasetId: datasetId + status: status + advertiserId: advertiserId + htmlTagAttributes: + tags: + - htmlTag: htmlTag + size: + width: 0 + height: 6 + - htmlTag: htmlTag + size: + width: 0 + height: 6 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/CreativeResource' + nullable: true + type: array + uniqueItems: false + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + type: object + CreativeResponse: + description: Data model for response resource + example: + data: + attributes: + dynamicAttributes: + creativeBackgroundColor: creativeBackgroundColor + primaryFont: primaryFont + pricesColor: pricesColor + bodyTextColor: bodyTextColor + logos: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + callsToAction: + - callsToAction + - callsToAction + productImageDisplay: ShowFullImage + adaptiveAttributes: + descriptionFont: descriptionFont + imageDisplay: ShowFullImage + videos: + - duration: 1.4658129805029452 + shape: Horizontal + url: https://openapi-generator.tech + - duration: 1.4658129805029452 + shape: Horizontal + url: https://openapi-generator.tech + headlineFont: headlineFont + descriptionText: descriptionText + imageSets: + - images: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + headlineText: headlineText + - images: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + headlineText: headlineText + layouts: + - Editorial + - Editorial + logos: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + callsToAction: + - callsToAction + - callsToAction + landingPageUrl: https://openapi-generator.tech + colors: + backgroundColor: backgroundColor + text2Color: text2Color + ctaTextColor: ctaTextColor + text1Color: text1Color + ctaBackgroundColor: ctaBackgroundColor + logoAreaAndTitleColor: logoAreaAndTitleColor + headlineText: headlineText + imageAttributes: + urls: + - urls + - urls + landingPageUrl: landingPageUrl + author: author + name: name + format: format + description: description + datasetId: datasetId + status: status + advertiserId: advertiserId + htmlTagAttributes: + tags: + - htmlTag: htmlTag + size: + width: 0 + height: 6 + - htmlTag: htmlTag + size: + width: 0 + height: 6 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/CreativeResource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + uniqueItems: false + type: object + AdWriteRequest: + description: Data model for input resource + example: + data: + attributes: + inventoryType: Display + endDate: endDate + name: name + adSetId: adSetId + description: description + creativeId: creativeId + startDate: startDate + id: id + type: type + properties: + data: + $ref: '#/components/schemas/AdWriteResource' + type: object + CreateCouponRequest: + description: Data model for input resource + example: + data: + attributes: + showEvery: 2 + images: + - slideBase64Strings: + - slideBase64Strings + - slideBase64Strings + width: 0 + height: 6 + - slideBase64Strings: + - slideBase64Strings + - slideBase64Strings + width: 0 + height: 6 + endDate: endDate + name: name + adSetId: adSetId + format: FullFrame + rotationsNumber: 6 + description: description + landingPageUrl: landingPageUrl + showDuration: 3 + startDate: startDate + id: id + type: type + properties: + data: + $ref: '#/components/schemas/CreateCouponResource' + type: object + UpdateCouponRequest: + description: Data model for input resource + example: + data: + attributes: + endDate: endDate + startDate: startDate + id: id + type: type + properties: + data: + $ref: '#/components/schemas/UpdateCouponResource' + type: object + CreativeWriteRequest: + description: Data model for input resource + example: + data: + attributes: + htmlTagWriteAttributes: + tags: + - htmlTag: htmlTag + size: + width: 0 + height: 6 + - htmlTag: htmlTag + size: + width: 0 + height: 6 + name: name + format: Image + imageWriteAttributes: + base64Strings: + - base64Strings + - base64Strings + landingPageUrl: https://openapi-generator.tech + dynamicWriteAttributes: + creativeBackgroundColor: creativeBackgroundColor + primaryFont: primaryFont + logoBase64String: logoBase64String + pricesColor: pricesColor + bodyTextColor: bodyTextColor + callsToAction: + - callsToAction + - callsToAction + productImageDisplay: ShowFullImage + description: description + datasetId: datasetId + adaptiveWriteAttributes: + videoBase64Strings: + - videoBase64Strings + - videoBase64Strings + logoBase64String: logoBase64String + descriptionFont: descriptionFont + imageDisplay: ShowFullImage + headlineFont: headlineFont + descriptionText: descriptionText + imageSetsBase64: + - imageBase64Strings: + - imageBase64Strings + - imageBase64Strings + headlineText: headlineText + - imageBase64Strings: + - imageBase64Strings + - imageBase64Strings + headlineText: headlineText + layouts: + - Editorial + - Editorial + callsToAction: + - callsToAction + - callsToAction + landingPageUrl: https://openapi-generator.tech + colors: + backgroundColor: backgroundColor + text2Color: text2Color + ctaTextColor: ctaTextColor + text1Color: text1Color + ctaBackgroundColor: ctaBackgroundColor + logoAreaAndTitleColor: logoAreaAndTitleColor + headlineText: headlineText + id: id + type: type + properties: + data: + $ref: '#/components/schemas/CreativeWriteResource' + type: object + AdResource: + description: Data model for a Resource + example: + attributes: + inventoryType: Native + endDate: endDate + name: name + adSetId: adSetId + description: description + creativeId: creativeId + startDate: startDate + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/Ad' + id: + nullable: true + type: string + type: + nullable: true + type: string + type: object + CouponResource: + description: Data model for a Resource + example: + attributes: + showEvery: 1 + images: + - slideUrls: + - slideUrls + - slideUrls + width: 0 + height: 6 + - slideUrls: + - slideUrls + - slideUrls + width: 0 + height: 6 + endDate: endDate + author: author + format: format + description: description + showDuration: 5 + advertiserId: advertiserId + name: name + adSetId: adSetId + rotationsNumber: 5 + landingPageUrl: landingPageUrl + startDate: startDate + status: status + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/Coupon' + id: + nullable: true + type: string + type: + nullable: true + type: string + type: object + CouponSupportedSizesResource: + description: Data model for a Resource + example: + attributes: + fullFrame: + - fullFrame + - fullFrame + logoZone: + - logoZone + - logoZone + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/CouponSupportedSizes' + id: + nullable: true + type: string + type: + nullable: true + type: string + type: object + CreativeResource: + description: Data model for a Resource + example: + attributes: + dynamicAttributes: + creativeBackgroundColor: creativeBackgroundColor + primaryFont: primaryFont + pricesColor: pricesColor + bodyTextColor: bodyTextColor + logos: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + callsToAction: + - callsToAction + - callsToAction + productImageDisplay: ShowFullImage + adaptiveAttributes: + descriptionFont: descriptionFont + imageDisplay: ShowFullImage + videos: + - duration: 1.4658129805029452 + shape: Horizontal + url: https://openapi-generator.tech + - duration: 1.4658129805029452 + shape: Horizontal + url: https://openapi-generator.tech + headlineFont: headlineFont + descriptionText: descriptionText + imageSets: + - images: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + headlineText: headlineText + - images: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + headlineText: headlineText + layouts: + - Editorial + - Editorial + logos: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + callsToAction: + - callsToAction + - callsToAction + landingPageUrl: https://openapi-generator.tech + colors: + backgroundColor: backgroundColor + text2Color: text2Color + ctaTextColor: ctaTextColor + text1Color: text1Color + ctaBackgroundColor: ctaBackgroundColor + logoAreaAndTitleColor: logoAreaAndTitleColor + headlineText: headlineText + imageAttributes: + urls: + - urls + - urls + landingPageUrl: landingPageUrl + author: author + name: name + format: format + description: description + datasetId: datasetId + status: status + advertiserId: advertiserId + htmlTagAttributes: + tags: + - htmlTag: htmlTag + size: + width: 0 + height: 6 + - htmlTag: htmlTag + size: + width: 0 + height: 6 + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/Creative' + id: + nullable: true + type: string + type: + nullable: true + type: string + type: object + AdWriteResource: + description: Data model for a Resource + example: + attributes: + inventoryType: Display + endDate: endDate + name: name + adSetId: adSetId + description: description + creativeId: creativeId + startDate: startDate + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/AdWrite' + id: + nullable: true + type: string + type: + nullable: true + type: string + type: object + CreateCouponResource: + description: Data model for a Resource + example: + attributes: + showEvery: 2 + images: + - slideBase64Strings: + - slideBase64Strings + - slideBase64Strings + width: 0 + height: 6 + - slideBase64Strings: + - slideBase64Strings + - slideBase64Strings + width: 0 + height: 6 + endDate: endDate + name: name + adSetId: adSetId + format: FullFrame + rotationsNumber: 6 + description: description + landingPageUrl: landingPageUrl + showDuration: 3 + startDate: startDate + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/CreateCoupon' + id: + nullable: true + type: string + type: + nullable: true + type: string + type: object + UpdateCouponResource: + description: Data model for a Resource + example: + attributes: + endDate: endDate + startDate: startDate + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/UpdateCoupon' + id: + nullable: true + type: string + type: + nullable: true + type: string + type: object + CreativeWriteResource: + description: Data model for a Resource + example: + attributes: + htmlTagWriteAttributes: + tags: + - htmlTag: htmlTag + size: + width: 0 + height: 6 + - htmlTag: htmlTag + size: + width: 0 + height: 6 + name: name + format: Image + imageWriteAttributes: + base64Strings: + - base64Strings + - base64Strings + landingPageUrl: https://openapi-generator.tech + dynamicWriteAttributes: + creativeBackgroundColor: creativeBackgroundColor + primaryFont: primaryFont + logoBase64String: logoBase64String + pricesColor: pricesColor + bodyTextColor: bodyTextColor + callsToAction: + - callsToAction + - callsToAction + productImageDisplay: ShowFullImage + description: description + datasetId: datasetId + adaptiveWriteAttributes: + videoBase64Strings: + - videoBase64Strings + - videoBase64Strings + logoBase64String: logoBase64String + descriptionFont: descriptionFont + imageDisplay: ShowFullImage + headlineFont: headlineFont + descriptionText: descriptionText + imageSetsBase64: + - imageBase64Strings: + - imageBase64Strings + - imageBase64Strings + headlineText: headlineText + - imageBase64Strings: + - imageBase64Strings + - imageBase64Strings + headlineText: headlineText + layouts: + - Editorial + - Editorial + callsToAction: + - callsToAction + - callsToAction + landingPageUrl: https://openapi-generator.tech + colors: + backgroundColor: backgroundColor + text2Color: text2Color + ctaTextColor: ctaTextColor + text1Color: text1Color + ctaBackgroundColor: ctaBackgroundColor + logoAreaAndTitleColor: logoAreaAndTitleColor + headlineText: headlineText + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/CreativeWrite' + id: + nullable: true + type: string + type: + nullable: true + type: string + type: object + Ad: + description: An ad is the binding that connects a creative with an ad set + example: + inventoryType: Native + endDate: endDate + name: name + adSetId: adSetId + description: description + creativeId: creativeId + startDate: startDate + properties: + name: + description: The name of the ad + nullable: true + type: string + description: + description: The description of the ad + nullable: true + type: string + creativeId: + description: The id of the Creative binded to this Ad + nullable: true + type: string + adSetId: + description: The id of the Ad Set binded to this Ad + nullable: true + type: string + inventoryType: + description: The inventory the Ad belongs to. Possible values are "Display" + and "Native". This is optional since this doesn't make sense for every + creative type but will throw an error if not set for a dynamic creative. + enum: + - Native + - Display + - Video + nullable: true + type: string + startDate: + description: "The date when the ad will be launched\r\nString must be in\ + \ ISO8601 format" + nullable: true + type: string + endDate: + description: "The date when when we will stop to show this ad. If the end\ + \ date is not specified (i.e. null) then the ad will go on forever\r\n\ + String must be in ISO8601 format" + nullable: true + type: string + type: object + Coupon: + description: Coupons are static images applied on ad set which can be displayed + within an ad and link to a landing page. + example: + showEvery: 1 + images: + - slideUrls: + - slideUrls + - slideUrls + width: 0 + height: 6 + - slideUrls: + - slideUrls + - slideUrls + width: 0 + height: 6 + endDate: endDate + author: author + format: format + description: description + showDuration: 5 + advertiserId: advertiserId + name: name + adSetId: adSetId + rotationsNumber: 5 + landingPageUrl: landingPageUrl + startDate: startDate + status: status + properties: + name: + description: The name of the Coupon + nullable: true + type: string + description: + description: The description of the Coupon + nullable: true + type: string + author: + description: The login of the person who created this Coupon + nullable: true + type: string + advertiserId: + description: Advertiser linked to the Coupon + nullable: true + type: string + adSetId: + description: The id of the Ad Set on which the Coupon is applied to + nullable: true + type: string + landingPageUrl: + description: Web redirection of the landing page url + nullable: true + type: string + startDate: + description: "The date when the Coupon will be launched\r\nString must be\ + \ in ISO8601 format" + nullable: true + type: string + endDate: + description: "The date when when we will stop to show this Coupon. If the\ + \ end date is not specified (i.e. null) then the Coupon will go on forever\r\ + \nString must be in ISO8601 format" + nullable: true + type: string + format: + description: "Format of the Coupon, it can have two values: \"FullFrame\"\ + \ or \"LogoZone\"" + nullable: true + type: string + status: + description: The status of the Coupon + nullable: true + type: string + images: + description: List of slides containing the image URLs + items: + $ref: '#/components/schemas/ImageSlide' + nullable: true + type: array + uniqueItems: false + showEvery: + description: Show the Coupon every N seconds (between 1 and 10) + format: int32 + nullable: true + type: integer + showDuration: + description: Show Coupon for a duration of N seconds (between 1 and 5) + format: int32 + nullable: true + type: integer + rotationsNumber: + description: Number of rotations for the Coupons (from 1 to 10 times) + format: int32 + nullable: true + type: integer + type: object + CouponSupportedSizes: + description: Entity containing the list of Coupon supported sizes + example: + fullFrame: + - fullFrame + - fullFrame + logoZone: + - logoZone + - logoZone + properties: + logoZone: + description: Array of LogoZone sizes as string in width x height format + items: + type: string + nullable: true + type: array + uniqueItems: false + fullFrame: + description: Array of FullFrame sizes as string in width x height format + items: + type: string + nullable: true + type: array + uniqueItems: false + type: object + Creative: + description: A creative is a project with the necessary information to display + a creative + example: + dynamicAttributes: + creativeBackgroundColor: creativeBackgroundColor + primaryFont: primaryFont + pricesColor: pricesColor + bodyTextColor: bodyTextColor + logos: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + callsToAction: + - callsToAction + - callsToAction + productImageDisplay: ShowFullImage + adaptiveAttributes: + descriptionFont: descriptionFont + imageDisplay: ShowFullImage + videos: + - duration: 1.4658129805029452 + shape: Horizontal + url: https://openapi-generator.tech + - duration: 1.4658129805029452 + shape: Horizontal + url: https://openapi-generator.tech + headlineFont: headlineFont + descriptionText: descriptionText + imageSets: + - images: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + headlineText: headlineText + - images: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + headlineText: headlineText + layouts: + - Editorial + - Editorial + logos: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + callsToAction: + - callsToAction + - callsToAction + landingPageUrl: https://openapi-generator.tech + colors: + backgroundColor: backgroundColor + text2Color: text2Color + ctaTextColor: ctaTextColor + text1Color: text1Color + ctaBackgroundColor: ctaBackgroundColor + logoAreaAndTitleColor: logoAreaAndTitleColor + headlineText: headlineText + imageAttributes: + urls: + - urls + - urls + landingPageUrl: landingPageUrl + author: author + name: name + format: format + description: description + datasetId: datasetId + status: status + advertiserId: advertiserId + htmlTagAttributes: + tags: + - htmlTag: htmlTag + size: + width: 0 + height: 6 + - htmlTag: htmlTag + size: + width: 0 + height: 6 + properties: + name: + description: The name of the creative + type: string + description: + description: The description of the creative + nullable: true + type: string + author: + description: The login of the person who created this creative ( + type: string + status: + description: The status of the creative + type: string + format: + description: The format of the creative + nullable: true + type: string + advertiserId: + description: Advertiser linked to the Creative + type: string + datasetId: + description: Data set id linked to the Creative + nullable: true + type: string + imageAttributes: + $ref: '#/components/schemas/ImageAttributes' + htmlTagAttributes: + $ref: '#/components/schemas/HtmlTagAttributes' + dynamicAttributes: + $ref: '#/components/schemas/DynamicAttributes' + adaptiveAttributes: + $ref: '#/components/schemas/AdaptiveAttributes' + required: + - advertiserId + - author + - name + - status + type: object + AdWrite: + description: Entity to create or update an ad + example: + inventoryType: Display + endDate: endDate + name: name + adSetId: adSetId + description: description + creativeId: creativeId + startDate: startDate + properties: + name: + description: The name of the ad + type: string + description: + description: The description of the ad + nullable: true + type: string + creativeId: + description: The id of the Creative bound to this Ad + type: string + adSetId: + description: The id of the Ad Set bound to this Ad + type: string + inventoryType: + description: The inventory the Ad to be created or updated belongs to. Possible + values are "Display" and "Native". This is optional since this doesn't + make sense for every creative type but will throw an error if not set + for a dynamic creative. + enum: + - Display + - Native + nullable: true + type: string + startDate: + description: "The date when the ad will be launched\r\nString must be in\ + \ ISO8601 format" + type: string + endDate: + description: "The date when when we will stop to show this ad. If the end\ + \ date is not specified (i.e. null) then the ad will go on forever\r\n\ + String must be in ISO8601 format" + nullable: true + type: string + required: + - adSetId + - creativeId + - name + - startDate + type: object + CreateCoupon: + description: Entity to create a Coupon + example: + showEvery: 2 + images: + - slideBase64Strings: + - slideBase64Strings + - slideBase64Strings + width: 0 + height: 6 + - slideBase64Strings: + - slideBase64Strings + - slideBase64Strings + width: 0 + height: 6 + endDate: endDate + name: name + adSetId: adSetId + format: FullFrame + rotationsNumber: 6 + description: description + landingPageUrl: landingPageUrl + showDuration: 3 + startDate: startDate + properties: + name: + description: The name of the Coupon + type: string + description: + description: The description of the Coupon + nullable: true + type: string + adSetId: + description: The id of the Ad Set on which the Coupon is applied to + type: string + landingPageUrl: + description: Web redirection of the landing page url + type: string + startDate: + description: "The date when the coupon will be launched\r\nString must be\ + \ in ISO8601 format" + type: string + endDate: + description: "The date when when we will stop to show this Coupon. If the\ + \ end date is not specified (i.e. null) then the Coupon will go on forever\r\ + \nString must be in ISO8601 format" + nullable: true + type: string + format: + description: "Format of the Coupon, it can have two values: \"FullFrame\"\ + \ or \"LogoZone\"" + enum: + - FullFrame + - LogoZone + type: string + images: + description: List of slides containing the images as a base-64 encoded string + items: + $ref: '#/components/schemas/CreateImageSlide' + type: array + uniqueItems: false + showEvery: + description: Show the Coupon every N seconds (between 1 and 10) + format: int32 + maximum: 10 + minimum: 1 + type: integer + showDuration: + description: Show Coupon for a duration of N seconds (between 1 and 5) + format: int32 + maximum: 5 + minimum: 1 + type: integer + rotationsNumber: + description: Number of rotations for the Coupons (from 1 to 10 times) + format: int32 + maximum: 10 + minimum: 1 + type: integer + required: + - adSetId + - format + - images + - landingPageUrl + - name + - rotationsNumber + - showDuration + - showEvery + - startDate + type: object + UpdateCoupon: + description: Entity to edit a Coupon + example: + endDate: endDate + startDate: startDate + properties: + startDate: + description: "The date when the Coupon will be launched\r\nString must be\ + \ in ISO8601 format" + type: string + endDate: + description: "The date when when we will stop to show this Coupon. If the\ + \ end date is not specified (i.e. null) then the Coupon will go on forever\r\ + \nString must be in ISO8601 format" + nullable: true + type: string + required: + - startDate + type: object + CreativeWrite: + description: Entity to create or update a creative + example: + htmlTagWriteAttributes: + tags: + - htmlTag: htmlTag + size: + width: 0 + height: 6 + - htmlTag: htmlTag + size: + width: 0 + height: 6 + name: name + format: Image + imageWriteAttributes: + base64Strings: + - base64Strings + - base64Strings + landingPageUrl: https://openapi-generator.tech + dynamicWriteAttributes: + creativeBackgroundColor: creativeBackgroundColor + primaryFont: primaryFont + logoBase64String: logoBase64String + pricesColor: pricesColor + bodyTextColor: bodyTextColor + callsToAction: + - callsToAction + - callsToAction + productImageDisplay: ShowFullImage + description: description + datasetId: datasetId + adaptiveWriteAttributes: + videoBase64Strings: + - videoBase64Strings + - videoBase64Strings + logoBase64String: logoBase64String + descriptionFont: descriptionFont + imageDisplay: ShowFullImage + headlineFont: headlineFont + descriptionText: descriptionText + imageSetsBase64: + - imageBase64Strings: + - imageBase64Strings + - imageBase64Strings + headlineText: headlineText + - imageBase64Strings: + - imageBase64Strings + - imageBase64Strings + headlineText: headlineText + layouts: + - Editorial + - Editorial + callsToAction: + - callsToAction + - callsToAction + landingPageUrl: https://openapi-generator.tech + colors: + backgroundColor: backgroundColor + text2Color: text2Color + ctaTextColor: ctaTextColor + text1Color: text1Color + ctaBackgroundColor: ctaBackgroundColor + logoAreaAndTitleColor: logoAreaAndTitleColor + headlineText: headlineText + properties: + name: + description: The name of the creative + type: string + description: + description: The description of the creative + nullable: true + type: string + format: + description: "The format of the creative\r\nYou can use \"Image\", \" HtmlTag\"\ + , \"Dynamic\" or \"Adaptive\"" + enum: + - Image + - HtmlTag + - Dynamic + - Adaptive + type: string + datasetId: + description: Dataset linked to the Creative + type: string + imageWriteAttributes: + $ref: '#/components/schemas/ImageWriteAttributes' + htmlTagWriteAttributes: + $ref: '#/components/schemas/HtmlTagWriteAttributes' + dynamicWriteAttributes: + $ref: '#/components/schemas/DynamicWriteAttributes' + adaptiveWriteAttributes: + $ref: '#/components/schemas/AdaptiveWriteAttributes' + required: + - datasetId + - format + - name + type: object + ImageSlide: + description: Slide containing the image URLs + example: + slideUrls: + - slideUrls + - slideUrls + width: 0 + height: 6 + properties: + width: + description: Width of the Coupon slide + format: int32 + nullable: true + type: integer + height: + description: Height of the Coupon slide + format: int32 + nullable: true + type: integer + slideUrls: + description: Array of images of the same size uploaded on demostatic.criteo.com + when deploying and then static.criteo.net + items: + type: string + nullable: true + type: array + uniqueItems: false + type: object + ImageAttributes: + description: The attributes specific to Image creatives + example: + urls: + - urls + - urls + landingPageUrl: landingPageUrl + properties: + urls: + description: Array of images uploaded on demostatic.criteo.com when deploying + and then static.criteo.net + items: + type: string + nullable: true + type: array + uniqueItems: false + landingPageUrl: + description: Web redirection of the landing page url + nullable: true + type: string + type: object + HtmlTagAttributes: + description: The attributes specific to HtmlTag creatives + example: + tags: + - htmlTag: htmlTag + size: + width: 0 + height: 6 + - htmlTag: htmlTag + size: + width: 0 + height: 6 + properties: + tags: + description: An array containing the html tags + items: + $ref: '#/components/schemas/Tag' + nullable: true + type: array + uniqueItems: false + type: object + DynamicAttributes: + description: The attributes specific to Dynamic creatives + example: + creativeBackgroundColor: creativeBackgroundColor + primaryFont: primaryFont + pricesColor: pricesColor + bodyTextColor: bodyTextColor + logos: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + callsToAction: + - callsToAction + - callsToAction + productImageDisplay: ShowFullImage + properties: + logos: + description: Logo images uploaded on demostatic.criteo.com when deploying + and then static.criteo.net + items: + $ref: '#/components/schemas/ImageShape' + nullable: true + type: array + uniqueItems: false + creativeBackgroundColor: + description: "Color of the creative's background\r\nValid hexadecimal color\ + \ (e.g. \"AB00FF\")" + nullable: true + type: string + bodyTextColor: + description: "Color of the creative's body text\r\nValid hexadecimal color\ + \ (e.g. \"AB00FF\")" + nullable: true + type: string + pricesColor: + description: "Color of the creative's prices\r\nValid hexadecimal color\ + \ (e.g. \"AB00FF\")" + nullable: true + type: string + primaryFont: + description: "Font of the primary font\r\nValid supported font like \"Arial\"" + nullable: true + type: string + callsToAction: + description: "A Call-to-Action (CTA) is an action-driven instruction to\ + \ your audience intended to provoke an immediate\r\nresponse, such as\ + \ “Buy now” or “Go!”." + items: + type: string + nullable: true + type: array + uniqueItems: false + productImageDisplay: + description: "Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose\ + \ whether your product catalog images should fit inside the allocated\r\ + \nspace (\"ShowFullImage\") or whether they should fill that space (\"\ + ZoomOnImage\"). If you choose ZoomOnImage, there may be some\r\nimage\ + \ cropping." + enum: + - ShowFullImage + - ZoomOnImage + nullable: true + type: string + type: object + AdaptiveAttributes: + description: The attributes specific to Adaptive creatives + example: + descriptionFont: descriptionFont + imageDisplay: ShowFullImage + videos: + - duration: 1.4658129805029452 + shape: Horizontal + url: https://openapi-generator.tech + - duration: 1.4658129805029452 + shape: Horizontal + url: https://openapi-generator.tech + headlineFont: headlineFont + descriptionText: descriptionText + imageSets: + - images: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + headlineText: headlineText + - images: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + headlineText: headlineText + layouts: + - Editorial + - Editorial + logos: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + callsToAction: + - callsToAction + - callsToAction + landingPageUrl: https://openapi-generator.tech + colors: + backgroundColor: backgroundColor + text2Color: text2Color + ctaTextColor: ctaTextColor + text1Color: text1Color + ctaBackgroundColor: ctaBackgroundColor + logoAreaAndTitleColor: logoAreaAndTitleColor + headlineText: headlineText + properties: + layouts: + description: "The Adaptive layouts that are enabled.\r\nIt can contain any\ + \ of the following values: \"Editorial\", “Montage“, \"InBannerVideo\"\ + ." + items: + enum: + - Editorial + - Montage + - InBannerVideo + type: string + type: array + uniqueItems: false + logos: + description: Logo images uploaded on demostatic.criteo.com when deploying + and then static.criteo.net + items: + $ref: '#/components/schemas/ImageShape' + type: array + uniqueItems: false + headlineText: + description: The headline text of the banner + type: string + headlineFont: + description: "Font of the headline\r\nValid supported font like \"Arial\"" + type: string + descriptionText: + description: The description text of the banner + type: string + descriptionFont: + description: "Font of the description\r\nValid supported font like \"Arial\"" + type: string + callsToAction: + description: "A Call-to-Action (CTA) is an action-driven instruction to\ + \ your audience intended to provoke an immediate\r\nresponse, such as\ + \ “Buy now” or “Go!”." + items: + type: string + type: array + uniqueItems: false + colors: + $ref: '#/components/schemas/AdaptiveColors' + imageSets: + description: "Multiple image sets, each image set consists of multiple images\ + \ and a headline text." + items: + $ref: '#/components/schemas/ImageSet' + nullable: true + type: array + uniqueItems: false + imageDisplay: + description: "Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose\ + \ whether your image set should fit inside the allocated\r\nspace (\"\ + ShowFullImage\") or whether it should fill that space (\"ZoomOnImage\"\ + ). If you choose ZoomOnImage, there may be some\r\nimage cropping." + enum: + - ShowFullImage + - ZoomOnImage + nullable: true + type: string + videos: + description: Multiple videos potentially in different shapes. + items: + $ref: '#/components/schemas/VideoDetail' + nullable: true + type: array + uniqueItems: false + landingPageUrl: + description: Web redirection of the landing page url + format: uri + type: string + required: + - callsToAction + - colors + - descriptionFont + - descriptionText + - headlineFont + - headlineText + - landingPageUrl + - layouts + - logos + type: object + CreateImageSlide: + description: Slide containing the images of the same size as a base-64 encoded + string + example: + slideBase64Strings: + - slideBase64Strings + - slideBase64Strings + width: 0 + height: 6 + properties: + width: + description: Width of the Coupon slide + format: int32 + nullable: true + type: integer + height: + description: Height of the Coupon slide + format: int32 + nullable: true + type: integer + slideBase64Strings: + description: Array of images of the same size as a base-64 encoded string + items: + type: string + nullable: true + type: array + uniqueItems: false + type: object + ImageWriteAttributes: + description: The attributes specific to create or update an Image creative + example: + base64Strings: + - base64Strings + - base64Strings + landingPageUrl: https://openapi-generator.tech + properties: + base64Strings: + description: Array of images as a base-64 encoded string + items: + type: string + minItems: 1 + type: array + uniqueItems: false + landingPageUrl: + description: Web redirection of the landing page url + format: uri + type: string + required: + - base64Strings + - landingPageUrl + type: object + HtmlTagWriteAttributes: + description: The attributes specific to create or update a HtmlTag creative + example: + tags: + - htmlTag: htmlTag + size: + width: 0 + height: 6 + - htmlTag: htmlTag + size: + width: 0 + height: 6 + properties: + tags: + description: An array containing the html tags + items: + $ref: '#/components/schemas/Tag' + type: array + uniqueItems: false + required: + - tags + type: object + DynamicWriteAttributes: + description: The attributes specific to create or update a Dynamic creative + example: + creativeBackgroundColor: creativeBackgroundColor + primaryFont: primaryFont + logoBase64String: logoBase64String + pricesColor: pricesColor + bodyTextColor: bodyTextColor + callsToAction: + - callsToAction + - callsToAction + productImageDisplay: ShowFullImage + properties: + logoBase64String: + description: Logo image as a base-64 encoded string + type: string + creativeBackgroundColor: + description: "Color of the creative's background\r\nValid hexadecimal RGB\ + \ color (e.g. \"AB00FF\")" + nullable: true + type: string + bodyTextColor: + description: "Color of the creative's body text\r\nValid hexadecimal RGB\ + \ color (e.g. \"AB00FF\")" + type: string + pricesColor: + description: "Color of the creative's prices\r\nValid hexadecimal RGB color\ + \ (e.g. \"AB00FF\")" + type: string + primaryFont: + description: "Font of the primary font\r\nValid supported font like \"Arial\"" + nullable: true + type: string + callsToAction: + description: "A Call-to-Action (CTA) is an action-driven instruction to\ + \ your audience intended to provoke an immediate\r\nresponse, such as\ + \ “Buy now” or “Go!”." + items: + type: string + minItems: 1 + type: array + uniqueItems: false + productImageDisplay: + description: "Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose\ + \ whether your product catalog images should fit inside the allocated\r\ + \nspace (\"ShowFullImage\") or whether they should fill that space (\"\ + ZoomOnImage\"). If you choose ZoomOnImage, there may be some\r\nimage\ + \ cropping." + enum: + - ShowFullImage + - ZoomOnImage + type: string + required: + - bodyTextColor + - callsToAction + - logoBase64String + - pricesColor + - productImageDisplay + type: object + AdaptiveWriteAttributes: + description: The attributes specific to create or update an Adaptive creative + example: + videoBase64Strings: + - videoBase64Strings + - videoBase64Strings + logoBase64String: logoBase64String + descriptionFont: descriptionFont + imageDisplay: ShowFullImage + headlineFont: headlineFont + descriptionText: descriptionText + imageSetsBase64: + - imageBase64Strings: + - imageBase64Strings + - imageBase64Strings + headlineText: headlineText + - imageBase64Strings: + - imageBase64Strings + - imageBase64Strings + headlineText: headlineText + layouts: + - Editorial + - Editorial + callsToAction: + - callsToAction + - callsToAction + landingPageUrl: https://openapi-generator.tech + colors: + backgroundColor: backgroundColor + text2Color: text2Color + ctaTextColor: ctaTextColor + text1Color: text1Color + ctaBackgroundColor: ctaBackgroundColor + logoAreaAndTitleColor: logoAreaAndTitleColor + headlineText: headlineText + properties: + layouts: + description: "The Adaptive layouts that are enabled.\r\nIt can contain any\ + \ of the following values: \"Editorial\", “Montage“, \"InBannerVideo\"\ + ." + items: + enum: + - Editorial + - Montage + - InBannerVideo + type: string + minItems: 1 + type: array + uniqueItems: false + logoBase64String: + description: Logo image as a base-64 encoded string + type: string + headlineText: + description: The headline text of the banner + type: string + headlineFont: + description: "Font of the headline\r\nValid supported font like \"Arial\"" + type: string + descriptionText: + description: The description text of the banner + type: string + descriptionFont: + description: "Font of the description\r\nValid supported font like \"Arial\"" + type: string + callsToAction: + description: "A Call-to-Action (CTA) is an action-driven instruction to\ + \ your audience intended to provoke an immediate\r\nresponse, such as\ + \ “Buy now” or “Go!”." + items: + type: string + minItems: 1 + type: array + uniqueItems: false + colors: + $ref: '#/components/schemas/AdaptiveColors' + imageSetsBase64: + description: "Multiple image sets, each image set consists of multiple images\ + \ as a base-64 encoded string and a headline text." + items: + $ref: '#/components/schemas/ImageSetBase64' + nullable: true + type: array + uniqueItems: false + imageDisplay: + description: "Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose\ + \ whether your image set should fit inside the allocated\r\nspace (\"\ + ShowFullImage\") or whether it should fill that space (\"ZoomOnImage\"\ + ). If you choose ZoomOnImage, there may be some\r\nimage cropping." + enum: + - ShowFullImage + - ZoomOnImage + nullable: true + type: string + videoBase64Strings: + description: "Multiple videos potentially in different shapes, each video\ + \ is a base-64 encoded string." + items: + type: string + nullable: true + type: array + uniqueItems: false + landingPageUrl: + description: Web redirection of the landing page url. + format: uri + type: string + required: + - callsToAction + - colors + - descriptionFont + - descriptionText + - headlineFont + - headlineText + - landingPageUrl + - layouts + - logoBase64String + type: object + Tag: + description: Entity specifying the html of the tag and its size + example: + htmlTag: htmlTag + size: + width: 0 + height: 6 + properties: + htmlTag: + description: Html tag + nullable: true + type: string + size: + $ref: '#/components/schemas/Size' + type: object + ImageShape: + description: Entity containing the shape and url of the image + example: + shape: Horizontal + url: https://openapi-generator.tech + properties: + shape: + description: Ratio of the image + enum: + - Horizontal + - Vertical + - Square + type: string + url: + description: URL of the image uploaded on demostatic.criteo.com when deploying + and then static.criteo.net + format: uri + type: string + required: + - shape + - url + type: object + AdaptiveColors: + description: Entity consists of the color aliases of the creative's elements + example: + backgroundColor: backgroundColor + text2Color: text2Color + ctaTextColor: ctaTextColor + text1Color: text1Color + ctaBackgroundColor: ctaBackgroundColor + logoAreaAndTitleColor: logoAreaAndTitleColor + properties: + logoAreaAndTitleColor: + description: "Color of the creative's logo area.\r\nA valid RGB24 color\ + \ in hexadecimal (e.g. \"AB00FF\")." + type: string + backgroundColor: + description: "Color of the creative's background.\r\nA valid RGB24 color\ + \ in hexadecimal (e.g. \"AB00FF\")" + type: string + text1Color: + description: "Color of the headline and the description texts.\r\nA valid\ + \ RGB24 color in hexadecimal (e.g. \"AB00FF\")" + type: string + text2Color: + description: "Color of the image set's headline text.\r\nA valid RGB24 color\ + \ in hexadecimal (e.g. \"AB00FF\")" + type: string + ctaBackgroundColor: + description: "Color of the background of the CTA.\r\nA valid RGB24 color\ + \ in hexadecimal (e.g. \"AB00FF\")." + type: string + ctaTextColor: + description: "Color of the text of the CTA.\r\nA valid RGB24 color in hexadecimal\ + \ (e.g. \"AB00FF\")." + type: string + required: + - backgroundColor + - ctaBackgroundColor + - ctaTextColor + - logoAreaAndTitleColor + - text1Color + - text2Color + type: object + ImageSet: + description: Entity consists of multiple images in different ratios and a headline + text. + example: + images: + - shape: Horizontal + url: https://openapi-generator.tech + - shape: Horizontal + url: https://openapi-generator.tech + headlineText: headlineText + properties: + images: + description: The images' urls with their shapes. + items: + $ref: '#/components/schemas/ImageShape' + type: array + uniqueItems: false + headlineText: + description: The headline of the image set + nullable: true + type: string + required: + - images + type: object + VideoDetail: + description: "Entity consists of the url of the video, its duration and its\ + \ shape." + example: + duration: 1.4658129805029452 + shape: Horizontal + url: https://openapi-generator.tech + properties: + duration: + description: "The duration of the video in milliseconds, the video could\ + \ be trimmed if it is longer than 30000 ms." + format: double + type: number + shape: + description: Shape of the video + enum: + - Horizontal + - Vertical + - Square + type: string + url: + description: URL of the video uploaded on demostatic.criteo.com when deploying + and then static.criteo.net + format: uri + type: string + required: + - duration + - shape + - url + type: object + ImageSetBase64: + description: Entity consists of multiple images in different ratios as a base-64 + encoded and a headline text. + example: + imageBase64Strings: + - imageBase64Strings + - imageBase64Strings + headlineText: headlineText + properties: + imageBase64Strings: + description: "Multiple images potentially in different shapes, each image\ + \ is a base-64 encoded string." + items: + type: string + minItems: 1 + type: array + uniqueItems: false + headlineText: + description: The headline of the image set + nullable: true + type: string + required: + - imageBase64Strings + type: object + Size: + description: Size entity containing width and height of the creative + example: + width: 0 + height: 6 + properties: + width: + format: int32 + nullable: true + type: integer + height: + format: int32 + nullable: true + type: integer + type: object + TransparencyReportDataMessage: + description: This is the message defining the response for Transparency report + example: + data: + - attributes: + tokenValidUntil: 2000-01-23T04:56:07.000+00:00 + files: + - fileName: fileName + url: url + - fileName: fileName + url: url + advertiserId: advertiserId + type: type + - attributes: + tokenValidUntil: 2000-01-23T04:56:07.000+00:00 + files: + - fileName: fileName + url: url + - fileName: fileName + url: url + advertiserId: advertiserId + type: type + properties: + data: + items: + $ref: '#/components/schemas/TransparencyReportEntityMessage' + type: array + uniqueItems: false + required: + - data + type: object + ProblemsDetails: + description: Common problems object + properties: + errors: + items: + $ref: '#/components/schemas/ProblemDetails' + nullable: true + readOnly: true + type: array + uniqueItems: false + type: object + TransparencyQueryMessage: + description: This is the message defining the query for Transparency report + example: + shouldDisplayProductIds: false + startDate: 2023-04-03T00:00:00.0000000+00:00 + endDate: 2023-04-06T00:00:00.0000000+00:00 + properties: + shouldDisplayProductIds: + default: false + description: Specify if the product ids are displayed in the report. + nullable: true + type: boolean + startDate: + description: "Start date of the report. Date component of ISO 8061 format,\ + \ any time or timezone component is ignored." + format: date-time + type: string + endDate: + description: "End date of the report. Date component of ISO 8061 format,\ + \ any time or timezone component is ignored." + format: date-time + type: string + required: + - endDate + - startDate + type: object + PlacementsReportQueryDataMessage: + description: Contains queries for Placements report + example: + data: + - type: PlacementReport + attributes: + advertiserIds: "123,456,789" + campaignIds: "111,222,333,444" + adsetIds: "135,246,357,468" + environment: web + placement: MyPlacement + dimensions: + - AdsetId + - AdvertiserId + - Placement + metrics: + - clicks + - displays + - cost + currency: EUR + disclosed: false + format: csv + timezone: Europe/Paris + startDate: 2022-08-29T00:00:00.0000000+00:00 + endDate: 2022-08-29T00:00:00.0000000+00:00 + properties: + data: + items: + $ref: '#/components/schemas/PlacementsReportQueryEntityMessage' + type: array + uniqueItems: false + required: + - data + type: object + StatisticsReportQueryMessage: + description: This is the message defining the query for Adset report + example: + advertiserIds: "123,456,789" + adSetIds: + - "12345" + - "54321" + adSetNames: + - myAdSet1 + - myAdSet2 + adSetStatus: + - Active + dimensions: + - CampaignId + - Campaign + - AdsetId + - Adset + - AdvertiserId + - Advertiser + - AdId + - Ad + - CouponId + - Coupon + - CategoryId + - Category + - Hour + - Day + - Week + - Month + - Year + - Os + - Device + metrics: + - Clicks + - Displays + - Cpc + - Visits + currency: EUR + format: csv + timezone: Europe/Paris + startDate: 2022-08-29T00:00:00.0000000+00:00 + endDate: 2022-09-01T00:00:00.0000000+00:00 + properties: + advertiserIds: + description: "The comma-separated list of advertiser ids. If empty, all\ + \ the advertisers in the portfolio will be used" + nullable: true + type: string + adSetIds: + description: "list of adSets ids. If empty, all the adSets will be fetched" + items: + type: string + nullable: true + type: array + uniqueItems: false + adSetNames: + description: "list of adSets names. If empty, all the adSets will be fetched" + items: + type: string + nullable: true + type: array + uniqueItems: false + adSetStatus: + description: "list of adSets status. If empty, all the adSets will be fetched" + items: + type: string + nullable: true + type: array + uniqueItems: false + dimensions: + description: The dimensions for the report. + items: + enum: + - AdsetId + - Adset + - AdvertiserId + - Advertiser + - CategoryId + - Category + - Hour + - Day + - Week + - Month + - Year + - Os + - Device + - CampaignId + - Campaign + - AdId + - Ad + - CouponId + - Coupon + - MarketingObjectiveId + - MarketingObjective + - ChannelId + - Channel + - Goal + type: string + type: array + uniqueItems: false + metrics: + description: The list of metrics to report. + items: + type: string + type: array + uniqueItems: false + currency: + description: The currency used for the report. ISO 4217 code (three-letter + capitals). + type: string + format: + description: "The file format of the generated report: csv, xml, excel or\ + \ json." + type: string + timezone: + default: UTC + description: The timezone used for the report. Timezone Database format + (Tz). + nullable: true + type: string + startDate: + description: "Start date of the report. Date component of ISO 8061 format,\ + \ any time or timezone component is ignored." + format: date-time + type: string + endDate: + description: "End date of the report. Date component of ISO 8061 format,\ + \ any time or timezone component is ignored." + format: date-time + type: string + required: + - currency + - dimensions + - endDate + - format + - metrics + - startDate + type: object + TransactionsReportQueryDataMessage: + description: Contains queries for Transactions report + example: + data: + - type: TransactionsReport + attributes: + advertiserIds: "123,456,789" + eventType: display + currency: EUR + format: csv + timezone: Europe/Paris + startDate: 2023-04-03T00:00:00.0000000+00:00 + endDate: 2023-04-03T00:00:00.0000000+00:00 + properties: + data: + items: + $ref: '#/components/schemas/TransactionsReportQueryEntityMessage' + type: array + uniqueItems: false + required: + - data + type: object + TransparencyReportEntityMessage: + description: This is the message defining the entity response for Transparency + report + example: + attributes: + tokenValidUntil: 2000-01-23T04:56:07.000+00:00 + files: + - fileName: fileName + url: url + - fileName: fileName + url: url + advertiserId: advertiserId + type: type + properties: + type: + readOnly: true + type: string + attributes: + $ref: '#/components/schemas/TransparencyReportAttributes' + required: + - attributes + - type + type: object + ProblemDetails: + description: Common problem object. + properties: + traceId: + description: The request correlation ID this problem comes from. + nullable: true + type: string + traceIdentifier: + description: "The request correlation ID this problem comes from. (deprecated,\ + \ use traceId instead)" + nullable: true + type: string + type: + description: The problem's category. + enum: + - unknown + - access-control + - authentication + - authorization + - availability + - deprecation + - quota + - validation + nullable: true + type: string + code: + description: "A machine-readable error code, expressed as a string value." + nullable: true + type: string + instance: + description: A URI that identifies the specific occurrence of the problem. + nullable: true + type: string + title: + description: A short human-readable description of the problem type + nullable: true + type: string + detail: + description: A human-readable explanation specific to this occurrence of + the problem + nullable: true + type: string + source: + additionalProperties: + type: string + description: A machine-readable structure to reference to the exact location(s) + causing the error(s) + nullable: true + type: object + stackTrace: + nullable: true + type: string + type: object + PlacementsReportQueryEntityMessage: + description: Contains a query for Transaction report and its type + properties: + type: + type: string + attributes: + $ref: '#/components/schemas/PlacementsReportQueryMessage' + required: + - attributes + - type + type: object + TransactionsReportQueryEntityMessage: + description: Contains a query for Transaction report and its type + properties: + type: + type: string + attributes: + $ref: '#/components/schemas/TransactionsReportQueryMessage' + required: + - attributes + - type + type: object + TransparencyReportAttributes: + description: This is the message defining the attribute response for Transparency + report + example: + tokenValidUntil: 2000-01-23T04:56:07.000+00:00 + files: + - fileName: fileName + url: url + - fileName: fileName + url: url + advertiserId: advertiserId + properties: + advertiserId: + type: string + tokenValidUntil: + format: date-time + type: string + files: + items: + $ref: '#/components/schemas/TransparencyReportFile' + type: array + uniqueItems: false + required: + - advertiserId + - files + - tokenValidUntil + type: object + PlacementsReportQueryMessage: + description: This is the message defining the query for Placements report + properties: + advertiserIds: + description: The comma-separated list of advertiser ids. + type: string + campaignIds: + description: The comma-separated list of campaign ids. + nullable: true + type: string + adsetIds: + description: The comma-separated list of adSet ids. + nullable: true + type: string + environment: + description: "Type of environment: Web, Android or iOS." + nullable: true + type: string + placement: + description: Filter the value of the placement + nullable: true + type: string + dimensions: + description: The dimensions for the report. + items: + enum: + - AdsetId + - AdvertiserId + - Placement + - Environment + - AdsetName + - AdvertiserName + - CampaignId + - CampaignName + type: string + type: array + uniqueItems: false + metrics: + description: The list of metrics to report. + items: + type: string + type: array + uniqueItems: false + currency: + description: The currency used for the report. ISO 4217 code (three-letter + capitals). + type: string + disclosed: + default: true + description: Returns disclosed or undisclosed placements. + nullable: true + type: boolean + format: + description: "The file format of the generated report: csv, xml, excel or\ + \ json." + type: string + timezone: + default: UTC + description: The timezone used for the report. Timezone Database format + (Tz). + nullable: true + type: string + startDate: + description: "Start date of the report. Date component of ISO 8061 format,\ + \ any time or timezone component is ignored." + format: date-time + type: string + endDate: + description: "End date of the report. Date component of ISO 8061 format,\ + \ any time or timezone component is ignored." + format: date-time + type: string + required: + - advertiserIds + - currency + - dimensions + - endDate + - format + - metrics + - startDate + type: object + TransactionsReportQueryMessage: + description: This is the message defining the query for Transaction report + properties: + advertiserIds: + description: "The comma-separated list of advertiser ids. If empty, all\ + \ the advertisers in the portfolio will be used" + nullable: true + type: string + eventType: + description: Apply a filter on Event type . + nullable: true + type: string + currency: + description: The currency used for the report. ISO 4217 code (three-letter + capitals). + type: string + format: + description: "The file format of the generated report: csv, xml, excel or\ + \ json." + type: string + timezone: + default: UTC + description: The timezone used for the report. Timezone Database format + (Tz). + nullable: true + type: string + startDate: + description: "Start date of the report. Date component of ISO 8061 format,\ + \ any time or timezone component is ignored." + format: date-time + type: string + endDate: + description: "End date of the report. Date component of ISO 8061 format,\ + \ any time or timezone component is ignored." + format: date-time + type: string + required: + - currency + - endDate + - format + - startDate + type: object + TransparencyReportFile: + description: This is the message defining the file response for Transparency + report + example: + fileName: fileName + url: url + properties: + fileName: + type: string + url: + type: string + required: + - fileName + - url + type: object + GetPortfolioResponse: + description: Portfolio fetch Response + example: + data: + - meta: "{}" + attributes: + advertiserName: advertiserName + id: id + type: campaign + - meta: "{}" + attributes: + advertiserName: advertiserName + id: id + type: campaign + warnings: + - traceId: traceId + code: internal-error + instance: instance + detail: detail + type: access_control + title: title + - traceId: traceId + code: internal-error + instance: instance + detail: detail + type: access_control + title: title + errors: + - traceId: traceId + code: internal-error + instance: instance + detail: detail + source: + key: source + type: access_control + title: title + - traceId: traceId + code: internal-error + instance: instance + detail: detail + source: + key: source + type: access_control + title: title + properties: + data: + description: The response�s primary data + items: + $ref: '#/components/schemas/EntityOfPortfolioMessage' + nullable: true + type: array + uniqueItems: false + errors: + description: "Error list returned by the Criteo API\r\nFor successful requests\ + \ it is empty" + items: + $ref: '#/components/schemas/CriteoApiError' + nullable: true + type: array + uniqueItems: false + warnings: + description: "Warnings list returned by the Criteo API\r\nIn some situations\ + \ the operations are successful but it may be useful to issue warnings\ + \ to the API consumer.\r\nFor example the endpoint, entity or field is\ + \ deprecated. Warnings are like compiler warnings, they indicate that\ + \ problems may occur in the future." + items: + $ref: '#/components/schemas/CriteoApiWarning' + nullable: true + type: array + uniqueItems: false + type: object + EntityOfPortfolioMessage: + description: Generic Criteo API successful data model + example: + meta: "{}" + attributes: + advertiserName: advertiserName + id: id + type: campaign + properties: + type: + description: A string containing the entity type + enum: + - campaign + - adset + - ad + - advertiser + - agency + - publisher + - address + - client + - contact + - industry + example: campaign + nullable: true + type: string + id: + description: A opaque string containing the unique Id of the entity + nullable: true + type: string + attributes: + $ref: '#/components/schemas/PortfolioMessage' + meta: + description: A meta object that contains application-specific metadata + nullable: true + type: object + type: object + CriteoApiError: + description: Criteo API response error + example: + traceId: traceId + code: internal-error + instance: instance + detail: detail + source: + key: source + type: access_control + title: title + properties: + traceId: + description: The correlation ID provided by the gateway + nullable: true + type: string + type: + description: A machine-readable code specifying error category + enum: + - access_control + - authentication + - authorization + - availability + - deprecation + - quota + - validation + example: access_control + nullable: true + type: string + code: + description: A machine-readable error code string in kabab-case. Unique + across Criteo + enum: + - internal-error + - deprecated-field + - endpoint-deprecated + - required-field + - invalid-date-format + - invalid + - invalid-ranged + - invalid-timespan + example: internal-error + nullable: true + type: string + instance: + description: A URI reference that identifies the specific occurrence of + the problem + nullable: true + type: string + title: + description: "A short, human-readable remarks of the problem type." + nullable: true + type: string + detail: + description: A human-readable explanation specific to this occurrence of + the problem. + nullable: true + type: string + source: + additionalProperties: + type: string + description: A machine-readable structure to reference to the exact location(s) + causing the error(s). + nullable: true + type: object + type: object + CriteoApiWarning: + description: Criteo API response warning + example: + traceId: traceId + code: internal-error + instance: instance + detail: detail + type: access_control + title: title + properties: + traceId: + description: The correlation ID provided by the gateway + nullable: true + type: string + type: + description: A machine-readable code specifying error category + enum: + - access_control + - authentication + - authorization + - availability + - deprecation + - quota + - validation + example: access_control + nullable: true + type: string + code: + description: A machine-readable error code string in kabab-case. Unique + across Criteo + enum: + - internal-error + - deprecated-field + - endpoint-deprecated + - required-field + - invalid-date-format + - invalid + - invalid-ranged + - invalid-timespan + example: internal-error + nullable: true + type: string + instance: + description: A URI reference that identifies the specific occurrence of + the problem + nullable: true + type: string + title: + description: "A short, human-readable remarks of the problem type." + nullable: true + type: string + detail: + description: A human-readable explanation specific to this occurrence of + the problem. + nullable: true + type: string + type: object + PortfolioMessage: + description: Class with elementary info about advertiser + example: + advertiserName: advertiserName + properties: + advertiserName: + nullable: true + type: string + type: object + ContactlistOperation_attributes: + description: the contactlist operation attributes + example: + nbValidIdentifiers: 6 + nbInvalidIdentifiers: 1 + sampleInvalidIdentifiers: + - sampleInvalidIdentifiers + - sampleInvalidIdentifiers + contactListId: 0 + requestDate: 2000-01-23T04:56:07.000+00:00 + identifierType: identifierType + operation: operation + properties: + contactListId: + description: the affected user list id + nullable: true + type: integer + operation: + description: The action recorded + type: string + requestDate: + description: When the action was recorded + format: date-time + nullable: true + type: string + identifierType: + description: The schema specified for of the identifiers + nullable: true + type: string + nbValidIdentifiers: + description: How many identifiers were valid for the specified schema + nullable: true + type: integer + nbInvalidIdentifiers: + description: How many identifiers were invalid for the specified schema + nullable: true + type: integer + sampleInvalidIdentifiers: + description: A sample of invalid identifiers if there is some + items: + type: string + nullable: true + type: array + required: + - operation + type: object + ContactlistAmendment_attributes: + description: the name of the entity type + example: + gumCallerId: 0 + identifiers: + - identifiers + - identifiers + identifierType: email + operation: add + properties: + operation: + description: Operation to add or remove users + enum: + - add + - remove + type: string + identifierType: + description: What type of identifiers are used + enum: + - email + - madid + - identityLink + - gum + - customerid + - phoneNumber + nullable: true + type: string + identifiers: + description: "The users tos add or remove, each in the schema specified" + items: + type: string + type: array + gumCallerId: + description: The Gum caller id of the advertiser patching identifiers of + type Gum + nullable: true + type: integer + required: + - identifiers + - operation + type: object + NillableAdSetTargetingRuleV24Q1_value: + allOf: + - $ref: '#/components/schemas/AdSetTargetingRuleV24Q1' + nullable: true + type: object + x-nullable: true + securitySchemes: + oauth: + flows: + authorizationCode: + authorizationUrl: https://api.criteo.com/oauth2 + scopes: {} + tokenUrl: https://api.criteo.com/oauth2/token + clientCredentials: + scopes: {} + tokenUrl: https://api.criteo.com/oauth2/token + type: oauth2 +x-samples-languages: +- java +- python +- php +- csharp +- javascript +- curl +- ruby + diff --git a/sdks/marketingsolutions_2023-04/build.gradle b/sdks/marketingsolutions_2024-07/build.gradle similarity index 97% rename from sdks/marketingsolutions_2023-04/build.gradle rename to sdks/marketingsolutions_2024-07/build.gradle index 255f0806..b5acc267 100644 --- a/sdks/marketingsolutions_2023-04/build.gradle +++ b/sdks/marketingsolutions_2024-07/build.gradle @@ -23,7 +23,7 @@ if (JavaVersion.current().isJava8Compatible()) { } group = 'com.criteo' -version = '2023.04.0.240626' +version = '2024.07.0.240731' repositories { jcenter() @@ -74,7 +74,7 @@ publishing { mavenJava(MavenPublication) { groupId 'com.criteo' artifactId 'criteo-api-marketingsolutions-sdk' - version '2023.04.0.240626' + version '2024.07.0.240731' from components.java artifact sourcesJar artifact javadocJar @@ -82,7 +82,7 @@ publishing { pom { packaging = 'jar' name = 'com.criteo:criteo-api-marketingsolutions-sdk' - description = 'JAVA SDK for Criteo API marketingsolutions for 2023_04 version' + description = 'JAVA SDK for Criteo API marketingsolutions for 2024_07 version' url = 'https://github.com/criteo/criteo-api-java-sdk' licenses { license { diff --git a/sdks/marketingsolutions_2024-07/docs/Ad.md b/sdks/marketingsolutions_2024-07/docs/Ad.md new file mode 100644 index 00000000..6d4d45d4 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/Ad.md @@ -0,0 +1,30 @@ + + +# Ad + +An ad is the binding that connects a creative with an ad set + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the ad | [optional] | +|**description** | **String** | The description of the ad | [optional] | +|**creativeId** | **String** | The id of the Creative binded to this Ad | [optional] | +|**adSetId** | **String** | The id of the Ad Set binded to this Ad | [optional] | +|**inventoryType** | [**InventoryTypeEnum**](#InventoryTypeEnum) | The inventory the Ad belongs to. Possible values are \"Display\" and \"Native\". This is optional since this doesn't make sense for every creative type but will throw an error if not set for a dynamic creative. | [optional] | +|**startDate** | **String** | The date when the ad will be launched String must be in ISO8601 format | [optional] | +|**endDate** | **String** | The date when when we will stop to show this ad. If the end date is not specified (i.e. null) then the ad will go on forever String must be in ISO8601 format | [optional] | + + + +## Enum: InventoryTypeEnum + +| Name | Value | +|---- | -----| +| NATIVE | "Native" | +| DISPLAY | "Display" | +| VIDEO | "Video" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AdListResponse.md b/sdks/marketingsolutions_2024-07/docs/AdListResponse.md new file mode 100644 index 00000000..c6e2c16c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AdListResponse.md @@ -0,0 +1,16 @@ + + +# AdListResponse + +Data model for a list of response resources + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AdResource>**](AdResource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AdResource.md b/sdks/marketingsolutions_2024-07/docs/AdResource.md new file mode 100644 index 00000000..09049595 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AdResource.md @@ -0,0 +1,16 @@ + + +# AdResource + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**Ad**](Ad.md) | | [optional] | +|**id** | **String** | | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/ResponseReadAdSet.md b/sdks/marketingsolutions_2024-07/docs/AdResponse.md similarity index 73% rename from sdks/marketingsolutions_2023-04/docs/ResponseReadAdSet.md rename to sdks/marketingsolutions_2024-07/docs/AdResponse.md index 0f8c1541..df41befb 100644 --- a/sdks/marketingsolutions_2023-04/docs/ResponseReadAdSet.md +++ b/sdks/marketingsolutions_2024-07/docs/AdResponse.md @@ -1,14 +1,14 @@ -# ResponseReadAdSet +# AdResponse -output resource +Data model for response resource ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**data** | [**ReadModelReadAdSet**](ReadModelReadAdSet.md) | | [optional] | +|**data** | [**AdResource**](AdResource.md) | | [optional] | |**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | |**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | diff --git a/sdks/marketingsolutions_2023-04/docs/ReplaceAudienceRequest.md b/sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkEntityV1.md similarity index 51% rename from sdks/marketingsolutions_2023-04/docs/ReplaceAudienceRequest.md rename to sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkEntityV1.md index 0ca5aac2..7ea94f1d 100644 --- a/sdks/marketingsolutions_2023-04/docs/ReplaceAudienceRequest.md +++ b/sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkEntityV1.md @@ -1,14 +1,14 @@ -# ReplaceAudienceRequest +# AdSetAudienceLinkEntityV1 -Request to replace an audience +Link Audience with an ad set ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**data** | [**ReplaceAudience**](ReplaceAudience.md) | | | +|**audienceId** | **String** | | [optional] | diff --git a/sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkEntityV1Resource.md new file mode 100644 index 00000000..2d43f6e7 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# AdSetAudienceLinkEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**AdSetAudienceLinkEntityV1**](AdSetAudienceLinkEntityV1.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkEntityV1Response.md b/sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkEntityV1Response.md new file mode 100644 index 00000000..31f8404e --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkEntityV1Response.md @@ -0,0 +1,16 @@ + + +# AdSetAudienceLinkEntityV1Response + +A top-level object that encapsulates a Criteo API response for a single entity + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**AdSetAudienceLinkEntityV1Resource**](AdSetAudienceLinkEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkInputEntityV1.md b/sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkInputEntityV1.md new file mode 100644 index 00000000..1c2fb4e6 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AdSetAudienceLinkInputEntityV1.md @@ -0,0 +1,14 @@ + + +# AdSetAudienceLinkInputEntityV1 + +Input to set audience ad set link. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**AdSetAudienceLinkEntityV1Resource**](AdSetAudienceLinkEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/AdSetCategoryBid.md b/sdks/marketingsolutions_2024-07/docs/AdSetCategoryBid.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/AdSetCategoryBid.md rename to sdks/marketingsolutions_2024-07/docs/AdSetCategoryBid.md diff --git a/sdks/marketingsolutions_2023-04/docs/AdSetCategoryBidListResponse.md b/sdks/marketingsolutions_2024-07/docs/AdSetCategoryBidListResponse.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/AdSetCategoryBidListResponse.md rename to sdks/marketingsolutions_2024-07/docs/AdSetCategoryBidListResponse.md diff --git a/sdks/marketingsolutions_2023-04/docs/AdSetCategoryBidResource.md b/sdks/marketingsolutions_2024-07/docs/AdSetCategoryBidResource.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/AdSetCategoryBidResource.md rename to sdks/marketingsolutions_2024-07/docs/AdSetCategoryBidResource.md diff --git a/sdks/marketingsolutions_2023-04/docs/AdSetDeliveryLimitations.md b/sdks/marketingsolutions_2024-07/docs/AdSetDeliveryLimitationsV24Q1.md similarity index 96% rename from sdks/marketingsolutions_2023-04/docs/AdSetDeliveryLimitations.md rename to sdks/marketingsolutions_2024-07/docs/AdSetDeliveryLimitationsV24Q1.md index 242e52c2..28680d60 100644 --- a/sdks/marketingsolutions_2023-04/docs/AdSetDeliveryLimitations.md +++ b/sdks/marketingsolutions_2024-07/docs/AdSetDeliveryLimitationsV24Q1.md @@ -1,6 +1,6 @@ -# AdSetDeliveryLimitations +# AdSetDeliveryLimitationsV24Q1 ad set delivery limitations model diff --git a/sdks/marketingsolutions_2023-04/docs/AdSetDisplayMultiplier.md b/sdks/marketingsolutions_2024-07/docs/AdSetDisplayMultiplier.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/AdSetDisplayMultiplier.md rename to sdks/marketingsolutions_2024-07/docs/AdSetDisplayMultiplier.md diff --git a/sdks/marketingsolutions_2023-04/docs/AdSetDisplayMultiplierListResponse.md b/sdks/marketingsolutions_2024-07/docs/AdSetDisplayMultiplierListResponse.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/AdSetDisplayMultiplierListResponse.md rename to sdks/marketingsolutions_2024-07/docs/AdSetDisplayMultiplierListResponse.md diff --git a/sdks/marketingsolutions_2023-04/docs/AdSetDisplayMultiplierResource.md b/sdks/marketingsolutions_2024-07/docs/AdSetDisplayMultiplierResource.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/AdSetDisplayMultiplierResource.md rename to sdks/marketingsolutions_2024-07/docs/AdSetDisplayMultiplierResource.md diff --git a/sdks/marketingsolutions_2023-04/docs/AdSetFrequencyCapping.md b/sdks/marketingsolutions_2024-07/docs/AdSetFrequencyCappingV24Q1.md similarity index 94% rename from sdks/marketingsolutions_2023-04/docs/AdSetFrequencyCapping.md rename to sdks/marketingsolutions_2024-07/docs/AdSetFrequencyCappingV24Q1.md index 5b786433..fb4d84e4 100644 --- a/sdks/marketingsolutions_2023-04/docs/AdSetFrequencyCapping.md +++ b/sdks/marketingsolutions_2024-07/docs/AdSetFrequencyCappingV24Q1.md @@ -1,6 +1,6 @@ -# AdSetFrequencyCapping +# AdSetFrequencyCappingV24Q1 ad set frequency capping model diff --git a/sdks/marketingsolutions_2024-07/docs/AdSetGeoLocationV24Q1.md b/sdks/marketingsolutions_2024-07/docs/AdSetGeoLocationV24Q1.md new file mode 100644 index 00000000..9975c70a --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AdSetGeoLocationV24Q1.md @@ -0,0 +1,16 @@ + + +# AdSetGeoLocationV24Q1 + +ad set geolocation model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**countries** | [**NillableAdSetTargetingRuleV24Q1**](NillableAdSetTargetingRuleV24Q1.md) | | [optional] | +|**subdivisions** | [**NillableAdSetTargetingRuleV24Q1**](NillableAdSetTargetingRuleV24Q1.md) | | [optional] | +|**zipCodes** | [**NillableAdSetTargetingRuleV24Q1**](NillableAdSetTargetingRuleV24Q1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/AdSetSearchFilter.md b/sdks/marketingsolutions_2024-07/docs/AdSetSearchFilterV24Q1.md similarity index 92% rename from sdks/marketingsolutions_2023-04/docs/AdSetSearchFilter.md rename to sdks/marketingsolutions_2024-07/docs/AdSetSearchFilterV24Q1.md index 4e8600b7..558c9779 100644 --- a/sdks/marketingsolutions_2023-04/docs/AdSetSearchFilter.md +++ b/sdks/marketingsolutions_2024-07/docs/AdSetSearchFilterV24Q1.md @@ -1,6 +1,6 @@ -# AdSetSearchFilter +# AdSetSearchFilterV24Q1 filter on ad set ids diff --git a/sdks/marketingsolutions_2023-04/docs/RequestAdSetSearch.md b/sdks/marketingsolutions_2024-07/docs/AdSetSearchRequestV24Q1.md similarity index 58% rename from sdks/marketingsolutions_2023-04/docs/RequestAdSetSearch.md rename to sdks/marketingsolutions_2024-07/docs/AdSetSearchRequestV24Q1.md index e3b620cf..9ef700e5 100644 --- a/sdks/marketingsolutions_2023-04/docs/RequestAdSetSearch.md +++ b/sdks/marketingsolutions_2024-07/docs/AdSetSearchRequestV24Q1.md @@ -1,6 +1,6 @@ -# RequestAdSetSearch +# AdSetSearchRequestV24Q1 request payload of the search endpoint @@ -8,7 +8,7 @@ request payload of the search endpoint | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**filters** | [**AdSetSearchFilter**](AdSetSearchFilter.md) | | [optional] | +|**filters** | [**AdSetSearchFilterV24Q1**](AdSetSearchFilterV24Q1.md) | | [optional] | diff --git a/sdks/marketingsolutions_2023-04/docs/AdSetTargetingRule.md b/sdks/marketingsolutions_2024-07/docs/AdSetTargetingRuleV24Q1.md similarity index 94% rename from sdks/marketingsolutions_2023-04/docs/AdSetTargetingRule.md rename to sdks/marketingsolutions_2024-07/docs/AdSetTargetingRuleV24Q1.md index d6d45bcd..d17cdc39 100644 --- a/sdks/marketingsolutions_2023-04/docs/AdSetTargetingRule.md +++ b/sdks/marketingsolutions_2024-07/docs/AdSetTargetingRuleV24Q1.md @@ -1,6 +1,6 @@ -# AdSetTargetingRule +# AdSetTargetingRuleV24Q1 ad set targeting rule model diff --git a/sdks/marketingsolutions_2024-07/docs/AdSetTargetingV24Q1.md b/sdks/marketingsolutions_2024-07/docs/AdSetTargetingV24Q1.md new file mode 100644 index 00000000..94455484 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AdSetTargetingV24Q1.md @@ -0,0 +1,16 @@ + + +# AdSetTargetingV24Q1 + +ad set targeting model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**deliveryLimitations** | [**AdSetDeliveryLimitationsV24Q1**](AdSetDeliveryLimitationsV24Q1.md) | | [optional] | +|**geoLocation** | [**AdSetGeoLocationV24Q1**](AdSetGeoLocationV24Q1.md) | | [optional] | +|**frequencyCapping** | [**AdSetFrequencyCappingV24Q1**](AdSetFrequencyCappingV24Q1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AdWrite.md b/sdks/marketingsolutions_2024-07/docs/AdWrite.md new file mode 100644 index 00000000..bf2d6891 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AdWrite.md @@ -0,0 +1,29 @@ + + +# AdWrite + +Entity to create or update an ad + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the ad | | +|**description** | **String** | The description of the ad | [optional] | +|**creativeId** | **String** | The id of the Creative bound to this Ad | | +|**adSetId** | **String** | The id of the Ad Set bound to this Ad | | +|**inventoryType** | [**InventoryTypeEnum**](#InventoryTypeEnum) | The inventory the Ad to be created or updated belongs to. Possible values are \"Display\" and \"Native\". This is optional since this doesn't make sense for every creative type but will throw an error if not set for a dynamic creative. | [optional] | +|**startDate** | **String** | The date when the ad will be launched String must be in ISO8601 format | | +|**endDate** | **String** | The date when when we will stop to show this ad. If the end date is not specified (i.e. null) then the ad will go on forever String must be in ISO8601 format | [optional] | + + + +## Enum: InventoryTypeEnum + +| Name | Value | +|---- | -----| +| DISPLAY | "Display" | +| NATIVE | "Native" | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/NewAudienceRequest.md b/sdks/marketingsolutions_2024-07/docs/AdWriteRequest.md similarity index 50% rename from sdks/marketingsolutions_2023-04/docs/NewAudienceRequest.md rename to sdks/marketingsolutions_2024-07/docs/AdWriteRequest.md index 3bce9911..a625bffc 100644 --- a/sdks/marketingsolutions_2023-04/docs/NewAudienceRequest.md +++ b/sdks/marketingsolutions_2024-07/docs/AdWriteRequest.md @@ -1,14 +1,14 @@ -# NewAudienceRequest +# AdWriteRequest -Body of creation of a new audience +Data model for input resource ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**data** | [**NewAudience**](NewAudience.md) | | [optional] | +|**data** | [**AdWriteResource**](AdWriteResource.md) | | [optional] | diff --git a/sdks/marketingsolutions_2024-07/docs/AdWriteResource.md b/sdks/marketingsolutions_2024-07/docs/AdWriteResource.md new file mode 100644 index 00000000..4ebdbd84 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AdWriteResource.md @@ -0,0 +1,16 @@ + + +# AdWriteResource + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**AdWrite**](AdWrite.md) | | [optional] | +|**id** | **String** | | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AdaptiveAttributes.md b/sdks/marketingsolutions_2024-07/docs/AdaptiveAttributes.md new file mode 100644 index 00000000..09ccd3c2 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AdaptiveAttributes.md @@ -0,0 +1,44 @@ + + +# AdaptiveAttributes + +The attributes specific to Adaptive creatives + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**layouts** | [**List<LayoutsEnum>**](#List<LayoutsEnum>) | The Adaptive layouts that are enabled. It can contain any of the following values: \"Editorial\", “Montage“, \"InBannerVideo\". | | +|**logos** | [**List<ImageShape>**](ImageShape.md) | Logo images uploaded on demostatic.criteo.com when deploying and then static.criteo.net | | +|**headlineText** | **String** | The headline text of the banner | | +|**headlineFont** | **String** | Font of the headline Valid supported font like \"Arial\" | | +|**descriptionText** | **String** | The description text of the banner | | +|**descriptionFont** | **String** | Font of the description Valid supported font like \"Arial\" | | +|**callsToAction** | **List<String>** | A Call-to-Action (CTA) is an action-driven instruction to your audience intended to provoke an immediate response, such as “Buy now” or “Go!”. | | +|**colors** | [**AdaptiveColors**](AdaptiveColors.md) | | | +|**imageSets** | [**List<ImageSet>**](ImageSet.md) | Multiple image sets, each image set consists of multiple images and a headline text. | [optional] | +|**imageDisplay** | [**ImageDisplayEnum**](#ImageDisplayEnum) | Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your image set should fit inside the allocated space (\"ShowFullImage\") or whether it should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping. | [optional] | +|**videos** | [**List<VideoDetail>**](VideoDetail.md) | Multiple videos potentially in different shapes. | [optional] | +|**landingPageUrl** | **URI** | Web redirection of the landing page url | | + + + +## Enum: List<LayoutsEnum> + +| Name | Value | +|---- | -----| +| EDITORIAL | "Editorial" | +| MONTAGE | "Montage" | +| INBANNERVIDEO | "InBannerVideo" | + + + +## Enum: ImageDisplayEnum + +| Name | Value | +|---- | -----| +| SHOWFULLIMAGE | "ShowFullImage" | +| ZOOMONIMAGE | "ZoomOnImage" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AdaptiveColors.md b/sdks/marketingsolutions_2024-07/docs/AdaptiveColors.md new file mode 100644 index 00000000..c1b75956 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AdaptiveColors.md @@ -0,0 +1,19 @@ + + +# AdaptiveColors + +Entity consists of the color aliases of the creative's elements + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**logoAreaAndTitleColor** | **String** | Color of the creative's logo area. A valid RGB24 color in hexadecimal (e.g. \"AB00FF\"). | | +|**backgroundColor** | **String** | Color of the creative's background. A valid RGB24 color in hexadecimal (e.g. \"AB00FF\") | | +|**text1Color** | **String** | Color of the headline and the description texts. A valid RGB24 color in hexadecimal (e.g. \"AB00FF\") | | +|**text2Color** | **String** | Color of the image set's headline text. A valid RGB24 color in hexadecimal (e.g. \"AB00FF\") | | +|**ctaBackgroundColor** | **String** | Color of the background of the CTA. A valid RGB24 color in hexadecimal (e.g. \"AB00FF\"). | | +|**ctaTextColor** | **String** | Color of the text of the CTA. A valid RGB24 color in hexadecimal (e.g. \"AB00FF\"). | | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AdaptiveWriteAttributes.md b/sdks/marketingsolutions_2024-07/docs/AdaptiveWriteAttributes.md new file mode 100644 index 00000000..69d5e7af --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AdaptiveWriteAttributes.md @@ -0,0 +1,44 @@ + + +# AdaptiveWriteAttributes + +The attributes specific to create or update an Adaptive creative + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**layouts** | [**List<LayoutsEnum>**](#List<LayoutsEnum>) | The Adaptive layouts that are enabled. It can contain any of the following values: \"Editorial\", “Montage“, \"InBannerVideo\". | | +|**logoBase64String** | **String** | Logo image as a base-64 encoded string | | +|**headlineText** | **String** | The headline text of the banner | | +|**headlineFont** | **String** | Font of the headline Valid supported font like \"Arial\" | | +|**descriptionText** | **String** | The description text of the banner | | +|**descriptionFont** | **String** | Font of the description Valid supported font like \"Arial\" | | +|**callsToAction** | **List<String>** | A Call-to-Action (CTA) is an action-driven instruction to your audience intended to provoke an immediate response, such as “Buy now” or “Go!”. | | +|**colors** | [**AdaptiveColors**](AdaptiveColors.md) | | | +|**imageSetsBase64** | [**List<ImageSetBase64>**](ImageSetBase64.md) | Multiple image sets, each image set consists of multiple images as a base-64 encoded string and a headline text. | [optional] | +|**imageDisplay** | [**ImageDisplayEnum**](#ImageDisplayEnum) | Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your image set should fit inside the allocated space (\"ShowFullImage\") or whether it should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping. | [optional] | +|**videoBase64Strings** | **List<String>** | Multiple videos potentially in different shapes, each video is a base-64 encoded string. | [optional] | +|**landingPageUrl** | **URI** | Web redirection of the landing page url. | | + + + +## Enum: List<LayoutsEnum> + +| Name | Value | +|---- | -----| +| EDITORIAL | "Editorial" | +| MONTAGE | "Montage" | +| INBANNERVIDEO | "InBannerVideo" | + + + +## Enum: ImageDisplayEnum + +| Name | Value | +|---- | -----| +| SHOWFULLIMAGE | "ShowFullImage" | +| ZOOMONIMAGE | "ZoomOnImage" | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/AdvertiserApi.md b/sdks/marketingsolutions_2024-07/docs/AdvertiserApi.md similarity index 84% rename from sdks/marketingsolutions_2023-04/docs/AdvertiserApi.md rename to sdks/marketingsolutions_2024-07/docs/AdvertiserApi.md index 501de5db..c4c71345 100644 --- a/sdks/marketingsolutions_2023-04/docs/AdvertiserApi.md +++ b/sdks/marketingsolutions_2024-07/docs/AdvertiserApi.md @@ -4,7 +4,7 @@ All URIs are relative to *https://api.criteo.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**apiPortfolioGet**](AdvertiserApi.md#apiPortfolioGet) | **GET** /2023-04/advertisers/me | | +| [**apiPortfolioGet**](AdvertiserApi.md#apiPortfolioGet) | **GET** /2024-07/advertisers/me | | @@ -19,15 +19,15 @@ Fetch the portfolio of Advertisers for this account ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; - -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.AdvertiserApi; +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AdvertiserApi; public class Example { public static void main(String[] args) { diff --git a/sdks/marketingsolutions_2024-07/docs/AlgebraNodeV1.md b/sdks/marketingsolutions_2024-07/docs/AlgebraNodeV1.md new file mode 100644 index 00000000..de59ad2b --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AlgebraNodeV1.md @@ -0,0 +1,17 @@ + + +# AlgebraNodeV1 + +Node in the audience algebra definition. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**and** | [**List<AlgebraNodeV1>**](AlgebraNodeV1.md) | | [optional] | +|**or** | [**List<AlgebraNodeV1>**](AlgebraNodeV1.md) | | [optional] | +|**not** | [**AlgebraNodeV1**](AlgebraNodeV1.md) | | [optional] | +|**audienceSegmentId** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/AnalyticsApi.md b/sdks/marketingsolutions_2024-07/docs/AnalyticsApi.md similarity index 86% rename from sdks/marketingsolutions_2023-04/docs/AnalyticsApi.md rename to sdks/marketingsolutions_2024-07/docs/AnalyticsApi.md index 863a7411..4f748741 100644 --- a/sdks/marketingsolutions_2023-04/docs/AnalyticsApi.md +++ b/sdks/marketingsolutions_2024-07/docs/AnalyticsApi.md @@ -4,10 +4,10 @@ All URIs are relative to *https://api.criteo.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getAdsetReport**](AnalyticsApi.md#getAdsetReport) | **POST** /2023-04/statistics/report | | -| [**getPlacementsReport**](AnalyticsApi.md#getPlacementsReport) | **POST** /2023-04/placements/report | | -| [**getTransactionsReport**](AnalyticsApi.md#getTransactionsReport) | **POST** /2023-04/transactions/report | | -| [**getTransparencyReport**](AnalyticsApi.md#getTransparencyReport) | **POST** /2023-04/log-level/advertisers/{advertiser-id}/report | | +| [**getAdsetReport**](AnalyticsApi.md#getAdsetReport) | **POST** /2024-07/statistics/report | | +| [**getPlacementsReport**](AnalyticsApi.md#getPlacementsReport) | **POST** /2024-07/placements/report | | +| [**getTransactionsReport**](AnalyticsApi.md#getTransactionsReport) | **POST** /2024-07/transactions/report | | +| [**getTransparencyReport**](AnalyticsApi.md#getTransparencyReport) | **POST** /2024-07/log-level/advertisers/{advertiser-id}/report | | @@ -22,15 +22,15 @@ This Statistics endpoint provides adset related data. It is an upgrade of our pr ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.AnalyticsApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AnalyticsApi; public class Example { public static void main(String[] args) { @@ -113,15 +113,15 @@ Your ads are placed in different domains (publishers) and environments (websites ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.AnalyticsApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AnalyticsApi; public class Example { public static void main(String[] args) { @@ -204,15 +204,15 @@ This Transactions endpoint provides transactions id related data. ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.AnalyticsApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AnalyticsApi; public class Example { public static void main(String[] args) { @@ -295,15 +295,15 @@ This Statistics endpoint provides publisher data. ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; - -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.AnalyticsApi; +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AnalyticsApi; public class Example { public static void main(String[] args) { diff --git a/sdks/marketingsolutions_2023-04/docs/ApplicationSummaryModel.md b/sdks/marketingsolutions_2024-07/docs/ApplicationSummaryModel.md similarity index 75% rename from sdks/marketingsolutions_2023-04/docs/ApplicationSummaryModel.md rename to sdks/marketingsolutions_2024-07/docs/ApplicationSummaryModel.md index 704b26ad..d5e84458 100644 --- a/sdks/marketingsolutions_2023-04/docs/ApplicationSummaryModel.md +++ b/sdks/marketingsolutions_2024-07/docs/ApplicationSummaryModel.md @@ -2,7 +2,7 @@ # ApplicationSummaryModel -Model of ApplicationSummary +Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients ## Properties diff --git a/sdks/retailmedia_2023-04/docs/ApplicationSummaryModelResource.md b/sdks/marketingsolutions_2024-07/docs/ApplicationSummaryModelResource.md similarity index 79% rename from sdks/retailmedia_2023-04/docs/ApplicationSummaryModelResource.md rename to sdks/marketingsolutions_2024-07/docs/ApplicationSummaryModelResource.md index 81ed2c97..af688c5d 100644 --- a/sdks/retailmedia_2023-04/docs/ApplicationSummaryModelResource.md +++ b/sdks/marketingsolutions_2024-07/docs/ApplicationSummaryModelResource.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResource -A class that represents a ValueType in a guild compliant way +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/marketingsolutions_2023-04/docs/ApplicationSummaryModelResponse.md b/sdks/marketingsolutions_2024-07/docs/ApplicationSummaryModelResponse.md similarity index 85% rename from sdks/marketingsolutions_2023-04/docs/ApplicationSummaryModelResponse.md rename to sdks/marketingsolutions_2024-07/docs/ApplicationSummaryModelResponse.md index 47b6bd74..658b5549 100644 --- a/sdks/marketingsolutions_2023-04/docs/ApplicationSummaryModelResponse.md +++ b/sdks/marketingsolutions_2024-07/docs/ApplicationSummaryModelResponse.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResponse -Response of ApplicationSummaryModel +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceApi.md b/sdks/marketingsolutions_2024-07/docs/AudienceApi.md new file mode 100644 index 00000000..8f8ac766 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceApi.md @@ -0,0 +1,1598 @@ +# AudienceApi + +All URIs are relative to *https://api.criteo.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**bulkCreateAudienceSegments**](AudienceApi.md#bulkCreateAudienceSegments) | **POST** /2024-07/marketing-solutions/audience-segments/create | | +| [**bulkCreateAudiences**](AudienceApi.md#bulkCreateAudiences) | **POST** /2024-07/marketing-solutions/audiences/create | | +| [**bulkDeleteAudienceSegments**](AudienceApi.md#bulkDeleteAudienceSegments) | **POST** /2024-07/marketing-solutions/audience-segments/delete | | +| [**bulkDeleteAudiences**](AudienceApi.md#bulkDeleteAudiences) | **POST** /2024-07/marketing-solutions/audiences/delete | | +| [**bulkUpdateAudienceSegments**](AudienceApi.md#bulkUpdateAudienceSegments) | **PATCH** /2024-07/marketing-solutions/audience-segments | | +| [**bulkUpdateAudiences**](AudienceApi.md#bulkUpdateAudiences) | **PATCH** /2024-07/marketing-solutions/audiences | | +| [**computeAudienceSegmentsSizes**](AudienceApi.md#computeAudienceSegmentsSizes) | **POST** /2024-07/marketing-solutions/audience-segments/compute-sizes | | +| [**computeAudiencesSizes**](AudienceApi.md#computeAudiencesSizes) | **POST** /2024-07/marketing-solutions/audiences/compute-sizes | | +| [**deleteContactListIdentifiers**](AudienceApi.md#deleteContactListIdentifiers) | **DELETE** /2024-07/marketing-solutions/audience-segments/{audience-segment-id}/contact-list | | +| [**estimateAudienceSegmentSize**](AudienceApi.md#estimateAudienceSegmentSize) | **POST** /2024-07/marketing-solutions/audience-segments/estimate-size | | +| [**estimateAudienceSize**](AudienceApi.md#estimateAudienceSize) | **POST** /2024-07/marketing-solutions/audiences/estimate-size | | +| [**getAudienceSegmentContactListStatistics**](AudienceApi.md#getAudienceSegmentContactListStatistics) | **GET** /2024-07/marketing-solutions/audience-segments/{audience-segment-id}/contact-list/statistics | | +| [**getAudienceSegmentsInMarketBrands**](AudienceApi.md#getAudienceSegmentsInMarketBrands) | **GET** /2024-07/marketing-solutions/audience-segments/in-market-brands | | +| [**getAudienceSegmentsInMarketInterests**](AudienceApi.md#getAudienceSegmentsInMarketInterests) | **GET** /2024-07/marketing-solutions/audience-segments/in-market-interests | | +| [**searchAudienceSegments**](AudienceApi.md#searchAudienceSegments) | **POST** /2024-07/marketing-solutions/audience-segments/search | | +| [**searchAudiences**](AudienceApi.md#searchAudiences) | **POST** /2024-07/marketing-solutions/audiences/search | | +| [**updateContactListIdentifiers**](AudienceApi.md#updateContactListIdentifiers) | **PATCH** /2024-07/marketing-solutions/audience-segments/{audience-segment-id}/contact-list | | + + + +## bulkCreateAudienceSegments + +> AudienceSegmentEntityV1ListResponse bulkCreateAudienceSegments(audienceSegmentBulkCreateInputV1) + + + +Creates all segments with a valid configuration, and returns their IDs. For those that cannot be created, one or multiple errors are returned. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + AudienceSegmentBulkCreateInputV1 audienceSegmentBulkCreateInputV1 = new AudienceSegmentBulkCreateInputV1(); // AudienceSegmentBulkCreateInputV1 | Segment creation parameter + try { + AudienceSegmentEntityV1ListResponse result = apiInstance.bulkCreateAudienceSegments(audienceSegmentBulkCreateInputV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#bulkCreateAudienceSegments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceSegmentBulkCreateInputV1** | [**AudienceSegmentBulkCreateInputV1**](AudienceSegmentBulkCreateInputV1.md)| Segment creation parameter | | + +### Return type + +[**AudienceSegmentEntityV1ListResponse**](AudienceSegmentEntityV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## bulkCreateAudiences + +> AudienceEntityV1ListResponse bulkCreateAudiences(audienceBulkCreateInputV1) + + + +Creates all audiences with a valid configuration, and returns their IDs. For those that cannot be created, one or multiple errors are returned. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + AudienceBulkCreateInputV1 audienceBulkCreateInputV1 = new AudienceBulkCreateInputV1(); // AudienceBulkCreateInputV1 | + try { + AudienceEntityV1ListResponse result = apiInstance.bulkCreateAudiences(audienceBulkCreateInputV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#bulkCreateAudiences"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceBulkCreateInputV1** | [**AudienceBulkCreateInputV1**](AudienceBulkCreateInputV1.md)| | | + +### Return type + +[**AudienceEntityV1ListResponse**](AudienceEntityV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## bulkDeleteAudienceSegments + +> AudienceSegmentIdEntityV1ListResponse bulkDeleteAudienceSegments(audienceSegmentBulkDeleteInputV1) + + + +Delete the segments associated to the given audience IDs. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + AudienceSegmentBulkDeleteInputV1 audienceSegmentBulkDeleteInputV1 = new AudienceSegmentBulkDeleteInputV1(); // AudienceSegmentBulkDeleteInputV1 | Segment delete request. + try { + AudienceSegmentIdEntityV1ListResponse result = apiInstance.bulkDeleteAudienceSegments(audienceSegmentBulkDeleteInputV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#bulkDeleteAudienceSegments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceSegmentBulkDeleteInputV1** | [**AudienceSegmentBulkDeleteInputV1**](AudienceSegmentBulkDeleteInputV1.md)| Segment delete request. | | + +### Return type + +[**AudienceSegmentIdEntityV1ListResponse**](AudienceSegmentIdEntityV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## bulkDeleteAudiences + +> AudienceIdEntityV1ListResponse bulkDeleteAudiences(audienceBulkDeleteInputV1) + + + +Deletes the audiences associated to the given audience IDs. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + AudienceBulkDeleteInputV1 audienceBulkDeleteInputV1 = new AudienceBulkDeleteInputV1(); // AudienceBulkDeleteInputV1 | + try { + AudienceIdEntityV1ListResponse result = apiInstance.bulkDeleteAudiences(audienceBulkDeleteInputV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#bulkDeleteAudiences"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceBulkDeleteInputV1** | [**AudienceBulkDeleteInputV1**](AudienceBulkDeleteInputV1.md)| | | + +### Return type + +[**AudienceIdEntityV1ListResponse**](AudienceIdEntityV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **204** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## bulkUpdateAudienceSegments + +> AudienceSegmentEntityV1ListResponse bulkUpdateAudienceSegments(audienceSegmentBulkUpdateInputV1) + + + +Updates the properties of all segments with a valid configuration, and returns their IDs. For those that cannot be updated, one or multiple errors are returned. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + AudienceSegmentBulkUpdateInputV1 audienceSegmentBulkUpdateInputV1 = new AudienceSegmentBulkUpdateInputV1(); // AudienceSegmentBulkUpdateInputV1 | Segment Update request + try { + AudienceSegmentEntityV1ListResponse result = apiInstance.bulkUpdateAudienceSegments(audienceSegmentBulkUpdateInputV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#bulkUpdateAudienceSegments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceSegmentBulkUpdateInputV1** | [**AudienceSegmentBulkUpdateInputV1**](AudienceSegmentBulkUpdateInputV1.md)| Segment Update request | | + +### Return type + +[**AudienceSegmentEntityV1ListResponse**](AudienceSegmentEntityV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## bulkUpdateAudiences + +> AudienceEntityV1ListResponse bulkUpdateAudiences(audienceBulkUpdateInputV1) + + + +Updates the properties of all audiences with a valid configuration, and returns their IDs. For those that cannot be updated, one or multiple errors are returned. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + AudienceBulkUpdateInputV1 audienceBulkUpdateInputV1 = new AudienceBulkUpdateInputV1(); // AudienceBulkUpdateInputV1 | + try { + AudienceEntityV1ListResponse result = apiInstance.bulkUpdateAudiences(audienceBulkUpdateInputV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#bulkUpdateAudiences"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceBulkUpdateInputV1** | [**AudienceBulkUpdateInputV1**](AudienceBulkUpdateInputV1.md)| | | + +### Return type + +[**AudienceEntityV1ListResponse**](AudienceEntityV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## computeAudienceSegmentsSizes + +> AudienceSegmentSizeEntityV1ListResponse computeAudienceSegmentsSizes(audienceSegmentComputeSizesInputV1) + + + +Gets the size of all segments. An error is returned for those whose size calculation is not supported. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + AudienceSegmentComputeSizesInputV1 audienceSegmentComputeSizesInputV1 = new AudienceSegmentComputeSizesInputV1(); // AudienceSegmentComputeSizesInputV1 | + try { + AudienceSegmentSizeEntityV1ListResponse result = apiInstance.computeAudienceSegmentsSizes(audienceSegmentComputeSizesInputV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#computeAudienceSegmentsSizes"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceSegmentComputeSizesInputV1** | [**AudienceSegmentComputeSizesInputV1**](AudienceSegmentComputeSizesInputV1.md)| | | + +### Return type + +[**AudienceSegmentSizeEntityV1ListResponse**](AudienceSegmentSizeEntityV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## computeAudiencesSizes + +> AudienceSizeEntityV1ListResponse computeAudiencesSizes(audienceComputeSizesInputV1) + + + +Gets the size of all audiences. An error is returned for those whose size calculation is not supported. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + AudienceComputeSizesInputV1 audienceComputeSizesInputV1 = new AudienceComputeSizesInputV1(); // AudienceComputeSizesInputV1 | + try { + AudienceSizeEntityV1ListResponse result = apiInstance.computeAudiencesSizes(audienceComputeSizesInputV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#computeAudiencesSizes"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceComputeSizesInputV1** | [**AudienceComputeSizesInputV1**](AudienceComputeSizesInputV1.md)| | | + +### Return type + +[**AudienceSizeEntityV1ListResponse**](AudienceSizeEntityV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## deleteContactListIdentifiers + +> DeleteAudienceContactListResponse deleteContactListIdentifiers(audienceSegmentId) + + + +Delete all identifiers from a contact list audience-segment. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + String audienceSegmentId = "audienceSegmentId_example"; // String | The id of the contact list audience-segment to amend + try { + DeleteAudienceContactListResponse result = apiInstance.deleteContactListIdentifiers(audienceSegmentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#deleteContactListIdentifiers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceSegmentId** | **String**| The id of the contact list audience-segment to amend | | + +### Return type + +[**DeleteAudienceContactListResponse**](DeleteAudienceContactListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The Contact List was emptied | - | +| **403** | Forbidden | - | + + +## estimateAudienceSegmentSize + +> AudienceSegmentSizeEstimationV1Response estimateAudienceSegmentSize(audienceSegmentEstimateSizeInputV1) + + + +Gets the size estimation of a non existent segment. An error is returned when size calculation is not supported. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + AudienceSegmentEstimateSizeInputV1 audienceSegmentEstimateSizeInputV1 = new AudienceSegmentEstimateSizeInputV1(); // AudienceSegmentEstimateSizeInputV1 | + try { + AudienceSegmentSizeEstimationV1Response result = apiInstance.estimateAudienceSegmentSize(audienceSegmentEstimateSizeInputV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#estimateAudienceSegmentSize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceSegmentEstimateSizeInputV1** | [**AudienceSegmentEstimateSizeInputV1**](AudienceSegmentEstimateSizeInputV1.md)| | | + +### Return type + +[**AudienceSegmentSizeEstimationV1Response**](AudienceSegmentSizeEstimationV1Response.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## estimateAudienceSize + +> AudienceSizeEstimationV1Response estimateAudienceSize(audienceEstimateSizeInputV1) + + + +Gets the size estimation of a non existent audience. An error is returned when size calculation is not supported. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + AudienceEstimateSizeInputV1 audienceEstimateSizeInputV1 = new AudienceEstimateSizeInputV1(); // AudienceEstimateSizeInputV1 | + try { + AudienceSizeEstimationV1Response result = apiInstance.estimateAudienceSize(audienceEstimateSizeInputV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#estimateAudienceSize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceEstimateSizeInputV1** | [**AudienceEstimateSizeInputV1**](AudienceEstimateSizeInputV1.md)| | | + +### Return type + +[**AudienceSizeEstimationV1Response**](AudienceSizeEstimationV1Response.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## getAudienceSegmentContactListStatistics + +> ContactListStatisticsEntityV1Response getAudienceSegmentContactListStatistics(audienceSegmentId) + + + +Returns the statistics of a contact list segment. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + Integer audienceSegmentId = 56; // Integer | The segment ID. + try { + ContactListStatisticsEntityV1Response result = apiInstance.getAudienceSegmentContactListStatistics(audienceSegmentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#getAudienceSegmentContactListStatistics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceSegmentId** | **Integer**| The segment ID. | | + +### Return type + +[**ContactListStatisticsEntityV1Response**](ContactListStatisticsEntityV1Response.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## getAudienceSegmentsInMarketBrands + +> InMarketAudienceSegmentBrandEntityV1ListResponse getAudienceSegmentsInMarketBrands(advertiserId, country) + + + +Returns a list with all available in-market brands that can be used to define an in-market segment. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + String advertiserId = "advertiserId_example"; // String | The advertiser ID. + String country = "country_example"; // String | The ISO 3166-1 alpha-2 country code. + try { + InMarketAudienceSegmentBrandEntityV1ListResponse result = apiInstance.getAudienceSegmentsInMarketBrands(advertiserId, country); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#getAudienceSegmentsInMarketBrands"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **advertiserId** | **String**| The advertiser ID. | | +| **country** | **String**| The ISO 3166-1 alpha-2 country code. | | + +### Return type + +[**InMarketAudienceSegmentBrandEntityV1ListResponse**](InMarketAudienceSegmentBrandEntityV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## getAudienceSegmentsInMarketInterests + +> InMarketAudienceSegmentInterestEntityV1ListResponse getAudienceSegmentsInMarketInterests(advertiserId, country) + + + +Returns a list with all available in-market interests that can be used to define an in-market segment. These in-market interests correspond to the Google product taxonomy. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + String advertiserId = "advertiserId_example"; // String | The advertiser ID. + String country = "country_example"; // String | The ISO 3166-1 alpha-2 country code. + try { + InMarketAudienceSegmentInterestEntityV1ListResponse result = apiInstance.getAudienceSegmentsInMarketInterests(advertiserId, country); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#getAudienceSegmentsInMarketInterests"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **advertiserId** | **String**| The advertiser ID. | | +| **country** | **String**| The ISO 3166-1 alpha-2 country code. | | + +### Return type + +[**InMarketAudienceSegmentInterestEntityV1ListResponse**](InMarketAudienceSegmentInterestEntityV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## searchAudienceSegments + +> AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse searchAudienceSegments(audienceSegmentSearchInputV1, limit, offset) + + + +Returns a list of segments that match the provided filters. If present, the filters are AND'ed together when applied. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + AudienceSegmentSearchInputV1 audienceSegmentSearchInputV1 = new AudienceSegmentSearchInputV1(); // AudienceSegmentSearchInputV1 | Segment search filters. + Integer limit = 50; // Integer | The number of elements to be returned. The default is 50 and the maximum is 100. + Integer offset = 0; // Integer | The (zero-based) offset into the collection. The default is 0. + try { + AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse result = apiInstance.searchAudienceSegments(audienceSegmentSearchInputV1, limit, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#searchAudienceSegments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceSegmentSearchInputV1** | [**AudienceSegmentSearchInputV1**](AudienceSegmentSearchInputV1.md)| Segment search filters. | | +| **limit** | **Integer**| The number of elements to be returned. The default is 50 and the maximum is 100. | [optional] [default to 50] | +| **offset** | **Integer**| The (zero-based) offset into the collection. The default is 0. | [optional] [default to 0] | + +### Return type + +[**AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse**](AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## searchAudiences + +> AudienceEntityV1AudienceSearchMetadataV1ListResponse searchAudiences(audienceSearchInputV1, limit, offset) + + + +Returns a list of audiences that match the provided filters. If present, the filters are AND'ed together when applied. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + AudienceSearchInputV1 audienceSearchInputV1 = new AudienceSearchInputV1(); // AudienceSearchInputV1 | Audience search filters. + Integer limit = 50; // Integer | The number of elements to be returned. The default is 50 and the maximum is 100. + Integer offset = 0; // Integer | The (zero-based) offset into the collection. The default is 0. + try { + AudienceEntityV1AudienceSearchMetadataV1ListResponse result = apiInstance.searchAudiences(audienceSearchInputV1, limit, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#searchAudiences"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceSearchInputV1** | [**AudienceSearchInputV1**](AudienceSearchInputV1.md)| Audience search filters. | | +| **limit** | **Integer**| The number of elements to be returned. The default is 50 and the maximum is 100. | [optional] [default to 50] | +| **offset** | **Integer**| The (zero-based) offset into the collection. The default is 0. | [optional] [default to 0] | + +### Return type + +[**AudienceEntityV1AudienceSearchMetadataV1ListResponse**](AudienceEntityV1AudienceSearchMetadataV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## updateContactListIdentifiers + +> ModifyAudienceResponse updateContactListIdentifiers(audienceSegmentId, contactlistAmendmentRequest) + + + +Add/remove identifiers to or from a contact list audience-segment. + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + String audienceSegmentId = "audienceSegmentId_example"; // String | The id of the contact list audience-segment to amend + ContactlistAmendmentRequest contactlistAmendmentRequest = new ContactlistAmendmentRequest(); // ContactlistAmendmentRequest | + try { + ModifyAudienceResponse result = apiInstance.updateContactListIdentifiers(audienceSegmentId, contactlistAmendmentRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#updateContactListIdentifiers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **audienceSegmentId** | **String**| The id of the contact list audience-segment to amend | | +| **contactlistAmendmentRequest** | [**ContactlistAmendmentRequest**](ContactlistAmendmentRequest.md)| | | + +### Return type + +[**ModifyAudienceResponse**](ModifyAudienceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Summary of created request | - | +| **403** | Forbidden | - | +| **404** | Audience 123 not found | - | + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceBulkCreateInputV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceBulkCreateInputV1.md new file mode 100644 index 00000000..762ef6cb --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceBulkCreateInputV1.md @@ -0,0 +1,14 @@ + + +# AudienceBulkCreateInputV1 + +Input to create one or more audiences. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceCreateEntityV1Resource>**](AudienceCreateEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceBulkDeleteInputV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceBulkDeleteInputV1.md new file mode 100644 index 00000000..6add8576 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceBulkDeleteInputV1.md @@ -0,0 +1,14 @@ + + +# AudienceBulkDeleteInputV1 + +Input to delete one or more audiences. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceDeleteEntityV1Resource>**](AudienceDeleteEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceBulkUpdateInputV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceBulkUpdateInputV1.md new file mode 100644 index 00000000..52897998 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceBulkUpdateInputV1.md @@ -0,0 +1,14 @@ + + +# AudienceBulkUpdateInputV1 + +Input to update one or more audiences. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceUpdateEntityV1Resource>**](AudienceUpdateEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceComputeSizeEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceComputeSizeEntityV1Resource.md new file mode 100644 index 00000000..fa9ab879 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceComputeSizeEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# AudienceComputeSizeEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | **Object** | Audience of people of interest for a marketer. | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceComputeSizesInputV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceComputeSizesInputV1.md new file mode 100644 index 00000000..83be30b2 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceComputeSizesInputV1.md @@ -0,0 +1,14 @@ + + +# AudienceComputeSizesInputV1 + +Input to retrieve the size of one or more audiences. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceComputeSizeEntityV1Resource>**](AudienceComputeSizeEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceCreateEntityV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceCreateEntityV1.md new file mode 100644 index 00000000..8e497f50 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceCreateEntityV1.md @@ -0,0 +1,17 @@ + + +# AudienceCreateEntityV1 + +Audience of people of interest for a marketer. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the audience | | +|**description** | **String** | Description of the audience | [optional] | +|**advertiserId** | **String** | Advertiser associated to the audience | | +|**algebra** | [**AlgebraNodeV1**](AlgebraNodeV1.md) | | | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceCreateEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceCreateEntityV1Resource.md new file mode 100644 index 00000000..c4f42c78 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceCreateEntityV1Resource.md @@ -0,0 +1,15 @@ + + +# AudienceCreateEntityV1Resource + +A top-level object that encapsulates a Criteo API response for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**AudienceCreateEntityV1**](AudienceCreateEntityV1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceDeleteEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceDeleteEntityV1Resource.md new file mode 100644 index 00000000..df09481c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceDeleteEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# AudienceDeleteEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | **Object** | Audience to delete | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceEntityV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceEntityV1.md new file mode 100644 index 00000000..133f9af8 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceEntityV1.md @@ -0,0 +1,20 @@ + + +# AudienceEntityV1 + +Audience of people of interest for a marketer. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the audience | [optional] | +|**description** | **String** | Description of the audience | [optional] | +|**createdAt** | **OffsetDateTime** | ISO-8601 timestamp in UTC of audience creation (read-only) | [optional] | +|**updatedAt** | **OffsetDateTime** | ISO-8601 timestamp in UTC of audience update (read-only) | [optional] | +|**advertiserId** | **String** | Advertiser associated to the audience | [optional] | +|**adSetIds** | **Set<String>** | Ad sets associated to the audience | [optional] | +|**algebra** | [**AlgebraNodeV1**](AlgebraNodeV1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceEntityV1AudienceSearchMetadataV1ListResponse.md b/sdks/marketingsolutions_2024-07/docs/AudienceEntityV1AudienceSearchMetadataV1ListResponse.md new file mode 100644 index 00000000..4f541d6a --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceEntityV1AudienceSearchMetadataV1ListResponse.md @@ -0,0 +1,17 @@ + + +# AudienceEntityV1AudienceSearchMetadataV1ListResponse + +A top-level object that encapsulates a Criteo API response for several entities and metadata + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**meta** | [**AudienceSearchMetadataV1**](AudienceSearchMetadataV1.md) | | [optional] | +|**data** | [**List<AudienceEntityV1Resource>**](AudienceEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceEntityV1ListResponse.md b/sdks/marketingsolutions_2024-07/docs/AudienceEntityV1ListResponse.md new file mode 100644 index 00000000..862d78dc --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceEntityV1ListResponse.md @@ -0,0 +1,16 @@ + + +# AudienceEntityV1ListResponse + +A top-level object that encapsulates a Criteo API response for several entities + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceEntityV1Resource>**](AudienceEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceEntityV1Resource.md new file mode 100644 index 00000000..380c1bd5 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# AudienceEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**AudienceEntityV1**](AudienceEntityV1.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/AudienceError.md b/sdks/marketingsolutions_2024-07/docs/AudienceError.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/AudienceError.md rename to sdks/marketingsolutions_2024-07/docs/AudienceError.md diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceEstimateSizeEntityV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceEstimateSizeEntityV1.md new file mode 100644 index 00000000..4d2b4dd3 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceEstimateSizeEntityV1.md @@ -0,0 +1,15 @@ + + +# AudienceEstimateSizeEntityV1 + +Audience of people of interest for a marketer. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**advertiserId** | **String** | Advertiser associated to the audience | | +|**algebra** | [**AlgebraNodeV1**](AlgebraNodeV1.md) | | | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceEstimateSizeEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceEstimateSizeEntityV1Resource.md new file mode 100644 index 00000000..6e9911bf --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceEstimateSizeEntityV1Resource.md @@ -0,0 +1,15 @@ + + +# AudienceEstimateSizeEntityV1Resource + +A top-level object that encapsulates a Criteo API response for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**AudienceEstimateSizeEntityV1**](AudienceEstimateSizeEntityV1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceEstimateSizeInputV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceEstimateSizeInputV1.md new file mode 100644 index 00000000..0f7f5fa7 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceEstimateSizeInputV1.md @@ -0,0 +1,14 @@ + + +# AudienceEstimateSizeInputV1 + +Input to estimate the size of an audience. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**AudienceEstimateSizeEntityV1Resource**](AudienceEstimateSizeEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceIdEntityV1ListResponse.md b/sdks/marketingsolutions_2024-07/docs/AudienceIdEntityV1ListResponse.md new file mode 100644 index 00000000..7ef8d3f8 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceIdEntityV1ListResponse.md @@ -0,0 +1,16 @@ + + +# AudienceIdEntityV1ListResponse + +A top-level object that encapsulates a Criteo API response for several entities + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceIdEntityV1Resource>**](AudienceIdEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceIdEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceIdEntityV1Resource.md new file mode 100644 index 00000000..a465e922 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceIdEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# AudienceIdEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | **Object** | Audience entity with only its ID | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/AudienceNameDescription.md b/sdks/marketingsolutions_2024-07/docs/AudienceNameDescription.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/AudienceNameDescription.md rename to sdks/marketingsolutions_2024-07/docs/AudienceNameDescription.md diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSearchEntityV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSearchEntityV1.md new file mode 100644 index 00000000..a0280f31 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSearchEntityV1.md @@ -0,0 +1,17 @@ + + +# AudienceSearchEntityV1 + +Available filters to perform a search on segments. If present, the filters are AND'ed together when applied. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**audienceIds** | **List<String>** | List of audience ids | [optional] | +|**advertiserIds** | **List<String>** | List of advertiser ids | [optional] | +|**audienceSegmentIds** | **List<String>** | List of segment ids (linked to the result audiences) | [optional] | +|**adSetIds** | **List<String>** | List of AdSet ids | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSearchEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceSearchEntityV1Resource.md new file mode 100644 index 00000000..ae25fb58 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSearchEntityV1Resource.md @@ -0,0 +1,15 @@ + + +# AudienceSearchEntityV1Resource + +A top-level object that encapsulates a Criteo API response for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**AudienceSearchEntityV1**](AudienceSearchEntityV1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSearchInputV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSearchInputV1.md new file mode 100644 index 00000000..3378c8be --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSearchInputV1.md @@ -0,0 +1,14 @@ + + +# AudienceSearchInputV1 + +Audience search parameter + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**AudienceSearchEntityV1Resource**](AudienceSearchEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSearchMetadataV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSearchMetadataV1.md new file mode 100644 index 00000000..1cbd1a82 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSearchMetadataV1.md @@ -0,0 +1,16 @@ + + +# AudienceSearchMetadataV1 + +Metadata for the audience search response. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**totalItems** | **Integer** | Total number of items | [optional] | +|**limit** | **Integer** | Max item of the current page | [optional] | +|**offset** | **Integer** | Number of item to skip | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentBulkCreateInputV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentBulkCreateInputV1.md new file mode 100644 index 00000000..01aba40d --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentBulkCreateInputV1.md @@ -0,0 +1,14 @@ + + +# AudienceSegmentBulkCreateInputV1 + +Input to create one or more audience segments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceSegmentCreateEntityV1Resource>**](AudienceSegmentCreateEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentBulkDeleteInputV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentBulkDeleteInputV1.md new file mode 100644 index 00000000..944bc9c0 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentBulkDeleteInputV1.md @@ -0,0 +1,14 @@ + + +# AudienceSegmentBulkDeleteInputV1 + +Input to delete one or more segments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceSegmentDeleteEntityV1Resource>**](AudienceSegmentDeleteEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentBulkUpdateInputV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentBulkUpdateInputV1.md new file mode 100644 index 00000000..e92cd495 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentBulkUpdateInputV1.md @@ -0,0 +1,14 @@ + + +# AudienceSegmentBulkUpdateInputV1 + +Input to update one or more segments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceSegmentUpdateEntityV1Resource>**](AudienceSegmentUpdateEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentComputeSizeEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentComputeSizeEntityV1Resource.md new file mode 100644 index 00000000..0b8e1997 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentComputeSizeEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# AudienceSegmentComputeSizeEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | **Object** | Set of rules that defines specific people to target. | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentComputeSizesInputV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentComputeSizesInputV1.md new file mode 100644 index 00000000..a327d5e2 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentComputeSizesInputV1.md @@ -0,0 +1,14 @@ + + +# AudienceSegmentComputeSizesInputV1 + +Input to retrieve the size of one or more segments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceSegmentComputeSizeEntityV1Resource>**](AudienceSegmentComputeSizeEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentCreateEntityV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentCreateEntityV1.md new file mode 100644 index 00000000..e8884ed6 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentCreateEntityV1.md @@ -0,0 +1,22 @@ + + +# AudienceSegmentCreateEntityV1 + +Set of rules that defines specific people to target. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the segment | | +|**description** | **String** | Description of the segment | [optional] | +|**advertiserId** | **String** | Advertiser associated to the segment | | +|**inMarket** | [**InMarketCreateV1**](InMarketCreateV1.md) | | [optional] | +|**prospecting** | [**ProspectingCreateV1**](ProspectingCreateV1.md) | | [optional] | +|**contactList** | **Object** | Settings to target users with your contact lists. | [optional] | +|**location** | [**LocationCreateV1**](LocationCreateV1.md) | | [optional] | +|**retargeting** | [**RetargetingCreateV1**](RetargetingCreateV1.md) | | [optional] | +|**lookalike** | [**LookalikeCreateV1**](LookalikeCreateV1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentCreateEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentCreateEntityV1Resource.md new file mode 100644 index 00000000..9de801fa --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentCreateEntityV1Resource.md @@ -0,0 +1,15 @@ + + +# AudienceSegmentCreateEntityV1Resource + +A top-level object that encapsulates a Criteo API response for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**AudienceSegmentCreateEntityV1**](AudienceSegmentCreateEntityV1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentDeleteEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentDeleteEntityV1Resource.md new file mode 100644 index 00000000..91ef2c5d --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentDeleteEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# AudienceSegmentDeleteEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | **Object** | Segment to delete | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1.md new file mode 100644 index 00000000..1ebc5c8b --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1.md @@ -0,0 +1,41 @@ + + +# AudienceSegmentEntityV1 + +Set of rules that defines specific people to target. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the segment | [optional] | +|**description** | **String** | Description of the segment | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of segment (read-only) | [optional] | +|**createdAt** | **OffsetDateTime** | ISO-8601 timestamp in UTC of segment creation (read-only) | [optional] | +|**updatedAt** | **OffsetDateTime** | ISO-8601 timestamp in UTC of segment update (read-only) | [optional] | +|**advertiserId** | **String** | Advertiser associated to the segment | [optional] | +|**inMarket** | [**InMarketV1**](InMarketV1.md) | | [optional] | +|**prospecting** | [**ProspectingV1**](ProspectingV1.md) | | [optional] | +|**contactList** | [**ContactListV1**](ContactListV1.md) | | [optional] | +|**location** | [**LocationV1**](LocationV1.md) | | [optional] | +|**behavioral** | [**BehavioralV1**](BehavioralV1.md) | | [optional] | +|**retargeting** | [**RetargetingV1**](RetargetingV1.md) | | [optional] | +|**lookalike** | [**LookalikeV1**](LookalikeV1.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "Unknown" | +| INMARKET | "InMarket" | +| PROSPECTING | "Prospecting" | +| CONTACTLIST | "ContactList" | +| LOCATION | "Location" | +| BEHAVIORAL | "Behavioral" | +| RETARGETING | "Retargeting" | +| LOOKALIKE | "Lookalike" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.md new file mode 100644 index 00000000..6b3aa219 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.md @@ -0,0 +1,17 @@ + + +# AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse + +A top-level object that encapsulates a Criteo API response for several entities and metadata + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**meta** | [**AudienceSegmentSearchMetadataV1**](AudienceSegmentSearchMetadataV1.md) | | [optional] | +|**data** | [**List<AudienceSegmentEntityV1Resource>**](AudienceSegmentEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1ListResponse.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1ListResponse.md new file mode 100644 index 00000000..c61f4ded --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1ListResponse.md @@ -0,0 +1,16 @@ + + +# AudienceSegmentEntityV1ListResponse + +A top-level object that encapsulates a Criteo API response for several entities + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceSegmentEntityV1Resource>**](AudienceSegmentEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1Resource.md new file mode 100644 index 00000000..ad653dd1 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# AudienceSegmentEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**AudienceSegmentEntityV1**](AudienceSegmentEntityV1.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEstimateSizeInputV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEstimateSizeInputV1.md new file mode 100644 index 00000000..9b6a4df6 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentEstimateSizeInputV1.md @@ -0,0 +1,14 @@ + + +# AudienceSegmentEstimateSizeInputV1 + +Input to estimate the size of an audience segment.. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**AudienceSegmentSizeEstimationEntityV1Resource**](AudienceSegmentSizeEstimationEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentIdEntityV1ListResponse.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentIdEntityV1ListResponse.md new file mode 100644 index 00000000..d1626b4c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentIdEntityV1ListResponse.md @@ -0,0 +1,16 @@ + + +# AudienceSegmentIdEntityV1ListResponse + +A top-level object that encapsulates a Criteo API response for several entities + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceSegmentIdEntityV1Resource>**](AudienceSegmentIdEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentIdEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentIdEntityV1Resource.md new file mode 100644 index 00000000..d09508da --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentIdEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# AudienceSegmentIdEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | **Object** | Audience Segment entity only with its ID | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchEntityV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchEntityV1.md new file mode 100644 index 00000000..2a1239bf --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchEntityV1.md @@ -0,0 +1,31 @@ + + +# AudienceSegmentSearchEntityV1 + +Available filters to perform a search on audience segments. If present, the filters are AND'ed together when applied. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**audienceSegmentIds** | **List<String>** | List of segment ids | [optional] | +|**advertiserIds** | **List<String>** | List of advertiser ids | [optional] | +|**audienceSegmentTypes** | [**List<AudienceSegmentTypesEnum>**](#List<AudienceSegmentTypesEnum>) | List of segment types | [optional] | + + + +## Enum: List<AudienceSegmentTypesEnum> + +| Name | Value | +|---- | -----| +| UNKNOWN | "Unknown" | +| INMARKET | "InMarket" | +| PROSPECTING | "Prospecting" | +| CONTACTLIST | "ContactList" | +| LOCATION | "Location" | +| BEHAVIORAL | "Behavioral" | +| RETARGETING | "Retargeting" | +| LOOKALIKE | "Lookalike" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchEntityV1Resource.md new file mode 100644 index 00000000..d1ebf687 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchEntityV1Resource.md @@ -0,0 +1,15 @@ + + +# AudienceSegmentSearchEntityV1Resource + +A top-level object that encapsulates a Criteo API response for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**AudienceSegmentSearchEntityV1**](AudienceSegmentSearchEntityV1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchInputV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchInputV1.md new file mode 100644 index 00000000..b5d189ac --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchInputV1.md @@ -0,0 +1,14 @@ + + +# AudienceSegmentSearchInputV1 + +Audience segment search parameter + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**AudienceSegmentSearchEntityV1Resource**](AudienceSegmentSearchEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchMetadataV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchMetadataV1.md new file mode 100644 index 00000000..3fdaa4ff --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSearchMetadataV1.md @@ -0,0 +1,16 @@ + + +# AudienceSegmentSearchMetadataV1 + +Metadata for the audience segment search response. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**totalItems** | **Integer** | Total number of items | [optional] | +|**limit** | **Integer** | Max item of the current page | [optional] | +|**offset** | **Integer** | Number of item to skip | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEntityV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEntityV1.md new file mode 100644 index 00000000..7389e137 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEntityV1.md @@ -0,0 +1,14 @@ + + +# AudienceSegmentSizeEntityV1 + +Set of rules that defines specific people to target. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**size** | **Long** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEntityV1ListResponse.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEntityV1ListResponse.md new file mode 100644 index 00000000..55d28f8b --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEntityV1ListResponse.md @@ -0,0 +1,16 @@ + + +# AudienceSegmentSizeEntityV1ListResponse + +A top-level object that encapsulates a Criteo API response for several entities + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceSegmentSizeEntityV1Resource>**](AudienceSegmentSizeEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEntityV1Resource.md new file mode 100644 index 00000000..2f27ac34 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# AudienceSegmentSizeEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**AudienceSegmentSizeEntityV1**](AudienceSegmentSizeEntityV1.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationEntityV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationEntityV1.md new file mode 100644 index 00000000..80fc1326 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationEntityV1.md @@ -0,0 +1,16 @@ + + +# AudienceSegmentSizeEstimationEntityV1 + +Set of rules that defines specific people to target. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**advertiserId** | **String** | Advertiser associated to the segment | | +|**inMarket** | [**InMarketSizeEstimationV1**](InMarketSizeEstimationV1.md) | | [optional] | +|**location** | [**LocationSizeEstimationV1**](LocationSizeEstimationV1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationEntityV1Resource.md new file mode 100644 index 00000000..fa9bf628 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationEntityV1Resource.md @@ -0,0 +1,15 @@ + + +# AudienceSegmentSizeEstimationEntityV1Resource + +A top-level object that encapsulates a Criteo API response for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**AudienceSegmentSizeEstimationEntityV1**](AudienceSegmentSizeEstimationEntityV1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationV1.md new file mode 100644 index 00000000..a3dd0e06 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationV1.md @@ -0,0 +1,14 @@ + + +# AudienceSegmentSizeEstimationV1 + +Segment size estimation + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**size** | **Long** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationV1Resource.md new file mode 100644 index 00000000..d31463aa --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationV1Resource.md @@ -0,0 +1,15 @@ + + +# AudienceSegmentSizeEstimationV1Resource + +A top-level object that encapsulates a Criteo API response for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**AudienceSegmentSizeEstimationV1**](AudienceSegmentSizeEstimationV1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationV1Response.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationV1Response.md new file mode 100644 index 00000000..e6c22851 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentSizeEstimationV1Response.md @@ -0,0 +1,16 @@ + + +# AudienceSegmentSizeEstimationV1Response + +A top-level object that encapsulates a Criteo API response for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**AudienceSegmentSizeEstimationV1Resource**](AudienceSegmentSizeEstimationV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentUpdateEntityV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentUpdateEntityV1.md new file mode 100644 index 00000000..45fa5d55 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentUpdateEntityV1.md @@ -0,0 +1,20 @@ + + +# AudienceSegmentUpdateEntityV1 + +Set of rules that defines specific people to target. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the segment | [optional] | +|**description** | [**NillableString**](NillableString.md) | | [optional] | +|**inMarket** | [**InMarketUpdateV1**](InMarketUpdateV1.md) | | [optional] | +|**location** | [**LocationUpdateV1**](LocationUpdateV1.md) | | [optional] | +|**retargeting** | [**RetargetingUpdateV1**](RetargetingUpdateV1.md) | | [optional] | +|**lookalike** | [**LookalikeUpdateV1**](LookalikeUpdateV1.md) | | [optional] | +|**prospecting** | [**ProspectingUpdateV1**](ProspectingUpdateV1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSegmentUpdateEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentUpdateEntityV1Resource.md new file mode 100644 index 00000000..06c7ae0e --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSegmentUpdateEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# AudienceSegmentUpdateEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**AudienceSegmentUpdateEntityV1**](AudienceSegmentUpdateEntityV1.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSizeEntityV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSizeEntityV1.md new file mode 100644 index 00000000..621a10a6 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSizeEntityV1.md @@ -0,0 +1,14 @@ + + +# AudienceSizeEntityV1 + +Audience entity only with its size + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**size** | **Long** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSizeEntityV1ListResponse.md b/sdks/marketingsolutions_2024-07/docs/AudienceSizeEntityV1ListResponse.md new file mode 100644 index 00000000..ec22b334 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSizeEntityV1ListResponse.md @@ -0,0 +1,16 @@ + + +# AudienceSizeEntityV1ListResponse + +A top-level object that encapsulates a Criteo API response for several entities + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<AudienceSizeEntityV1Resource>**](AudienceSizeEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSizeEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceSizeEntityV1Resource.md new file mode 100644 index 00000000..ca67118e --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSizeEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# AudienceSizeEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**AudienceSizeEntityV1**](AudienceSizeEntityV1.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSizeEstimationV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceSizeEstimationV1.md new file mode 100644 index 00000000..5ed0e97d --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSizeEstimationV1.md @@ -0,0 +1,14 @@ + + +# AudienceSizeEstimationV1 + +Audience size estimation + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**size** | **Long** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSizeEstimationV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceSizeEstimationV1Resource.md new file mode 100644 index 00000000..968989c2 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSizeEstimationV1Resource.md @@ -0,0 +1,15 @@ + + +# AudienceSizeEstimationV1Resource + +A top-level object that encapsulates a Criteo API response for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**AudienceSizeEstimationV1**](AudienceSizeEstimationV1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceSizeEstimationV1Response.md b/sdks/marketingsolutions_2024-07/docs/AudienceSizeEstimationV1Response.md new file mode 100644 index 00000000..82ca8cc2 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceSizeEstimationV1Response.md @@ -0,0 +1,16 @@ + + +# AudienceSizeEstimationV1Response + +A top-level object that encapsulates a Criteo API response for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**AudienceSizeEstimationV1Resource**](AudienceSizeEstimationV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceUpdateEntityV1.md b/sdks/marketingsolutions_2024-07/docs/AudienceUpdateEntityV1.md new file mode 100644 index 00000000..a82920ca --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceUpdateEntityV1.md @@ -0,0 +1,16 @@ + + +# AudienceUpdateEntityV1 + +Audience of people of interest for a marketer. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the audience | [optional] | +|**description** | [**NillableString**](NillableString.md) | | [optional] | +|**algebra** | [**AlgebraNodeV1**](AlgebraNodeV1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/AudienceUpdateEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/AudienceUpdateEntityV1Resource.md new file mode 100644 index 00000000..10654141 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/AudienceUpdateEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# AudienceUpdateEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**AudienceUpdateEntityV1**](AudienceUpdateEntityV1.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/AudienceWarning.md b/sdks/marketingsolutions_2024-07/docs/AudienceWarning.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/AudienceWarning.md rename to sdks/marketingsolutions_2024-07/docs/AudienceWarning.md diff --git a/sdks/marketingsolutions_2023-04/docs/BasicAudienceDefinition.md b/sdks/marketingsolutions_2024-07/docs/BasicAudienceDefinition.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/BasicAudienceDefinition.md rename to sdks/marketingsolutions_2024-07/docs/BasicAudienceDefinition.md diff --git a/sdks/marketingsolutions_2024-07/docs/BehavioralV1.md b/sdks/marketingsolutions_2024-07/docs/BehavioralV1.md new file mode 100644 index 00000000..eba66a18 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/BehavioralV1.md @@ -0,0 +1,29 @@ + + +# BehavioralV1 + +Settings of a behavioral set of users provided by Criteo. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**country** | **String** | The users' country | [optional] | +|**category** | [**CategoryEnum**](#CategoryEnum) | The type of behavioral | | +|**startDate** | **OffsetDateTime** | Desired date when the behavioral will start | [optional] | +|**endDate** | **OffsetDateTime** | Desired date when the behavioral will end | [optional] | + + + +## Enum: CategoryEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "Unknown" | +| LIFESTYLES | "Lifestyles" | +| LIFEEVENTS | "LifeEvents" | +| SEASONAL | "Seasonal" | +| BUYINGPATTERNS | "BuyingPatterns" | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/CampaignApi.md b/sdks/marketingsolutions_2024-07/docs/CampaignApi.md similarity index 64% rename from sdks/marketingsolutions_2023-04/docs/CampaignApi.md rename to sdks/marketingsolutions_2024-07/docs/CampaignApi.md index 354da244..387d4fac 100644 --- a/sdks/marketingsolutions_2023-04/docs/CampaignApi.md +++ b/sdks/marketingsolutions_2024-07/docs/CampaignApi.md @@ -4,24 +4,209 @@ All URIs are relative to *https://api.criteo.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getAdSet**](CampaignApi.md#getAdSet) | **GET** /2023-04/marketing-solutions/ad-sets/{adSetId} | | -| [**getCampaign**](CampaignApi.md#getCampaign) | **GET** /2023-04/marketing-solutions/campaigns/{campaign-id} | | -| [**getCategoryBidList**](CampaignApi.md#getCategoryBidList) | **GET** /2023-04/marketing-solutions/ad-sets/{ad-set-id}/category-bids | | -| [**getDisplayMultipliers**](CampaignApi.md#getDisplayMultipliers) | **GET** /2023-04/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers | | -| [**patchAdSets**](CampaignApi.md#patchAdSets) | **PATCH** /2023-04/marketing-solutions/ad-sets | | -| [**patchCampaigns**](CampaignApi.md#patchCampaigns) | **PATCH** /2023-04/marketing-solutions/campaigns | | -| [**patchCategoryBidList**](CampaignApi.md#patchCategoryBidList) | **PATCH** /2023-04/marketing-solutions/ad-sets/{ad-set-id}/category-bids | | -| [**patchDisplayMultipliers**](CampaignApi.md#patchDisplayMultipliers) | **PATCH** /2023-04/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers | | -| [**searchAdSets**](CampaignApi.md#searchAdSets) | **POST** /2023-04/marketing-solutions/ad-sets/search | | -| [**searchCampaigns**](CampaignApi.md#searchCampaigns) | **POST** /2023-04/marketing-solutions/campaigns/search | | -| [**startAdSets**](CampaignApi.md#startAdSets) | **POST** /2023-04/marketing-solutions/ad-sets/start | | -| [**stopAdSets**](CampaignApi.md#stopAdSets) | **POST** /2023-04/marketing-solutions/ad-sets/stop | | +| [**createAdSetV24Q1**](CampaignApi.md#createAdSetV24Q1) | **POST** /2024-07/marketing-solutions/ad-sets | | +| [**createCampaign**](CampaignApi.md#createCampaign) | **POST** /2024-07/marketing-solutions/campaigns | | +| [**getAdSetV24Q1**](CampaignApi.md#getAdSetV24Q1) | **GET** /2024-07/marketing-solutions/ad-sets/{ad-set-id} | | +| [**getCampaignV23Q1**](CampaignApi.md#getCampaignV23Q1) | **GET** /2024-07/marketing-solutions/campaigns/{campaign-id} | | +| [**getCategoryBidList**](CampaignApi.md#getCategoryBidList) | **GET** /2024-07/marketing-solutions/ad-sets/{ad-set-id}/category-bids | | +| [**getDisplayMultipliers**](CampaignApi.md#getDisplayMultipliers) | **GET** /2024-07/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers | | +| [**patchAdSetsV24Q1**](CampaignApi.md#patchAdSetsV24Q1) | **PATCH** /2024-07/marketing-solutions/ad-sets | | +| [**patchCampaigns**](CampaignApi.md#patchCampaigns) | **PATCH** /2024-07/marketing-solutions/campaigns | | +| [**patchCategoryBidList**](CampaignApi.md#patchCategoryBidList) | **PATCH** /2024-07/marketing-solutions/ad-sets/{ad-set-id}/category-bids | | +| [**patchDisplayMultipliers**](CampaignApi.md#patchDisplayMultipliers) | **PATCH** /2024-07/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers | | +| [**searchAdSetsV24Q1**](CampaignApi.md#searchAdSetsV24Q1) | **POST** /2024-07/marketing-solutions/ad-sets/search | | +| [**searchCampaignsV23Q1**](CampaignApi.md#searchCampaignsV23Q1) | **POST** /2024-07/marketing-solutions/campaigns/search | | +| [**startAdSets**](CampaignApi.md#startAdSets) | **POST** /2024-07/marketing-solutions/ad-sets/start | | +| [**stopAdSets**](CampaignApi.md#stopAdSets) | **POST** /2024-07/marketing-solutions/ad-sets/stop | | +| [**updateAdSetAudience**](CampaignApi.md#updateAdSetAudience) | **PUT** /2024-07/marketing-solutions/ad-sets/{ad-set-id}/audience | | -## getAdSet +## createAdSetV24Q1 -> ResponseReadAdSet getAdSet(adSetId) +> ResponseReadAdSetV24Q1 createAdSetV24Q1(createAdSetV24Q1Request) + + + +Create the specified ad set + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CampaignApi apiInstance = new CampaignApi(defaultClient); + CreateAdSetV24Q1Request createAdSetV24Q1Request = new CreateAdSetV24Q1Request(); // CreateAdSetV24Q1Request | the ad sets to create + try { + ResponseReadAdSetV24Q1 result = apiInstance.createAdSetV24Q1(createAdSetV24Q1Request); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CampaignApi#createAdSetV24Q1"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createAdSetV24Q1Request** | [**CreateAdSetV24Q1Request**](CreateAdSetV24Q1Request.md)| the ad sets to create | | + +### Return type + +[**ResponseReadAdSetV24Q1**](ResponseReadAdSetV24Q1.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The ad set that has been created and errors / warnings | - | +| **400** | Bad Request | - | +| **401** | The API client is not properly authenticated. | - | + + +## createCampaign + +> CampaignV23Q1Response createCampaign(createCampaignRequest) + + + +Create the specified campaign + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CampaignApi apiInstance = new CampaignApi(defaultClient); + CreateCampaignRequest createCampaignRequest = new CreateCampaignRequest(); // CreateCampaignRequest | the campaigns to create + try { + CampaignV23Q1Response result = apiInstance.createCampaign(createCampaignRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CampaignApi#createCampaign"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **createCampaignRequest** | [**CreateCampaignRequest**](CreateCampaignRequest.md)| the campaigns to create | | + +### Return type + +[**CampaignV23Q1Response**](CampaignV23Q1Response.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The campaign that has been created and errors / warnings | - | +| **400** | Bad Request | - | +| **401** | The API client is not properly authenticated. | - | + + +## getAdSetV24Q1 + +> ResponseReadAdSetV24Q1 getAdSetV24Q1(adSetId) @@ -30,15 +215,15 @@ Get the data for the specified ad set ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.CampaignApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -68,10 +253,10 @@ public class Example { CampaignApi apiInstance = new CampaignApi(defaultClient); String adSetId = "adSetId_example"; // String | Id of the ad set try { - ResponseReadAdSet result = apiInstance.getAdSet(adSetId); + ResponseReadAdSetV24Q1 result = apiInstance.getAdSetV24Q1(adSetId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getAdSet"); + System.err.println("Exception when calling CampaignApi#getAdSetV24Q1"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -90,7 +275,7 @@ public class Example { ### Return type -[**ResponseReadAdSet**](ResponseReadAdSet.md) +[**ResponseReadAdSetV24Q1**](ResponseReadAdSetV24Q1.md) ### Authorization @@ -110,9 +295,9 @@ public class Example { | **403** | The API client is not authorized to access this resource or the resource does not exist. | - | -## getCampaign +## getCampaignV23Q1 -> CampaignResponse getCampaign(campaignId) +> CampaignV23Q1Response getCampaignV23Q1(campaignId) @@ -121,15 +306,15 @@ Get the data for the specified campaign ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.CampaignApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -159,10 +344,10 @@ public class Example { CampaignApi apiInstance = new CampaignApi(defaultClient); String campaignId = "campaignId_example"; // String | Id of the campaign try { - CampaignResponse result = apiInstance.getCampaign(campaignId); + CampaignV23Q1Response result = apiInstance.getCampaignV23Q1(campaignId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getCampaign"); + System.err.println("Exception when calling CampaignApi#getCampaignV23Q1"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -181,7 +366,7 @@ public class Example { ### Return type -[**CampaignResponse**](CampaignResponse.md) +[**CampaignV23Q1Response**](CampaignV23Q1Response.md) ### Authorization @@ -212,15 +397,15 @@ Get the Category Bids for all valid Categories associated to an Ad Set ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.CampaignApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -304,15 +489,15 @@ Get the Display Multipliers for all valid Categories associated to an Ad Set ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.CampaignApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -385,9 +570,9 @@ public class Example { | **403** | The API client is not authorized to access this resource or the resource does not exist. | - | -## patchAdSets +## patchAdSetsV24Q1 -> ResponsesAdSetId patchAdSets(requestsPatchAdSet) +> ResponsesAdSetIdV24Q1 patchAdSetsV24Q1(requestsPatchAdSetV24Q1) @@ -396,15 +581,15 @@ Patch a list of AdSets. ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.CampaignApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -432,12 +617,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - RequestsPatchAdSet requestsPatchAdSet = new RequestsPatchAdSet(); // RequestsPatchAdSet | List of adsets to patch. + RequestsPatchAdSetV24Q1 requestsPatchAdSetV24Q1 = new RequestsPatchAdSetV24Q1(); // RequestsPatchAdSetV24Q1 | List of adsets to patch. try { - ResponsesAdSetId result = apiInstance.patchAdSets(requestsPatchAdSet); + ResponsesAdSetIdV24Q1 result = apiInstance.patchAdSetsV24Q1(requestsPatchAdSetV24Q1); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#patchAdSets"); + System.err.println("Exception when calling CampaignApi#patchAdSetsV24Q1"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -452,11 +637,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **requestsPatchAdSet** | [**RequestsPatchAdSet**](RequestsPatchAdSet.md)| List of adsets to patch. | [optional] | +| **requestsPatchAdSetV24Q1** | [**RequestsPatchAdSetV24Q1**](RequestsPatchAdSetV24Q1.md)| List of adsets to patch. | [optional] | ### Return type -[**ResponsesAdSetId**](ResponsesAdSetId.md) +[**ResponsesAdSetIdV24Q1**](ResponsesAdSetIdV24Q1.md) ### Authorization @@ -487,15 +672,15 @@ Patch a list of Campaigns. ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.CampaignApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -578,15 +763,15 @@ Patch Category Bids for one or more Categories in a single request. Partial succ ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.CampaignApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -672,15 +857,15 @@ Patch Display Multipliers for one or more Categories in a single request. Partia ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.CampaignApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -755,9 +940,9 @@ public class Example { | **403** | The API client is not authorized to access this resource or the resource does not exist. | - | -## searchAdSets +## searchAdSetsV24Q1 -> ResponsesReadAdSet searchAdSets(requestAdSetSearch) +> ResponsesReadAdSetV24Q1 searchAdSetsV24Q1(adSetSearchRequestV24Q1) @@ -766,15 +951,15 @@ Search for ad sets ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.CampaignApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -802,12 +987,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - RequestAdSetSearch requestAdSetSearch = new RequestAdSetSearch(); // RequestAdSetSearch | + AdSetSearchRequestV24Q1 adSetSearchRequestV24Q1 = new AdSetSearchRequestV24Q1(); // AdSetSearchRequestV24Q1 | try { - ResponsesReadAdSet result = apiInstance.searchAdSets(requestAdSetSearch); + ResponsesReadAdSetV24Q1 result = apiInstance.searchAdSetsV24Q1(adSetSearchRequestV24Q1); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#searchAdSets"); + System.err.println("Exception when calling CampaignApi#searchAdSetsV24Q1"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -822,11 +1007,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **requestAdSetSearch** | [**RequestAdSetSearch**](RequestAdSetSearch.md)| | [optional] | +| **adSetSearchRequestV24Q1** | [**AdSetSearchRequestV24Q1**](AdSetSearchRequestV24Q1.md)| | [optional] | ### Return type -[**ResponsesReadAdSet**](ResponsesReadAdSet.md) +[**ResponsesReadAdSetV24Q1**](ResponsesReadAdSetV24Q1.md) ### Authorization @@ -843,13 +1028,13 @@ public class Example { |-------------|-------------|------------------| | **200** | data for the ad sets | - | | **400** | Bad Request | - | -| **403** | Forbidden | - | +| **403** | The API client is not authorized to access this resource or the resource does not exist. | - | | **401** | The API client is not properly authenticated. | - | -## searchCampaigns +## searchCampaignsV23Q1 -> CampaignListResponse searchCampaigns(campaignSearchRequest) +> CampaignV23Q1ListResponse searchCampaignsV23Q1(campaignSearchRequestV23Q1) @@ -858,15 +1043,15 @@ Search for campaigns ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.CampaignApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -894,12 +1079,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - CampaignSearchRequest campaignSearchRequest = new CampaignSearchRequest(); // CampaignSearchRequest | filters on campaigns + CampaignSearchRequestV23Q1 campaignSearchRequestV23Q1 = new CampaignSearchRequestV23Q1(); // CampaignSearchRequestV23Q1 | filters on campaigns try { - CampaignListResponse result = apiInstance.searchCampaigns(campaignSearchRequest); + CampaignV23Q1ListResponse result = apiInstance.searchCampaignsV23Q1(campaignSearchRequestV23Q1); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#searchCampaigns"); + System.err.println("Exception when calling CampaignApi#searchCampaignsV23Q1"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -914,11 +1099,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **campaignSearchRequest** | [**CampaignSearchRequest**](CampaignSearchRequest.md)| filters on campaigns | [optional] | +| **campaignSearchRequestV23Q1** | [**CampaignSearchRequestV23Q1**](CampaignSearchRequestV23Q1.md)| filters on campaigns | [optional] | ### Return type -[**CampaignListResponse**](CampaignListResponse.md) +[**CampaignV23Q1ListResponse**](CampaignV23Q1ListResponse.md) ### Authorization @@ -950,15 +1135,15 @@ Start the specified list of ad sets ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.CampaignApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -1041,15 +1226,15 @@ Stop the specified list of ad sets ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.CampaignApi; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -1120,3 +1305,97 @@ public class Example { | **400** | Bad Request | - | | **401** | The API client is not properly authenticated. | - | + +## updateAdSetAudience + +> AdSetAudienceLinkEntityV1Response updateAdSetAudience(adSetId, adSetAudienceLinkInputEntityV1) + + + +Link or unlink an audience with an ad set + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CampaignApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CampaignApi apiInstance = new CampaignApi(defaultClient); + String adSetId = "adSetId_example"; // String | The ad set ID. + AdSetAudienceLinkInputEntityV1 adSetAudienceLinkInputEntityV1 = new AdSetAudienceLinkInputEntityV1(); // AdSetAudienceLinkInputEntityV1 | Ad set-Audience update request. + try { + AdSetAudienceLinkEntityV1Response result = apiInstance.updateAdSetAudience(adSetId, adSetAudienceLinkInputEntityV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CampaignApi#updateAdSetAudience"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **adSetId** | **String**| The ad set ID. | | +| **adSetAudienceLinkInputEntityV1** | [**AdSetAudienceLinkInputEntityV1**](AdSetAudienceLinkInputEntityV1.md)| Ad set-Audience update request. | | + +### Return type + +[**AdSetAudienceLinkEntityV1Response**](AdSetAudienceLinkEntityV1Response.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + diff --git a/sdks/marketingsolutions_2023-04/docs/CampaignSearchFilters.md b/sdks/marketingsolutions_2024-07/docs/CampaignSearchFiltersV23Q1.md similarity index 90% rename from sdks/marketingsolutions_2023-04/docs/CampaignSearchFilters.md rename to sdks/marketingsolutions_2024-07/docs/CampaignSearchFiltersV23Q1.md index c3aeaf44..d61aa592 100644 --- a/sdks/marketingsolutions_2023-04/docs/CampaignSearchFilters.md +++ b/sdks/marketingsolutions_2024-07/docs/CampaignSearchFiltersV23Q1.md @@ -1,6 +1,6 @@ -# CampaignSearchFilters +# CampaignSearchFiltersV23Q1 filters on campaign diff --git a/sdks/marketingsolutions_2023-04/docs/CampaignSearchRequest.md b/sdks/marketingsolutions_2024-07/docs/CampaignSearchRequestV23Q1.md similarity index 56% rename from sdks/marketingsolutions_2023-04/docs/CampaignSearchRequest.md rename to sdks/marketingsolutions_2024-07/docs/CampaignSearchRequestV23Q1.md index 9fb345c5..d72c2d8c 100644 --- a/sdks/marketingsolutions_2023-04/docs/CampaignSearchRequest.md +++ b/sdks/marketingsolutions_2024-07/docs/CampaignSearchRequestV23Q1.md @@ -1,6 +1,6 @@ -# CampaignSearchRequest +# CampaignSearchRequestV23Q1 request payload of the search endpoint @@ -8,7 +8,7 @@ request payload of the search endpoint | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**filters** | [**CampaignSearchFilters**](CampaignSearchFilters.md) | | [optional] | +|**filters** | [**CampaignSearchFiltersV23Q1**](CampaignSearchFiltersV23Q1.md) | | [optional] | diff --git a/sdks/marketingsolutions_2023-04/docs/CampaignSpendLimit.md b/sdks/marketingsolutions_2024-07/docs/CampaignSpendLimitV23Q1.md similarity index 96% rename from sdks/marketingsolutions_2023-04/docs/CampaignSpendLimit.md rename to sdks/marketingsolutions_2024-07/docs/CampaignSpendLimitV23Q1.md index 0a756ba9..1d92a8e8 100644 --- a/sdks/marketingsolutions_2023-04/docs/CampaignSpendLimit.md +++ b/sdks/marketingsolutions_2024-07/docs/CampaignSpendLimitV23Q1.md @@ -1,6 +1,6 @@ -# CampaignSpendLimit +# CampaignSpendLimitV23Q1 campaign spend limit model diff --git a/sdks/marketingsolutions_2023-04/docs/Campaign.md b/sdks/marketingsolutions_2024-07/docs/CampaignV23Q1.md similarity index 56% rename from sdks/marketingsolutions_2023-04/docs/Campaign.md rename to sdks/marketingsolutions_2024-07/docs/CampaignV23Q1.md index 2fcc3341..99bf57ec 100644 --- a/sdks/marketingsolutions_2023-04/docs/Campaign.md +++ b/sdks/marketingsolutions_2024-07/docs/CampaignV23Q1.md @@ -1,6 +1,6 @@ -# Campaign +# CampaignV23Q1 campaign read model @@ -10,8 +10,7 @@ campaign read model |------------ | ------------- | ------------- | -------------| |**name** | **String** | | [optional] | |**advertiserId** | **String** | | [optional] | -|**objective** | **String** | | [optional] | -|**spendLimit** | [**CampaignSpendLimit**](CampaignSpendLimit.md) | | [optional] | +|**spendLimit** | [**CampaignSpendLimitV23Q1**](CampaignSpendLimitV23Q1.md) | | [optional] | |**goal** | [**GoalEnum**](#GoalEnum) | | [optional] | @@ -20,9 +19,9 @@ campaign read model | Name | Value | |---- | -----| -| UNSPECIFIED | "Unspecified" | -| ACQUISITION | "Acquisition" | -| RETENTION | "Retention" | +| UNSPECIFIED | "unspecified" | +| ACQUISITION | "acquisition" | +| RETENTION | "retention" | diff --git a/sdks/marketingsolutions_2024-07/docs/CampaignV23Q1ListResponse.md b/sdks/marketingsolutions_2024-07/docs/CampaignV23Q1ListResponse.md new file mode 100644 index 00000000..6f552a01 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CampaignV23Q1ListResponse.md @@ -0,0 +1,16 @@ + + +# CampaignV23Q1ListResponse + +Data model for a list of response resources + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<CampaignV23Q1Resource>**](CampaignV23Q1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/retailmedia_2023-04/docs/ResourceOfBalance202110.md b/sdks/marketingsolutions_2024-07/docs/CampaignV23Q1Resource.md similarity index 59% rename from sdks/retailmedia_2023-04/docs/ResourceOfBalance202110.md rename to sdks/marketingsolutions_2024-07/docs/CampaignV23Q1Resource.md index 40dd7cd6..18da4559 100644 --- a/sdks/retailmedia_2023-04/docs/ResourceOfBalance202110.md +++ b/sdks/marketingsolutions_2024-07/docs/CampaignV23Q1Resource.md @@ -1,16 +1,16 @@ -# ResourceOfBalance202110 +# CampaignV23Q1Resource -A class that represents an entity in a guild compliant way +Data model for a Resource ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**attributes** | [**CampaignV23Q1**](CampaignV23Q1.md) | | [optional] | |**id** | **String** | Id of the entity | [optional] | |**type** | **String** | Canonical type name of the entity | [optional] | -|**attributes** | [**ExternalBalance202110**](ExternalBalance202110.md) | | [optional] | diff --git a/sdks/marketingsolutions_2024-07/docs/CampaignV23Q1Response.md b/sdks/marketingsolutions_2024-07/docs/CampaignV23Q1Response.md new file mode 100644 index 00000000..486065fc --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CampaignV23Q1Response.md @@ -0,0 +1,16 @@ + + +# CampaignV23Q1Response + +Data model for response resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**CampaignV23Q1Resource**](CampaignV23Q1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/retailmedia_2023-04/docs/CommonProblem.md b/sdks/marketingsolutions_2024-07/docs/CommonProblem.md similarity index 89% rename from sdks/retailmedia_2023-04/docs/CommonProblem.md rename to sdks/marketingsolutions_2024-07/docs/CommonProblem.md index 1ee7a1f1..3f7f164b 100644 --- a/sdks/retailmedia_2023-04/docs/CommonProblem.md +++ b/sdks/marketingsolutions_2024-07/docs/CommonProblem.md @@ -2,7 +2,7 @@ # CommonProblem -Common problem object. Can be specialized as needed. +Common problem object. ## Properties @@ -11,7 +11,7 @@ Common problem object. Can be specialized as needed. |**traceId** | **String** | The request correlation ID this problem comes from. | [optional] | |**traceIdentifier** | **String** | The request correlation ID this problem comes from. (deprecated, use traceId instead) | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The problem's category. | [optional] | -|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | +|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | |**instance** | **String** | A URI that identifies the specific occurrence of the problem. | [optional] | |**title** | **String** | A short human-readable description of the problem type | [optional] | |**detail** | **String** | A human-readable explanation specific to this occurrence of the problem | [optional] | diff --git a/sdks/marketingsolutions_2024-07/docs/ContactListStatisticsEntityV1.md b/sdks/marketingsolutions_2024-07/docs/ContactListStatisticsEntityV1.md new file mode 100644 index 00000000..fbe058cc --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ContactListStatisticsEntityV1.md @@ -0,0 +1,16 @@ + + +# ContactListStatisticsEntityV1 + +Contact list statistics. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**numberOfIdentifiers** | **Integer** | Number of identifiers in the contact list. | [optional] | +|**numberOfMatches** | **Integer** | Number of matched identifiers in the contact list. | [optional] | +|**matchRate** | **Double** | Percentage of matched identifiers in the contact list. Can differ from matches/identifiers depending on the contact list type. | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/ContactListStatisticsEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/ContactListStatisticsEntityV1Resource.md new file mode 100644 index 00000000..79e8aa01 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ContactListStatisticsEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# ContactListStatisticsEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**ContactListStatisticsEntityV1**](ContactListStatisticsEntityV1.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/ContactListStatisticsEntityV1Response.md b/sdks/marketingsolutions_2024-07/docs/ContactListStatisticsEntityV1Response.md new file mode 100644 index 00000000..41ed31cf --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ContactListStatisticsEntityV1Response.md @@ -0,0 +1,16 @@ + + +# ContactListStatisticsEntityV1Response + +A top-level object that encapsulates a Criteo API response for a single entity + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ContactListStatisticsEntityV1Resource**](ContactListStatisticsEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/ContactListV1.md b/sdks/marketingsolutions_2024-07/docs/ContactListV1.md new file mode 100644 index 00000000..20ea17cd --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ContactListV1.md @@ -0,0 +1,14 @@ + + +# ContactListV1 + +Settings to target users with your contact lists. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isReadOnly** | **Boolean** | Is the segment read-only | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/ContactlistAmendment.md b/sdks/marketingsolutions_2024-07/docs/ContactlistAmendment.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/ContactlistAmendment.md rename to sdks/marketingsolutions_2024-07/docs/ContactlistAmendment.md diff --git a/sdks/marketingsolutions_2023-04/docs/ContactlistAmendmentAttributes.md b/sdks/marketingsolutions_2024-07/docs/ContactlistAmendmentAttributes.md similarity index 95% rename from sdks/marketingsolutions_2023-04/docs/ContactlistAmendmentAttributes.md rename to sdks/marketingsolutions_2024-07/docs/ContactlistAmendmentAttributes.md index 2315fdd4..f0a2c263 100644 --- a/sdks/marketingsolutions_2023-04/docs/ContactlistAmendmentAttributes.md +++ b/sdks/marketingsolutions_2024-07/docs/ContactlistAmendmentAttributes.md @@ -33,6 +33,7 @@ the name of the entity type | IDENTITYLINK | "identityLink" | | GUM | "gum" | | CUSTOMERID | "customerid" | +| PHONENUMBER | "phoneNumber" | diff --git a/sdks/marketingsolutions_2023-04/docs/ContactlistAmendmentRequest.md b/sdks/marketingsolutions_2024-07/docs/ContactlistAmendmentRequest.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/ContactlistAmendmentRequest.md rename to sdks/marketingsolutions_2024-07/docs/ContactlistAmendmentRequest.md diff --git a/sdks/marketingsolutions_2023-04/docs/ContactlistOperation.md b/sdks/marketingsolutions_2024-07/docs/ContactlistOperation.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/ContactlistOperation.md rename to sdks/marketingsolutions_2024-07/docs/ContactlistOperation.md diff --git a/sdks/marketingsolutions_2023-04/docs/ContactlistOperationAttributes.md b/sdks/marketingsolutions_2024-07/docs/ContactlistOperationAttributes.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/ContactlistOperationAttributes.md rename to sdks/marketingsolutions_2024-07/docs/ContactlistOperationAttributes.md diff --git a/sdks/marketingsolutions_2024-07/docs/Coupon.md b/sdks/marketingsolutions_2024-07/docs/Coupon.md new file mode 100644 index 00000000..69fcfc03 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/Coupon.md @@ -0,0 +1,27 @@ + + +# Coupon + +Coupons are static images applied on ad set which can be displayed within an ad and link to a landing page. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the Coupon | [optional] | +|**description** | **String** | The description of the Coupon | [optional] | +|**author** | **String** | The login of the person who created this Coupon | [optional] | +|**advertiserId** | **String** | Advertiser linked to the Coupon | [optional] | +|**adSetId** | **String** | The id of the Ad Set on which the Coupon is applied to | [optional] | +|**landingPageUrl** | **String** | Web redirection of the landing page url | [optional] | +|**startDate** | **String** | The date when the Coupon will be launched String must be in ISO8601 format | [optional] | +|**endDate** | **String** | The date when when we will stop to show this Coupon. If the end date is not specified (i.e. null) then the Coupon will go on forever String must be in ISO8601 format | [optional] | +|**format** | **String** | Format of the Coupon, it can have two values: \"FullFrame\" or \"LogoZone\" | [optional] | +|**status** | **String** | The status of the Coupon | [optional] | +|**images** | [**List<ImageSlide>**](ImageSlide.md) | List of slides containing the image URLs | [optional] | +|**showEvery** | **Integer** | Show the Coupon every N seconds (between 1 and 10) | [optional] | +|**showDuration** | **Integer** | Show Coupon for a duration of N seconds (between 1 and 5) | [optional] | +|**rotationsNumber** | **Integer** | Number of rotations for the Coupons (from 1 to 10 times) | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CouponListResponse.md b/sdks/marketingsolutions_2024-07/docs/CouponListResponse.md new file mode 100644 index 00000000..d0d8ee81 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CouponListResponse.md @@ -0,0 +1,16 @@ + + +# CouponListResponse + +Data model for a list of response resources + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<CouponResource>**](CouponResource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CouponResource.md b/sdks/marketingsolutions_2024-07/docs/CouponResource.md new file mode 100644 index 00000000..b8559ee5 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CouponResource.md @@ -0,0 +1,16 @@ + + +# CouponResource + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**Coupon**](Coupon.md) | | [optional] | +|**id** | **String** | | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CouponResponse.md b/sdks/marketingsolutions_2024-07/docs/CouponResponse.md new file mode 100644 index 00000000..00111cfa --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CouponResponse.md @@ -0,0 +1,16 @@ + + +# CouponResponse + +Data model for response resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**CouponResource**](CouponResource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CouponSupportedSizes.md b/sdks/marketingsolutions_2024-07/docs/CouponSupportedSizes.md new file mode 100644 index 00000000..bc05498f --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CouponSupportedSizes.md @@ -0,0 +1,15 @@ + + +# CouponSupportedSizes + +Entity containing the list of Coupon supported sizes + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**logoZone** | **List<String>** | Array of LogoZone sizes as string in width x height format | [optional] | +|**fullFrame** | **List<String>** | Array of FullFrame sizes as string in width x height format | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CouponSupportedSizesResource.md b/sdks/marketingsolutions_2024-07/docs/CouponSupportedSizesResource.md new file mode 100644 index 00000000..94c1aebf --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CouponSupportedSizesResource.md @@ -0,0 +1,16 @@ + + +# CouponSupportedSizesResource + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**CouponSupportedSizes**](CouponSupportedSizes.md) | | [optional] | +|**id** | **String** | | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CouponSupportedSizesResponse.md b/sdks/marketingsolutions_2024-07/docs/CouponSupportedSizesResponse.md new file mode 100644 index 00000000..ad069c1f --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CouponSupportedSizesResponse.md @@ -0,0 +1,16 @@ + + +# CouponSupportedSizesResponse + +Data model for response resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**CouponSupportedSizesResource**](CouponSupportedSizesResource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateAdSetBiddingV24Q1.md b/sdks/marketingsolutions_2024-07/docs/CreateAdSetBiddingV24Q1.md new file mode 100644 index 00000000..9798ea5a --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateAdSetBiddingV24Q1.md @@ -0,0 +1,31 @@ + + +# CreateAdSetBiddingV24Q1 + +ad set bidding create model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bidAmount** | **Double** | Decimal value target relating to the `bidStrategy` specified. May be `null` for strategies that do not require a target value. At most 4 decimals are supported. Additional decimals are rounded. | [optional] | +|**costController** | [**CostControllerEnum**](#CostControllerEnum) | How spend is controlled | | + + + +## Enum: CostControllerEnum + +| Name | Value | +|---- | -----| +| COS | "COS" | +| CPC | "CPC" | +| CPI | "CPI" | +| CPM | "CPM" | +| CPO | "CPO" | +| CPSV | "CPSV" | +| CPV | "CPV" | +| DAILYBUDGET | "dailyBudget" | +| TARGETCPM | "targetCPM" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateAdSetBudgetV24Q1.md b/sdks/marketingsolutions_2024-07/docs/CreateAdSetBudgetV24Q1.md new file mode 100644 index 00000000..dab8c49f --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateAdSetBudgetV24Q1.md @@ -0,0 +1,63 @@ + + +# CreateAdSetBudgetV24Q1 + +ad set budget create model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**budgetStrategy** | [**BudgetStrategyEnum**](#BudgetStrategyEnum) | | | +|**budgetRenewal** | [**BudgetRenewalEnum**](#BudgetRenewalEnum) | | [optional] | +|**budgetDeliverySmoothing** | [**BudgetDeliverySmoothingEnum**](#BudgetDeliverySmoothingEnum) | | [optional] | +|**budgetDeliveryWeek** | [**BudgetDeliveryWeekEnum**](#BudgetDeliveryWeekEnum) | | [optional] | +|**budgetAmount** | **Double** | | [optional] | + + + +## Enum: BudgetStrategyEnum + +| Name | Value | +|---- | -----| +| CAPPED | "capped" | +| UNCAPPED | "uncapped" | + + + +## Enum: BudgetRenewalEnum + +| Name | Value | +|---- | -----| +| UNDEFINED | "undefined" | +| DAILY | "daily" | +| MONTHLY | "monthly" | +| LIFETIME | "lifetime" | +| WEEKLY | "weekly" | + + + +## Enum: BudgetDeliverySmoothingEnum + +| Name | Value | +|---- | -----| +| ACCELERATED | "accelerated" | +| STANDARD | "standard" | + + + +## Enum: BudgetDeliveryWeekEnum + +| Name | Value | +|---- | -----| +| UNDEFINED | "undefined" | +| MONDAYTOSUNDAY | "mondayToSunday" | +| TUESDAYTOMONDAY | "tuesdayToMonday" | +| WEDNESDAYTOTUESDAY | "wednesdayToTuesday" | +| THURSDAYTOWEDNESDAY | "thursdayToWednesday" | +| FRIDAYTOTHURSDAY | "fridayToThursday" | +| SATURDAYTOFRIDAY | "saturdayToFriday" | +| SUNDAYTOSATURDAY | "sundayToSaturday" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateAdSetGeoLocationV24Q1.md b/sdks/marketingsolutions_2024-07/docs/CreateAdSetGeoLocationV24Q1.md new file mode 100644 index 00000000..2bbc8e09 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateAdSetGeoLocationV24Q1.md @@ -0,0 +1,16 @@ + + +# CreateAdSetGeoLocationV24Q1 + +Geolocation configuration of the ad set + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**countries** | [**AdSetTargetingRuleV24Q1**](AdSetTargetingRuleV24Q1.md) | | [optional] | +|**subdivisions** | [**AdSetTargetingRuleV24Q1**](AdSetTargetingRuleV24Q1.md) | | [optional] | +|**zipCodes** | [**AdSetTargetingRuleV24Q1**](AdSetTargetingRuleV24Q1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateAdSetScheduleV24Q1.md b/sdks/marketingsolutions_2024-07/docs/CreateAdSetScheduleV24Q1.md new file mode 100644 index 00000000..196fc611 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateAdSetScheduleV24Q1.md @@ -0,0 +1,15 @@ + + +# CreateAdSetScheduleV24Q1 + +ad set schedule create model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startDate** | **OffsetDateTime** | | | +|**endDate** | **OffsetDateTime** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateAdSetTargetingV24Q1.md b/sdks/marketingsolutions_2024-07/docs/CreateAdSetTargetingV24Q1.md new file mode 100644 index 00000000..0af2da28 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateAdSetTargetingV24Q1.md @@ -0,0 +1,16 @@ + + +# CreateAdSetTargetingV24Q1 + +Targeting configuration of the ad set + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**deliveryLimitations** | [**AdSetDeliveryLimitationsV24Q1**](AdSetDeliveryLimitationsV24Q1.md) | | [optional] | +|**geoLocation** | [**CreateAdSetGeoLocationV24Q1**](CreateAdSetGeoLocationV24Q1.md) | | [optional] | +|**frequencyCapping** | [**AdSetFrequencyCappingV24Q1**](AdSetFrequencyCappingV24Q1.md) | | | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateAdSetV24Q1.md b/sdks/marketingsolutions_2024-07/docs/CreateAdSetV24Q1.md new file mode 100644 index 00000000..de5a8cd9 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateAdSetV24Q1.md @@ -0,0 +1,50 @@ + + +# CreateAdSetV24Q1 + +ad set create model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the ad set | | +|**datasetId** | **String** | Dataset id of this ad set | | +|**campaignId** | **String** | Campaign id this ad set belongs to | | +|**objective** | [**ObjectiveEnum**](#ObjectiveEnum) | Objective of the ad set | | +|**schedule** | [**CreateAdSetScheduleV24Q1**](CreateAdSetScheduleV24Q1.md) | | | +|**bidding** | [**CreateAdSetBiddingV24Q1**](CreateAdSetBiddingV24Q1.md) | | | +|**targeting** | [**CreateAdSetTargetingV24Q1**](CreateAdSetTargetingV24Q1.md) | | | +|**budget** | [**CreateAdSetBudgetV24Q1**](CreateAdSetBudgetV24Q1.md) | | | +|**trackingCode** | **String** | The click tracking code associated to this Ad Set. | | +|**mediaType** | [**MediaTypeEnum**](#MediaTypeEnum) | Media type for the ad set | | + + + +## Enum: ObjectiveEnum + +| Name | Value | +|---- | -----| +| CUSTOMACTION | "customAction" | +| CLICKS | "clicks" | +| CONVERSIONS | "conversions" | +| DISPLAYS | "displays" | +| APPPROMOTION | "appPromotion" | +| REVENUE | "revenue" | +| STORECONVERSIONS | "storeConversions" | +| VALUE | "value" | +| REACH | "reach" | +| VISITS | "visits" | +| VIDEOVIEWS | "videoViews" | + + + +## Enum: MediaTypeEnum + +| Name | Value | +|---- | -----| +| DISPLAY | "display" | +| VIDEO | "video" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateAdSetV24Q1Request.md b/sdks/marketingsolutions_2024-07/docs/CreateAdSetV24Q1Request.md new file mode 100644 index 00000000..240155e2 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateAdSetV24Q1Request.md @@ -0,0 +1,14 @@ + + +# CreateAdSetV24Q1Request + +Data model for an input resources + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**CreateAdSetV24Q1Resource**](CreateAdSetV24Q1Resource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateAdSetV24Q1Resource.md b/sdks/marketingsolutions_2024-07/docs/CreateAdSetV24Q1Resource.md new file mode 100644 index 00000000..5e8f0190 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateAdSetV24Q1Resource.md @@ -0,0 +1,15 @@ + + +# CreateAdSetV24Q1Resource + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**CreateAdSetV24Q1**](CreateAdSetV24Q1.md) | | [optional] | +|**type** | **String** | Canonical type name of the entity | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateCampaign.md b/sdks/marketingsolutions_2024-07/docs/CreateCampaign.md new file mode 100644 index 00000000..80d183b6 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateCampaign.md @@ -0,0 +1,27 @@ + + +# CreateCampaign + +Campaign create model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the campaign | | +|**advertiserId** | **String** | Advertiser id this campaign belongs to | | +|**goal** | [**GoalEnum**](#GoalEnum) | Goal for the marketing campaign | | +|**spendLimit** | [**CreateCampaignSpendLimit**](CreateCampaignSpendLimit.md) | | | + + + +## Enum: GoalEnum + +| Name | Value | +|---- | -----| +| UNSPECIFIED | "Unspecified" | +| ACQUISITION | "Acquisition" | +| RETENTION | "Retention" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateCampaignRequest.md b/sdks/marketingsolutions_2024-07/docs/CreateCampaignRequest.md new file mode 100644 index 00000000..ecabb486 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateCampaignRequest.md @@ -0,0 +1,14 @@ + + +# CreateCampaignRequest + +Data model for an input resources + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**CreateCampaignResource**](CreateCampaignResource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateCampaignResource.md b/sdks/marketingsolutions_2024-07/docs/CreateCampaignResource.md new file mode 100644 index 00000000..5cd17f0f --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateCampaignResource.md @@ -0,0 +1,15 @@ + + +# CreateCampaignResource + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**CreateCampaign**](CreateCampaign.md) | | [optional] | +|**type** | **String** | Canonical type name of the entity | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateCampaignSpendLimit.md b/sdks/marketingsolutions_2024-07/docs/CreateCampaignSpendLimit.md new file mode 100644 index 00000000..6b6ce6f4 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateCampaignSpendLimit.md @@ -0,0 +1,36 @@ + + +# CreateCampaignSpendLimit + +campaign spend limit create model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**spendLimitType** | [**SpendLimitTypeEnum**](#SpendLimitTypeEnum) | Whether your spend limit is capped or not | | +|**spendLimitRenewal** | [**SpendLimitRenewalEnum**](#SpendLimitRenewalEnum) | The pace of the spend limit renewal | [optional] | +|**spendLimitAmount** | **Double** | The amount of the spend limit. null if spendLimitType is uncapped. | [optional] | + + + +## Enum: SpendLimitTypeEnum + +| Name | Value | +|---- | -----| +| CAPPED | "capped" | +| UNCAPPED | "uncapped" | + + + +## Enum: SpendLimitRenewalEnum + +| Name | Value | +|---- | -----| +| UNDEFINED | "undefined" | +| DAILY | "daily" | +| MONTHLY | "monthly" | +| LIFETIME | "lifetime" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateCoupon.md b/sdks/marketingsolutions_2024-07/docs/CreateCoupon.md new file mode 100644 index 00000000..a780123f --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateCoupon.md @@ -0,0 +1,33 @@ + + +# CreateCoupon + +Entity to create a Coupon + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the Coupon | | +|**description** | **String** | The description of the Coupon | [optional] | +|**adSetId** | **String** | The id of the Ad Set on which the Coupon is applied to | | +|**landingPageUrl** | **String** | Web redirection of the landing page url | | +|**startDate** | **String** | The date when the coupon will be launched String must be in ISO8601 format | | +|**endDate** | **String** | The date when when we will stop to show this Coupon. If the end date is not specified (i.e. null) then the Coupon will go on forever String must be in ISO8601 format | [optional] | +|**format** | [**FormatEnum**](#FormatEnum) | Format of the Coupon, it can have two values: \"FullFrame\" or \"LogoZone\" | | +|**images** | [**List<CreateImageSlide>**](CreateImageSlide.md) | List of slides containing the images as a base-64 encoded string | | +|**showEvery** | **Integer** | Show the Coupon every N seconds (between 1 and 10) | | +|**showDuration** | **Integer** | Show Coupon for a duration of N seconds (between 1 and 5) | | +|**rotationsNumber** | **Integer** | Number of rotations for the Coupons (from 1 to 10 times) | | + + + +## Enum: FormatEnum + +| Name | Value | +|---- | -----| +| FULLFRAME | "FullFrame" | +| LOGOZONE | "LogoZone" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateCouponRequest.md b/sdks/marketingsolutions_2024-07/docs/CreateCouponRequest.md new file mode 100644 index 00000000..134af3a6 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateCouponRequest.md @@ -0,0 +1,14 @@ + + +# CreateCouponRequest + +Data model for input resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**CreateCouponResource**](CreateCouponResource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateCouponResource.md b/sdks/marketingsolutions_2024-07/docs/CreateCouponResource.md new file mode 100644 index 00000000..c2237c1e --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateCouponResource.md @@ -0,0 +1,16 @@ + + +# CreateCouponResource + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**CreateCoupon**](CreateCoupon.md) | | [optional] | +|**id** | **String** | | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreateImageSlide.md b/sdks/marketingsolutions_2024-07/docs/CreateImageSlide.md new file mode 100644 index 00000000..6670256e --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreateImageSlide.md @@ -0,0 +1,16 @@ + + +# CreateImageSlide + +Slide containing the images of the same size as a base-64 encoded string + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**width** | **Integer** | Width of the Coupon slide | [optional] | +|**height** | **Integer** | Height of the Coupon slide | [optional] | +|**slideBase64Strings** | **List<String>** | Array of images of the same size as a base-64 encoded string | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/Creative.md b/sdks/marketingsolutions_2024-07/docs/Creative.md new file mode 100644 index 00000000..5274c253 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/Creative.md @@ -0,0 +1,24 @@ + + +# Creative + +A creative is a project with the necessary information to display a creative + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the creative | | +|**description** | **String** | The description of the creative | [optional] | +|**author** | **String** | The login of the person who created this creative ( | | +|**status** | **String** | The status of the creative | | +|**format** | **String** | The format of the creative | [optional] | +|**advertiserId** | **String** | Advertiser linked to the Creative | | +|**datasetId** | **String** | Data set id linked to the Creative | [optional] | +|**imageAttributes** | [**ImageAttributes**](ImageAttributes.md) | | [optional] | +|**htmlTagAttributes** | [**HtmlTagAttributes**](HtmlTagAttributes.md) | | [optional] | +|**dynamicAttributes** | [**DynamicAttributes**](DynamicAttributes.md) | | [optional] | +|**adaptiveAttributes** | [**AdaptiveAttributes**](AdaptiveAttributes.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreativeApi.md b/sdks/marketingsolutions_2024-07/docs/CreativeApi.md new file mode 100644 index 00000000..6a93cc14 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreativeApi.md @@ -0,0 +1,1617 @@ +# CreativeApi + +All URIs are relative to *https://api.criteo.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createAdvertiserAd**](CreativeApi.md#createAdvertiserAd) | **POST** /2024-07/marketing-solutions/advertisers/{advertiser-id}/ads | | +| [**createAdvertiserCoupon**](CreativeApi.md#createAdvertiserCoupon) | **POST** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons | | +| [**createAdvertiserCreative**](CreativeApi.md#createAdvertiserCreative) | **POST** /2024-07/marketing-solutions/advertisers/{advertiser-id}/creatives | | +| [**deleteAd**](CreativeApi.md#deleteAd) | **DELETE** /2024-07/marketing-solutions/ads/{id} | | +| [**deleteAdvertiserCoupon**](CreativeApi.md#deleteAdvertiserCoupon) | **DELETE** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id} | | +| [**deleteCreative**](CreativeApi.md#deleteCreative) | **DELETE** /2024-07/marketing-solutions/creatives/{id} | | +| [**editAdvertiserCoupon**](CreativeApi.md#editAdvertiserCoupon) | **PUT** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id} | | +| [**editCreative**](CreativeApi.md#editCreative) | **PUT** /2024-07/marketing-solutions/creatives/{id} | | +| [**generateCreativePreview**](CreativeApi.md#generateCreativePreview) | **POST** /2024-07/marketing-solutions/creatives/{id}/preview | | +| [**getAd**](CreativeApi.md#getAd) | **GET** /2024-07/marketing-solutions/ads/{id} | | +| [**getAdvertiserAds**](CreativeApi.md#getAdvertiserAds) | **GET** /2024-07/marketing-solutions/advertisers/{advertiser-id}/ads | | +| [**getAdvertiserCoupon**](CreativeApi.md#getAdvertiserCoupon) | **GET** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id} | | +| [**getAdvertiserCouponPreview**](CreativeApi.md#getAdvertiserCouponPreview) | **GET** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id}/preview | | +| [**getAdvertiserCouponSupportedSizes**](CreativeApi.md#getAdvertiserCouponSupportedSizes) | **GET** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons-supported-sizes | | +| [**getAdvertiserCoupons**](CreativeApi.md#getAdvertiserCoupons) | **GET** /2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons | | +| [**getAdvertiserCreatives**](CreativeApi.md#getAdvertiserCreatives) | **GET** /2024-07/marketing-solutions/advertisers/{advertiser-id}/creatives | | +| [**getCreative**](CreativeApi.md#getCreative) | **GET** /2024-07/marketing-solutions/creatives/{id} | | + + + +## createAdvertiserAd + +> AdResponse createAdvertiserAd(advertiserId, adWriteRequest) + + + +Create an Ad + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String advertiserId = "advertiserId_example"; // String | The advertiser identifier. + AdWriteRequest adWriteRequest = new AdWriteRequest(); // AdWriteRequest | + try { + AdResponse result = apiInstance.createAdvertiserAd(advertiserId, adWriteRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#createAdvertiserAd"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **advertiserId** | **String**| The advertiser identifier. | | +| **adWriteRequest** | [**AdWriteRequest**](AdWriteRequest.md)| | | + +### Return type + +[**AdResponse**](AdResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The created Ad is returned. | - | +| **400** | The request contained invalid parameters. | - | +| **401** | The request was not properly authorized. | - | +| **500** | A non-request based error occurred on the server. | - | + + +## createAdvertiserCoupon + +> CouponResponse createAdvertiserCoupon(advertiserId, createCouponRequest) + + + +Create a Coupon + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String advertiserId = "advertiserId_example"; // String | The advertiser identifier. + CreateCouponRequest createCouponRequest = new CreateCouponRequest(); // CreateCouponRequest | + try { + CouponResponse result = apiInstance.createAdvertiserCoupon(advertiserId, createCouponRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#createAdvertiserCoupon"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **advertiserId** | **String**| The advertiser identifier. | | +| **createCouponRequest** | [**CreateCouponRequest**](CreateCouponRequest.md)| | | + +### Return type + +[**CouponResponse**](CouponResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The created Coupon is returned. | - | +| **400** | The request contained invalid parameters. | - | +| **403** | The request was not properly authorized. | - | + + +## createAdvertiserCreative + +> CreativeResponse createAdvertiserCreative(advertiserId, creativeWriteRequest) + + + +Create a Creative + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String advertiserId = "advertiserId_example"; // String | The advertiser identifier. + CreativeWriteRequest creativeWriteRequest = new CreativeWriteRequest(); // CreativeWriteRequest | + try { + CreativeResponse result = apiInstance.createAdvertiserCreative(advertiserId, creativeWriteRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#createAdvertiserCreative"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **advertiserId** | **String**| The advertiser identifier. | | +| **creativeWriteRequest** | [**CreativeWriteRequest**](CreativeWriteRequest.md)| | | + +### Return type + +[**CreativeResponse**](CreativeResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The created creative is returned. | - | +| **400** | The request contained invalid parameters. | - | +| **401** | The request was not properly authorized. | - | +| **500** | A non-request based error occurred on the server. | - | + + +## deleteAd + +> deleteAd(id) + + + +Delete an Ad + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + Integer id = 56; // Integer | The ad identifier to delete. + try { + apiInstance.deleteAd(id); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#deleteAd"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The ad identifier to delete. | | + +### Return type + +null (empty response body) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | The ad was deleted. | - | +| **400** | The request contained invalid parameters. | - | +| **401** | The request was not properly authorized. | - | +| **500** | A non-request based error occurred on the server. | - | + + +## deleteAdvertiserCoupon + +> deleteAdvertiserCoupon(advertiserId, id) + + + +Delete a Coupon + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String advertiserId = "advertiserId_example"; // String | The advertiser identifier. + String id = "id_example"; // String | The Coupon identifier to delete. + try { + apiInstance.deleteAdvertiserCoupon(advertiserId, id); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#deleteAdvertiserCoupon"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **advertiserId** | **String**| The advertiser identifier. | | +| **id** | **String**| The Coupon identifier to delete. | | + +### Return type + +null (empty response body) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | The Coupon was deleted. | - | +| **400** | The request contained invalid parameters. | - | +| **403** | The request was not properly authorized. | - | + + +## deleteCreative + +> deleteCreative(id) + + + +Delete a Creative if there are no ads binded to it + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String id = "id_example"; // String | The creative identifier to delete. + try { + apiInstance.deleteCreative(id); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#deleteCreative"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The creative identifier to delete. | | + +### Return type + +null (empty response body) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | The creative was deleted. | - | +| **400** | The request contained invalid parameters. | - | +| **401** | The request was not properly authorized. | - | +| **500** | A non-request based error occurred on the server. | - | + + +## editAdvertiserCoupon + +> CouponResponse editAdvertiserCoupon(advertiserId, id, updateCouponRequest) + + + +Edit a specific Coupon + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String advertiserId = "advertiserId_example"; // String | The advertiser identifier. + String id = "id_example"; // String | The Coupon identifier to edit. + UpdateCouponRequest updateCouponRequest = new UpdateCouponRequest(); // UpdateCouponRequest | + try { + CouponResponse result = apiInstance.editAdvertiserCoupon(advertiserId, id, updateCouponRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#editAdvertiserCoupon"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **advertiserId** | **String**| The advertiser identifier. | | +| **id** | **String**| The Coupon identifier to edit. | | +| **updateCouponRequest** | [**UpdateCouponRequest**](UpdateCouponRequest.md)| | | + +### Return type + +[**CouponResponse**](CouponResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The edited Coupon is returned. | - | +| **400** | The request contained invalid parameters. | - | + + +## editCreative + +> CreativeResponse editCreative(id, creativeWriteRequest) + + + +Edit a specific Creative + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String id = "id_example"; // String | The creative identifier to edit. + CreativeWriteRequest creativeWriteRequest = new CreativeWriteRequest(); // CreativeWriteRequest | + try { + CreativeResponse result = apiInstance.editCreative(id, creativeWriteRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#editCreative"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The creative identifier to edit. | | +| **creativeWriteRequest** | [**CreativeWriteRequest**](CreativeWriteRequest.md)| | | + +### Return type + +[**CreativeResponse**](CreativeResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The edited creative is returned. | - | +| **400** | The request contained invalid parameters. | - | +| **401** | The request was not properly authorized. | - | +| **500** | A non-request based error occurred on the server. | - | + + +## generateCreativePreview + +> String generateCreativePreview(id, width, height) + + + +Generate a preview of a specific Creative + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String id = "id_example"; // String | The Creative identifier to preview. + Integer width = 56; // Integer | The width of the Creative to preview. + Integer height = 56; // Integer | The height of the Creative to preview. + try { + String result = apiInstance.generateCreativePreview(id, width, height); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#generateCreativePreview"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The Creative identifier to preview. | | +| **width** | **Integer**| The width of the Creative to preview. | [optional] | +| **height** | **Integer**| The height of the Creative to preview. | [optional] | + +### Return type + +**String** + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/html, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The preview HTML of a specific Creative is returned. | - | +| **400** | The request contained invalid parameters. | - | +| **403** | The request was not properly authorized. | - | + + +## getAd + +> AdResponse getAd(id) + + + +Get an Ad from its id + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + Integer id = 56; // Integer | The ad identifier to retrieve. + try { + AdResponse result = apiInstance.getAd(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#getAd"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The ad identifier to retrieve. | | + +### Return type + +[**AdResponse**](AdResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The found ad is returned. | - | +| **400** | The request contained invalid parameters. | - | +| **401** | The request was not properly authorized. | - | +| **500** | A non-request based error occurred on the server. | - | + + +## getAdvertiserAds + +> AdListResponse getAdvertiserAds(advertiserId, limit, offset) + + + +Get the list of self-services Ads for a given advertiser + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String advertiserId = "advertiserId_example"; // String | The advertiser identifier. + Integer limit = 56; // Integer | The number of ads to be returned. The default is 50. + Integer offset = 56; // Integer | The (zero-based) offset into the collection of ads. The default is 0. + try { + AdListResponse result = apiInstance.getAdvertiserAds(advertiserId, limit, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#getAdvertiserAds"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **advertiserId** | **String**| The advertiser identifier. | | +| **limit** | **Integer**| The number of ads to be returned. The default is 50. | [optional] | +| **offset** | **Integer**| The (zero-based) offset into the collection of ads. The default is 0. | [optional] | + +### Return type + +[**AdListResponse**](AdListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The list of self-services Ads is returned. | - | +| **400** | The request contained invalid parameters. | - | +| **401** | The request was not properly authorized. | - | +| **500** | A non-request based error occurred on the server. | - | + + +## getAdvertiserCoupon + +> CouponResponse getAdvertiserCoupon(advertiserId, id) + + + +Get a Coupon from its id + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String advertiserId = "advertiserId_example"; // String | The advertiser identifier. + String id = "id_example"; // String | The Coupon identifier to retrieve. + try { + CouponResponse result = apiInstance.getAdvertiserCoupon(advertiserId, id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#getAdvertiserCoupon"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **advertiserId** | **String**| The advertiser identifier. | | +| **id** | **String**| The Coupon identifier to retrieve. | | + +### Return type + +[**CouponResponse**](CouponResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The found Coupon is returned. | - | +| **400** | The request contained invalid parameters. | - | +| **403** | The request was not properly authorized. | - | + + +## getAdvertiserCouponPreview + +> String getAdvertiserCouponPreview(advertiserId, id, width, height) + + + +Get the preview of a specific Coupon + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String advertiserId = "advertiserId_example"; // String | The advertiser identifier. + String id = "id_example"; // String | The Coupon identifier to preview. + Integer width = 56; // Integer | The width of the coupon to preview. + Integer height = 56; // Integer | The height of the coupon to preview. + try { + String result = apiInstance.getAdvertiserCouponPreview(advertiserId, id, width, height); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#getAdvertiserCouponPreview"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **advertiserId** | **String**| The advertiser identifier. | | +| **id** | **String**| The Coupon identifier to preview. | | +| **width** | **Integer**| The width of the coupon to preview. | [optional] | +| **height** | **Integer**| The height of the coupon to preview. | [optional] | + +### Return type + +**String** + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/html, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The preview HTML of a specific Coupon is returned. | - | +| **400** | The request contained invalid parameters. | - | +| **403** | The request was not properly authorized. | - | + + +## getAdvertiserCouponSupportedSizes + +> CouponSupportedSizesResponse getAdvertiserCouponSupportedSizes(advertiserId, adSetId) + + + +Get the list of Coupon supported sizes + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String advertiserId = "advertiserId_example"; // String | The advertiser identifier. + String adSetId = "adSetId_example"; // String | The ad set id on which you want to check the Coupon supported sizes. + try { + CouponSupportedSizesResponse result = apiInstance.getAdvertiserCouponSupportedSizes(advertiserId, adSetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#getAdvertiserCouponSupportedSizes"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **advertiserId** | **String**| The advertiser identifier. | | +| **adSetId** | **String**| The ad set id on which you want to check the Coupon supported sizes. | [optional] | + +### Return type + +[**CouponSupportedSizesResponse**](CouponSupportedSizesResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The list of Coupon supported sizes is returned. | - | +| **400** | The request contained invalid parameters. | - | +| **403** | The request was not properly authorized. | - | + + +## getAdvertiserCoupons + +> CouponListResponse getAdvertiserCoupons(advertiserId, limit, offset) + + + +Get the list of self-services Coupons for a given advertiser + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String advertiserId = "advertiserId_example"; // String | The advertiser identifier. + Integer limit = 56; // Integer | The number of coupons to be returned. The default is 50. + Integer offset = 56; // Integer | The (zero-based) offset into the collection of coupons. The default is 0. + try { + CouponListResponse result = apiInstance.getAdvertiserCoupons(advertiserId, limit, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#getAdvertiserCoupons"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **advertiserId** | **String**| The advertiser identifier. | | +| **limit** | **Integer**| The number of coupons to be returned. The default is 50. | [optional] | +| **offset** | **Integer**| The (zero-based) offset into the collection of coupons. The default is 0. | [optional] | + +### Return type + +[**CouponListResponse**](CouponListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The list of self-services Coupons is returned. | - | +| **400** | The request contained invalid parameters. | - | +| **403** | The request was not properly authorized. | - | + + +## getAdvertiserCreatives + +> CreativeListResponse getAdvertiserCreatives(advertiserId, limit, offset) + + + +Get the list of self-services Creatives for a given advertiser + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String advertiserId = "advertiserId_example"; // String | The advertiser identifier. + Integer limit = 56; // Integer | The number of creatives to be returned. The default is 50. + Integer offset = 56; // Integer | The (zero-based) offset into the collection of creatives. The default is 0. + try { + CreativeListResponse result = apiInstance.getAdvertiserCreatives(advertiserId, limit, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#getAdvertiserCreatives"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **advertiserId** | **String**| The advertiser identifier. | | +| **limit** | **Integer**| The number of creatives to be returned. The default is 50. | [optional] | +| **offset** | **Integer**| The (zero-based) offset into the collection of creatives. The default is 0. | [optional] | + +### Return type + +[**CreativeListResponse**](CreativeListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The list of self-services Creatives is returned. | - | +| **400** | The request contained invalid parameters. | - | +| **401** | The request was not properly authorized. | - | +| **500** | A non-request based error occurred on the server. | - | + + +## getCreative + +> CreativeResponse getCreative(id) + + + +Get a Creative from its id + +### Example + +```java +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.CreativeApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CreativeApi apiInstance = new CreativeApi(defaultClient); + String id = "id_example"; // String | The creative identifier to retrieve. + try { + CreativeResponse result = apiInstance.getCreative(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreativeApi#getCreative"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The creative identifier to retrieve. | | + +### Return type + +[**CreativeResponse**](CreativeResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The found creative is returned. | - | +| **400** | The request contained invalid parameters. | - | +| **401** | The request was not properly authorized. | - | +| **500** | A non-request based error occurred on the server. | - | + diff --git a/sdks/marketingsolutions_2024-07/docs/CreativeListResponse.md b/sdks/marketingsolutions_2024-07/docs/CreativeListResponse.md new file mode 100644 index 00000000..ec0ba69c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreativeListResponse.md @@ -0,0 +1,16 @@ + + +# CreativeListResponse + +Data model for a list of response resources + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<CreativeResource>**](CreativeResource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreativeResource.md b/sdks/marketingsolutions_2024-07/docs/CreativeResource.md new file mode 100644 index 00000000..52cb34fe --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreativeResource.md @@ -0,0 +1,16 @@ + + +# CreativeResource + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**Creative**](Creative.md) | | [optional] | +|**id** | **String** | | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreativeResponse.md b/sdks/marketingsolutions_2024-07/docs/CreativeResponse.md new file mode 100644 index 00000000..fe90dbb5 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreativeResponse.md @@ -0,0 +1,16 @@ + + +# CreativeResponse + +Data model for response resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**CreativeResource**](CreativeResource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreativeWrite.md b/sdks/marketingsolutions_2024-07/docs/CreativeWrite.md new file mode 100644 index 00000000..7be0d830 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreativeWrite.md @@ -0,0 +1,32 @@ + + +# CreativeWrite + +Entity to create or update a creative + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the creative | | +|**description** | **String** | The description of the creative | [optional] | +|**format** | [**FormatEnum**](#FormatEnum) | The format of the creative You can use \"Image\", \" HtmlTag\", \"Dynamic\" or \"Adaptive\" | | +|**datasetId** | **String** | Dataset linked to the Creative | | +|**imageWriteAttributes** | [**ImageWriteAttributes**](ImageWriteAttributes.md) | | [optional] | +|**htmlTagWriteAttributes** | [**HtmlTagWriteAttributes**](HtmlTagWriteAttributes.md) | | [optional] | +|**dynamicWriteAttributes** | [**DynamicWriteAttributes**](DynamicWriteAttributes.md) | | [optional] | +|**adaptiveWriteAttributes** | [**AdaptiveWriteAttributes**](AdaptiveWriteAttributes.md) | | [optional] | + + + +## Enum: FormatEnum + +| Name | Value | +|---- | -----| +| IMAGE | "Image" | +| HTMLTAG | "HtmlTag" | +| DYNAMIC | "Dynamic" | +| ADAPTIVE | "Adaptive" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreativeWriteRequest.md b/sdks/marketingsolutions_2024-07/docs/CreativeWriteRequest.md new file mode 100644 index 00000000..a5b4e8aa --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreativeWriteRequest.md @@ -0,0 +1,14 @@ + + +# CreativeWriteRequest + +Data model for input resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**CreativeWriteResource**](CreativeWriteResource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/CreativeWriteResource.md b/sdks/marketingsolutions_2024-07/docs/CreativeWriteResource.md new file mode 100644 index 00000000..f0c43153 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/CreativeWriteResource.md @@ -0,0 +1,16 @@ + + +# CreativeWriteResource + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**CreativeWrite**](CreativeWrite.md) | | [optional] | +|**id** | **String** | | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/CriteoApiError.md b/sdks/marketingsolutions_2024-07/docs/CriteoApiError.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/CriteoApiError.md rename to sdks/marketingsolutions_2024-07/docs/CriteoApiError.md diff --git a/sdks/marketingsolutions_2023-04/docs/CriteoApiWarning.md b/sdks/marketingsolutions_2024-07/docs/CriteoApiWarning.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/CriteoApiWarning.md rename to sdks/marketingsolutions_2024-07/docs/CriteoApiWarning.md diff --git a/sdks/marketingsolutions_2023-04/docs/DeleteAudienceContactListResponse.md b/sdks/marketingsolutions_2024-07/docs/DeleteAudienceContactListResponse.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/DeleteAudienceContactListResponse.md rename to sdks/marketingsolutions_2024-07/docs/DeleteAudienceContactListResponse.md diff --git a/sdks/marketingsolutions_2024-07/docs/DynamicAttributes.md b/sdks/marketingsolutions_2024-07/docs/DynamicAttributes.md new file mode 100644 index 00000000..ae9da4be --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/DynamicAttributes.md @@ -0,0 +1,29 @@ + + +# DynamicAttributes + +The attributes specific to Dynamic creatives + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**logos** | [**List<ImageShape>**](ImageShape.md) | Logo images uploaded on demostatic.criteo.com when deploying and then static.criteo.net | [optional] | +|**creativeBackgroundColor** | **String** | Color of the creative's background Valid hexadecimal color (e.g. \"AB00FF\") | [optional] | +|**bodyTextColor** | **String** | Color of the creative's body text Valid hexadecimal color (e.g. \"AB00FF\") | [optional] | +|**pricesColor** | **String** | Color of the creative's prices Valid hexadecimal color (e.g. \"AB00FF\") | [optional] | +|**primaryFont** | **String** | Font of the primary font Valid supported font like \"Arial\" | [optional] | +|**callsToAction** | **List<String>** | A Call-to-Action (CTA) is an action-driven instruction to your audience intended to provoke an immediate response, such as “Buy now” or “Go!”. | [optional] | +|**productImageDisplay** | [**ProductImageDisplayEnum**](#ProductImageDisplayEnum) | Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your product catalog images should fit inside the allocated space (\"ShowFullImage\") or whether they should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping. | [optional] | + + + +## Enum: ProductImageDisplayEnum + +| Name | Value | +|---- | -----| +| SHOWFULLIMAGE | "ShowFullImage" | +| ZOOMONIMAGE | "ZoomOnImage" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/DynamicWriteAttributes.md b/sdks/marketingsolutions_2024-07/docs/DynamicWriteAttributes.md new file mode 100644 index 00000000..8085634a --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/DynamicWriteAttributes.md @@ -0,0 +1,29 @@ + + +# DynamicWriteAttributes + +The attributes specific to create or update a Dynamic creative + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**logoBase64String** | **String** | Logo image as a base-64 encoded string | | +|**creativeBackgroundColor** | **String** | Color of the creative's background Valid hexadecimal RGB color (e.g. \"AB00FF\") | [optional] | +|**bodyTextColor** | **String** | Color of the creative's body text Valid hexadecimal RGB color (e.g. \"AB00FF\") | | +|**pricesColor** | **String** | Color of the creative's prices Valid hexadecimal RGB color (e.g. \"AB00FF\") | | +|**primaryFont** | **String** | Font of the primary font Valid supported font like \"Arial\" | [optional] | +|**callsToAction** | **List<String>** | A Call-to-Action (CTA) is an action-driven instruction to your audience intended to provoke an immediate response, such as “Buy now” or “Go!”. | | +|**productImageDisplay** | [**ProductImageDisplayEnum**](#ProductImageDisplayEnum) | Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your product catalog images should fit inside the allocated space (\"ShowFullImage\") or whether they should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping. | | + + + +## Enum: ProductImageDisplayEnum + +| Name | Value | +|---- | -----| +| SHOWFULLIMAGE | "ShowFullImage" | +| ZOOMONIMAGE | "ZoomOnImage" | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/EntityOfPortfolioMessage.md b/sdks/marketingsolutions_2024-07/docs/EntityOfPortfolioMessage.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/EntityOfPortfolioMessage.md rename to sdks/marketingsolutions_2024-07/docs/EntityOfPortfolioMessage.md diff --git a/sdks/marketingsolutions_2023-04/docs/ErrorCodeResponse.md b/sdks/marketingsolutions_2024-07/docs/ErrorCodeResponse.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/ErrorCodeResponse.md rename to sdks/marketingsolutions_2024-07/docs/ErrorCodeResponse.md diff --git a/sdks/marketingsolutions_2023-04/docs/GatewayApi.md b/sdks/marketingsolutions_2024-07/docs/GatewayApi.md similarity index 84% rename from sdks/marketingsolutions_2023-04/docs/GatewayApi.md rename to sdks/marketingsolutions_2024-07/docs/GatewayApi.md index 15910730..e0369a74 100644 --- a/sdks/marketingsolutions_2023-04/docs/GatewayApi.md +++ b/sdks/marketingsolutions_2024-07/docs/GatewayApi.md @@ -4,7 +4,7 @@ All URIs are relative to *https://api.criteo.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getCurrentApplication**](GatewayApi.md#getCurrentApplication) | **GET** /2023-04/marketing-solutions/me | | +| [**getCurrentApplication**](GatewayApi.md#getCurrentApplication) | **GET** /2024-07/marketing-solutions/me | | @@ -19,15 +19,15 @@ Get information about the currently logged application ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; - -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.GatewayApi; +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.auth.*; +import com.criteo.api.marketingsolutions.v2024_07.model.*; +import com.criteo.api.marketingsolutions.v2024_07.api.GatewayApi; public class Example { public static void main(String[] args) { diff --git a/sdks/marketingsolutions_2023-04/docs/GetPortfolioResponse.md b/sdks/marketingsolutions_2024-07/docs/GetPortfolioResponse.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/GetPortfolioResponse.md rename to sdks/marketingsolutions_2024-07/docs/GetPortfolioResponse.md diff --git a/sdks/marketingsolutions_2024-07/docs/HtmlTagAttributes.md b/sdks/marketingsolutions_2024-07/docs/HtmlTagAttributes.md new file mode 100644 index 00000000..c0b374f5 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/HtmlTagAttributes.md @@ -0,0 +1,14 @@ + + +# HtmlTagAttributes + +The attributes specific to HtmlTag creatives + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tags** | [**List<Tag>**](Tag.md) | An array containing the html tags | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/HtmlTagWriteAttributes.md b/sdks/marketingsolutions_2024-07/docs/HtmlTagWriteAttributes.md new file mode 100644 index 00000000..35bd3707 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/HtmlTagWriteAttributes.md @@ -0,0 +1,14 @@ + + +# HtmlTagWriteAttributes + +The attributes specific to create or update a HtmlTag creative + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tags** | [**List<Tag>**](Tag.md) | An array containing the html tags | | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/ImageAttributes.md b/sdks/marketingsolutions_2024-07/docs/ImageAttributes.md new file mode 100644 index 00000000..031048b5 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ImageAttributes.md @@ -0,0 +1,15 @@ + + +# ImageAttributes + +The attributes specific to Image creatives + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**urls** | **List<String>** | Array of images uploaded on demostatic.criteo.com when deploying and then static.criteo.net | [optional] | +|**landingPageUrl** | **String** | Web redirection of the landing page url | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/ImageSet.md b/sdks/marketingsolutions_2024-07/docs/ImageSet.md new file mode 100644 index 00000000..c37983a2 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ImageSet.md @@ -0,0 +1,15 @@ + + +# ImageSet + +Entity consists of multiple images in different ratios and a headline text. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**images** | [**List<ImageShape>**](ImageShape.md) | The images' urls with their shapes. | | +|**headlineText** | **String** | The headline of the image set | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/ImageSetBase64.md b/sdks/marketingsolutions_2024-07/docs/ImageSetBase64.md new file mode 100644 index 00000000..ba81c479 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ImageSetBase64.md @@ -0,0 +1,15 @@ + + +# ImageSetBase64 + +Entity consists of multiple images in different ratios as a base-64 encoded and a headline text. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**imageBase64Strings** | **List<String>** | Multiple images potentially in different shapes, each image is a base-64 encoded string. | | +|**headlineText** | **String** | The headline of the image set | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/ImageShape.md b/sdks/marketingsolutions_2024-07/docs/ImageShape.md new file mode 100644 index 00000000..c9d11e62 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ImageShape.md @@ -0,0 +1,25 @@ + + +# ImageShape + +Entity containing the shape and url of the image + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**shape** | [**ShapeEnum**](#ShapeEnum) | Ratio of the image | | +|**url** | **URI** | URL of the image uploaded on demostatic.criteo.com when deploying and then static.criteo.net | | + + + +## Enum: ShapeEnum + +| Name | Value | +|---- | -----| +| HORIZONTAL | "Horizontal" | +| VERTICAL | "Vertical" | +| SQUARE | "Square" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/ImageSlide.md b/sdks/marketingsolutions_2024-07/docs/ImageSlide.md new file mode 100644 index 00000000..8ad6b74d --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ImageSlide.md @@ -0,0 +1,16 @@ + + +# ImageSlide + +Slide containing the image URLs + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**width** | **Integer** | Width of the Coupon slide | [optional] | +|**height** | **Integer** | Height of the Coupon slide | [optional] | +|**slideUrls** | **List<String>** | Array of images of the same size uploaded on demostatic.criteo.com when deploying and then static.criteo.net | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/ImageWriteAttributes.md b/sdks/marketingsolutions_2024-07/docs/ImageWriteAttributes.md new file mode 100644 index 00000000..c96fd8b0 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ImageWriteAttributes.md @@ -0,0 +1,15 @@ + + +# ImageWriteAttributes + +The attributes specific to create or update an Image creative + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**base64Strings** | **List<String>** | Array of images as a base-64 encoded string | | +|**landingPageUrl** | **URI** | Web redirection of the landing page url | | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentBrandEntityV1.md b/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentBrandEntityV1.md new file mode 100644 index 00000000..b6fd5cfa --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentBrandEntityV1.md @@ -0,0 +1,15 @@ + + +# InMarketAudienceSegmentBrandEntityV1 + +In-market segment brand entity + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the in-market segment brand | [optional] | +|**size** | **Integer** | Size of the in-market segment brand | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentBrandEntityV1ListResponse.md b/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentBrandEntityV1ListResponse.md new file mode 100644 index 00000000..ace643db --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentBrandEntityV1ListResponse.md @@ -0,0 +1,16 @@ + + +# InMarketAudienceSegmentBrandEntityV1ListResponse + +A top-level object that encapsulates a Criteo API response for several entities + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<InMarketAudienceSegmentBrandEntityV1Resource>**](InMarketAudienceSegmentBrandEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentBrandEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentBrandEntityV1Resource.md new file mode 100644 index 00000000..ef317088 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentBrandEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# InMarketAudienceSegmentBrandEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**InMarketAudienceSegmentBrandEntityV1**](InMarketAudienceSegmentBrandEntityV1.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentInterestEntityV1.md b/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentInterestEntityV1.md new file mode 100644 index 00000000..c69e2b7e --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentInterestEntityV1.md @@ -0,0 +1,14 @@ + + +# InMarketAudienceSegmentInterestEntityV1 + +In-market segment interest entity + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**parentId** | **String** | Id of the parent in-market segment interest | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentInterestEntityV1ListResponse.md b/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentInterestEntityV1ListResponse.md new file mode 100644 index 00000000..f718dd0e --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentInterestEntityV1ListResponse.md @@ -0,0 +1,16 @@ + + +# InMarketAudienceSegmentInterestEntityV1ListResponse + +A top-level object that encapsulates a Criteo API response for several entities + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<InMarketAudienceSegmentInterestEntityV1Resource>**](InMarketAudienceSegmentInterestEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentInterestEntityV1Resource.md b/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentInterestEntityV1Resource.md new file mode 100644 index 00000000..bc11529e --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/InMarketAudienceSegmentInterestEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# InMarketAudienceSegmentInterestEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**InMarketAudienceSegmentInterestEntityV1**](InMarketAudienceSegmentInterestEntityV1.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/InMarketCreateV1.md b/sdks/marketingsolutions_2024-07/docs/InMarketCreateV1.md new file mode 100644 index 00000000..c4798bed --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/InMarketCreateV1.md @@ -0,0 +1,49 @@ + + +# InMarketCreateV1 + +Settings to target users based on high shopping intents and demographics. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**country** | **String** | Reach people of a specific country | | +|**buyingPower** | [**Set<BuyingPowerEnum>**](#Set<BuyingPowerEnum>) | Reach people who frequently purchase high price range items to lower price range items | [optional] | +|**gender** | [**GenderEnum**](#GenderEnum) | Reach people who’ve shown interest in products made for a specific gender | [optional] | +|**interestIds** | **Set<String>** | Reach new people based on their interests | [optional] | +|**brandIds** | **Set<String>** | Choose the brands your segment might be interested in | [optional] | +|**priceRange** | [**Set<PriceRangeEnum>**](#Set<PriceRangeEnum>) | Reach people who’ve shown interest in products within a specific price range | [optional] | + + + +## Enum: Set<BuyingPowerEnum> + +| Name | Value | +|---- | -----| +| LOW | "Low" | +| MEDIUM | "Medium" | +| HIGH | "High" | +| VERYHIGH | "VeryHigh" | + + + +## Enum: GenderEnum + +| Name | Value | +|---- | -----| +| MALE | "Male" | +| FEMALE | "Female" | + + + +## Enum: Set<PriceRangeEnum> + +| Name | Value | +|---- | -----| +| LOW | "Low" | +| MEDIUM | "Medium" | +| HIGH | "High" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/InMarketSizeEstimationV1.md b/sdks/marketingsolutions_2024-07/docs/InMarketSizeEstimationV1.md new file mode 100644 index 00000000..dc389fd6 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/InMarketSizeEstimationV1.md @@ -0,0 +1,49 @@ + + +# InMarketSizeEstimationV1 + +Settings to target users based on high shopping intents and demographics. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**country** | **String** | | | +|**buyingPower** | [**Set<BuyingPowerEnum>**](#Set<BuyingPowerEnum>) | | [optional] | +|**gender** | [**GenderEnum**](#GenderEnum) | | [optional] | +|**interestIds** | **Set<String>** | | [optional] | +|**brandIds** | **Set<String>** | | [optional] | +|**priceRange** | [**Set<PriceRangeEnum>**](#Set<PriceRangeEnum>) | | [optional] | + + + +## Enum: Set<BuyingPowerEnum> + +| Name | Value | +|---- | -----| +| LOW | "Low" | +| MEDIUM | "Medium" | +| HIGH | "High" | +| VERYHIGH | "VeryHigh" | + + + +## Enum: GenderEnum + +| Name | Value | +|---- | -----| +| MALE | "Male" | +| FEMALE | "Female" | + + + +## Enum: Set<PriceRangeEnum> + +| Name | Value | +|---- | -----| +| LOW | "Low" | +| MEDIUM | "Medium" | +| HIGH | "High" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/InMarketUpdateV1.md b/sdks/marketingsolutions_2024-07/docs/InMarketUpdateV1.md new file mode 100644 index 00000000..e2ba33dd --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/InMarketUpdateV1.md @@ -0,0 +1,40 @@ + + +# InMarketUpdateV1 + +Settings to target users based on high shopping intents and demographics. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**country** | **String** | Reach people of a specific country | [optional] | +|**buyingPower** | [**Set<BuyingPowerEnum>**](#Set<BuyingPowerEnum>) | Reach people who frequently purchase high price range items to lower price range items | [optional] | +|**gender** | [**NillableGenderV1**](NillableGenderV1.md) | | [optional] | +|**interestIds** | **Set<String>** | Reach new people based on their interests | [optional] | +|**brandIds** | **Set<String>** | Choose the brands your segment might be interested in | [optional] | +|**priceRange** | [**Set<PriceRangeEnum>**](#Set<PriceRangeEnum>) | Reach people who’ve shown interest in products within a specific price range | [optional] | + + + +## Enum: Set<BuyingPowerEnum> + +| Name | Value | +|---- | -----| +| LOW | "Low" | +| MEDIUM | "Medium" | +| HIGH | "High" | +| VERYHIGH | "VeryHigh" | + + + +## Enum: Set<PriceRangeEnum> + +| Name | Value | +|---- | -----| +| LOW | "Low" | +| MEDIUM | "Medium" | +| HIGH | "High" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/InMarketV1.md b/sdks/marketingsolutions_2024-07/docs/InMarketV1.md new file mode 100644 index 00000000..d98d7ed8 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/InMarketV1.md @@ -0,0 +1,52 @@ + + +# InMarketV1 + +Settings to target users based on high shopping intents and demographics. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**country** | **String** | Reach people of a specific country | [optional] | +|**buyingPower** | [**Set<BuyingPowerEnum>**](#Set<BuyingPowerEnum>) | Reach people who frequently purchase high price range items to lower price range items | [optional] | +|**gender** | [**GenderEnum**](#GenderEnum) | Reach people who’ve shown interest in products made for a specific gender | [optional] | +|**interestIds** | **Set<String>** | Reach new people based on their interests | [optional] | +|**brandIds** | **Set<String>** | Choose the brands your segment might be interested in | [optional] | +|**priceRange** | [**Set<PriceRangeEnum>**](#Set<PriceRangeEnum>) | Reach people who’ve shown interest in products within a specific price range | [optional] | + + + +## Enum: Set<BuyingPowerEnum> + +| Name | Value | +|---- | -----| +| UNKNOWN | "Unknown" | +| LOW | "Low" | +| MEDIUM | "Medium" | +| HIGH | "High" | +| VERYHIGH | "VeryHigh" | + + + +## Enum: GenderEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "Unknown" | +| MALE | "Male" | +| FEMALE | "Female" | + + + +## Enum: Set<PriceRangeEnum> + +| Name | Value | +|---- | -----| +| UNKNOWN | "Unknown" | +| LOW | "Low" | +| MEDIUM | "Medium" | +| HIGH | "High" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/LocationCreateV1.md b/sdks/marketingsolutions_2024-07/docs/LocationCreateV1.md new file mode 100644 index 00000000..206c8a12 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/LocationCreateV1.md @@ -0,0 +1,15 @@ + + +# LocationCreateV1 + +Settings to target users based on their location. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pointsOfInterest** | [**List<PointOfInterestV1>**](PointOfInterestV1.md) | Reach users which have been historically located in the given coordinates | | +|**radiusInKm** | **Integer** | The expected maximum distance in kilometers between a user and a point of interest | | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/LocationSizeEstimationV1.md b/sdks/marketingsolutions_2024-07/docs/LocationSizeEstimationV1.md new file mode 100644 index 00000000..5cf006b1 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/LocationSizeEstimationV1.md @@ -0,0 +1,15 @@ + + +# LocationSizeEstimationV1 + +Settings to define your audience based on their location. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pointsOfInterest** | [**List<PointOfInterestV1>**](PointOfInterestV1.md) | | | +|**radiusInKm** | **Integer** | | | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/LocationUpdateV1.md b/sdks/marketingsolutions_2024-07/docs/LocationUpdateV1.md new file mode 100644 index 00000000..a7961e87 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/LocationUpdateV1.md @@ -0,0 +1,24 @@ + + +# LocationUpdateV1 + +Settings to target users based on their location. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pointsOfInterest** | [**List<PointOfInterestV1>**](PointOfInterestV1.md) | Reach users which have been historically located in the given coordinates | [optional] | +|**radiusInKm** | **Integer** | Radius in kilometers | [optional] | +|**registryType** | [**RegistryTypeEnum**](#RegistryTypeEnum) | The kind of Location audience | [optional] | + + + +## Enum: RegistryTypeEnum + +| Name | Value | +|---- | -----| +| POINTOFINTEREST | "PointOfInterest" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/LocationV1.md b/sdks/marketingsolutions_2024-07/docs/LocationV1.md new file mode 100644 index 00000000..1ce94701 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/LocationV1.md @@ -0,0 +1,25 @@ + + +# LocationV1 + +Settings to target users based on their location. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**pointsOfInterest** | [**List<PointOfInterestV1>**](PointOfInterestV1.md) | Reach users which have been historically located in the given coordinates | [optional] | +|**radiusInKm** | **Integer** | The expected maximum distance in kilometers between a user and a point of interest | [optional] | +|**registryType** | [**RegistryTypeEnum**](#RegistryTypeEnum) | The kind of Location audience | [optional] | + + + +## Enum: RegistryTypeEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "Unknown" | +| POINTOFINTEREST | "PointOfInterest" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/LookalikeCreateV1.md b/sdks/marketingsolutions_2024-07/docs/LookalikeCreateV1.md new file mode 100644 index 00000000..bfcb9785 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/LookalikeCreateV1.md @@ -0,0 +1,15 @@ + + +# LookalikeCreateV1 + +Settings to target users close to a given seed segment. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**seedSegmentId** | **String** | Segment from which the Lookalike segment will be generated | | +|**targetSize** | **Long** | Desired size of the generated Lookalike segment | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/LookalikeUpdateV1.md b/sdks/marketingsolutions_2024-07/docs/LookalikeUpdateV1.md new file mode 100644 index 00000000..22bd8ce1 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/LookalikeUpdateV1.md @@ -0,0 +1,14 @@ + + +# LookalikeUpdateV1 + +Settings to target users that behave like a given seed segment + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**targetSize** | **Long** | Desired size of the generated Lookalike segment | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/LookalikeV1.md b/sdks/marketingsolutions_2024-07/docs/LookalikeV1.md new file mode 100644 index 00000000..7d765646 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/LookalikeV1.md @@ -0,0 +1,15 @@ + + +# LookalikeV1 + +Settings to target users that behave like a given seed segment + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**seedSegmentId** | **String** | Segment from which the Lookalike segment will be generated | [optional] | +|**targetSize** | **Long** | Desired size of the generated Lookalike segment | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/ModifyAudienceResponse.md b/sdks/marketingsolutions_2024-07/docs/ModifyAudienceResponse.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/ModifyAudienceResponse.md rename to sdks/marketingsolutions_2024-07/docs/ModifyAudienceResponse.md diff --git a/sdks/marketingsolutions_2023-04/docs/NillableAdSetTargetingRule.md b/sdks/marketingsolutions_2024-07/docs/NillableAdSetTargetingRuleV24Q1.md similarity index 65% rename from sdks/marketingsolutions_2023-04/docs/NillableAdSetTargetingRule.md rename to sdks/marketingsolutions_2024-07/docs/NillableAdSetTargetingRuleV24Q1.md index ffd88392..5d3d1372 100644 --- a/sdks/marketingsolutions_2023-04/docs/NillableAdSetTargetingRule.md +++ b/sdks/marketingsolutions_2024-07/docs/NillableAdSetTargetingRuleV24Q1.md @@ -1,6 +1,6 @@ -# NillableAdSetTargetingRule +# NillableAdSetTargetingRuleV24Q1 structure that encapsulates an object that have valid business null values. If the structure is provided (i.e. not null), then the value in it, even null, is provided. @@ -8,7 +8,7 @@ structure that encapsulates an object that have valid business null values. If t | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**value** | [**NillableAdSetTargetingRuleValue**](NillableAdSetTargetingRuleValue.md) | | [optional] | +|**value** | [**NillableAdSetTargetingRuleV24Q1Value**](NillableAdSetTargetingRuleV24Q1Value.md) | | [optional] | diff --git a/sdks/marketingsolutions_2023-04/docs/NillableAdSetTargetingRuleValue.md b/sdks/marketingsolutions_2024-07/docs/NillableAdSetTargetingRuleV24Q1Value.md similarity index 90% rename from sdks/marketingsolutions_2023-04/docs/NillableAdSetTargetingRuleValue.md rename to sdks/marketingsolutions_2024-07/docs/NillableAdSetTargetingRuleV24Q1Value.md index b414b0f4..974ac5a3 100644 --- a/sdks/marketingsolutions_2023-04/docs/NillableAdSetTargetingRuleValue.md +++ b/sdks/marketingsolutions_2024-07/docs/NillableAdSetTargetingRuleV24Q1Value.md @@ -1,6 +1,6 @@ -# NillableAdSetTargetingRuleValue +# NillableAdSetTargetingRuleV24Q1Value ## Properties diff --git a/sdks/marketingsolutions_2023-04/docs/NillableDateTime.md b/sdks/marketingsolutions_2024-07/docs/NillableDateTime.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/NillableDateTime.md rename to sdks/marketingsolutions_2024-07/docs/NillableDateTime.md diff --git a/sdks/marketingsolutions_2023-04/docs/NillableDecimal.md b/sdks/marketingsolutions_2024-07/docs/NillableDecimal.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/NillableDecimal.md rename to sdks/marketingsolutions_2024-07/docs/NillableDecimal.md diff --git a/sdks/marketingsolutions_2024-07/docs/NillableGenderV1.md b/sdks/marketingsolutions_2024-07/docs/NillableGenderV1.md new file mode 100644 index 00000000..b0141da5 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/NillableGenderV1.md @@ -0,0 +1,23 @@ + + +# NillableGenderV1 + +Placeholder object for value for which \"null\" is a valid business value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | [**ValueEnum**](#ValueEnum) | The value. If missing or null the value is set to \"null\" | [optional] | + + + +## Enum: ValueEnum + +| Name | Value | +|---- | -----| +| MALE | "Male" | +| FEMALE | "Female" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/NillableInt32.md b/sdks/marketingsolutions_2024-07/docs/NillableInt32.md new file mode 100644 index 00000000..9ed8b5c9 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/NillableInt32.md @@ -0,0 +1,14 @@ + + +# NillableInt32 + +Placeholder object for value for which \"null\" is a valid business value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **Integer** | The value. If missing or null the value is set to \"null\" | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/NillableString.md b/sdks/marketingsolutions_2024-07/docs/NillableString.md new file mode 100644 index 00000000..3bff8f58 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/NillableString.md @@ -0,0 +1,14 @@ + + +# NillableString + +Placeholder object for string value for which \"null\" is a valid business value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **String** | The string's value. If missing or null the string's value is set to \"null\" | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSetBidding.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetBiddingV24Q1.md similarity index 90% rename from sdks/marketingsolutions_2023-04/docs/PatchAdSetBidding.md rename to sdks/marketingsolutions_2024-07/docs/PatchAdSetBiddingV24Q1.md index 5f5b02e3..dc47c783 100644 --- a/sdks/marketingsolutions_2023-04/docs/PatchAdSetBidding.md +++ b/sdks/marketingsolutions_2024-07/docs/PatchAdSetBiddingV24Q1.md @@ -1,6 +1,6 @@ -# PatchAdSetBidding +# PatchAdSetBiddingV24Q1 ad set bidding patch model diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSetBudget.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetBudgetV24Q1.md similarity index 96% rename from sdks/marketingsolutions_2023-04/docs/PatchAdSetBudget.md rename to sdks/marketingsolutions_2024-07/docs/PatchAdSetBudgetV24Q1.md index 6eb62b30..8c1a0626 100644 --- a/sdks/marketingsolutions_2023-04/docs/PatchAdSetBudget.md +++ b/sdks/marketingsolutions_2024-07/docs/PatchAdSetBudgetV24Q1.md @@ -1,6 +1,6 @@ -# PatchAdSetBudget +# PatchAdSetBudgetV24Q1 ad set budget patch model @@ -33,6 +33,7 @@ ad set budget patch model | DAILY | "daily" | | MONTHLY | "monthly" | | LIFETIME | "lifetime" | +| WEEKLY | "weekly" | diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSetCategoryBid.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetCategoryBid.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchAdSetCategoryBid.md rename to sdks/marketingsolutions_2024-07/docs/PatchAdSetCategoryBid.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSetCategoryBidListRequest.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetCategoryBidListRequest.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchAdSetCategoryBidListRequest.md rename to sdks/marketingsolutions_2024-07/docs/PatchAdSetCategoryBidListRequest.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSetCategoryBidResource.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetCategoryBidResource.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchAdSetCategoryBidResource.md rename to sdks/marketingsolutions_2024-07/docs/PatchAdSetCategoryBidResource.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSetCategoryBidResultListResponse.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetCategoryBidResultListResponse.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchAdSetCategoryBidResultListResponse.md rename to sdks/marketingsolutions_2024-07/docs/PatchAdSetCategoryBidResultListResponse.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSetCategoryBidResultResource.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetCategoryBidResultResource.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchAdSetCategoryBidResultResource.md rename to sdks/marketingsolutions_2024-07/docs/PatchAdSetCategoryBidResultResource.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSetDisplayMultiplier.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetDisplayMultiplier.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchAdSetDisplayMultiplier.md rename to sdks/marketingsolutions_2024-07/docs/PatchAdSetDisplayMultiplier.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSetDisplayMultiplierListRequest.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetDisplayMultiplierListRequest.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchAdSetDisplayMultiplierListRequest.md rename to sdks/marketingsolutions_2024-07/docs/PatchAdSetDisplayMultiplierListRequest.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSetDisplayMultiplierResource.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetDisplayMultiplierResource.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchAdSetDisplayMultiplierResource.md rename to sdks/marketingsolutions_2024-07/docs/PatchAdSetDisplayMultiplierResource.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSetDisplayMultiplierResultListResponse.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetDisplayMultiplierResultListResponse.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchAdSetDisplayMultiplierResultListResponse.md rename to sdks/marketingsolutions_2024-07/docs/PatchAdSetDisplayMultiplierResultListResponse.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSetDisplayMultiplierResultResource.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetDisplayMultiplierResultResource.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchAdSetDisplayMultiplierResultResource.md rename to sdks/marketingsolutions_2024-07/docs/PatchAdSetDisplayMultiplierResultResource.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchAdSetScheduling.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetSchedulingV24Q1.md similarity index 91% rename from sdks/marketingsolutions_2023-04/docs/PatchAdSetScheduling.md rename to sdks/marketingsolutions_2024-07/docs/PatchAdSetSchedulingV24Q1.md index 78a422e6..e27be53d 100644 --- a/sdks/marketingsolutions_2023-04/docs/PatchAdSetScheduling.md +++ b/sdks/marketingsolutions_2024-07/docs/PatchAdSetSchedulingV24Q1.md @@ -1,6 +1,6 @@ -# PatchAdSetScheduling +# PatchAdSetSchedulingV24Q1 ad set schedule patch model diff --git a/sdks/marketingsolutions_2024-07/docs/PatchAdSetV24Q1.md b/sdks/marketingsolutions_2024-07/docs/PatchAdSetV24Q1.md new file mode 100644 index 00000000..0d62262b --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/PatchAdSetV24Q1.md @@ -0,0 +1,18 @@ + + +# PatchAdSetV24Q1 + +ad set patch model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | +|**scheduling** | [**PatchAdSetSchedulingV24Q1**](PatchAdSetSchedulingV24Q1.md) | | [optional] | +|**bidding** | [**PatchAdSetBiddingV24Q1**](PatchAdSetBiddingV24Q1.md) | | [optional] | +|**targeting** | [**AdSetTargetingV24Q1**](AdSetTargetingV24Q1.md) | | [optional] | +|**budget** | [**PatchAdSetBudgetV24Q1**](PatchAdSetBudgetV24Q1.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/PatchCampaign.md b/sdks/marketingsolutions_2024-07/docs/PatchCampaign.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchCampaign.md rename to sdks/marketingsolutions_2024-07/docs/PatchCampaign.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchCampaignListRequest.md b/sdks/marketingsolutions_2024-07/docs/PatchCampaignListRequest.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchCampaignListRequest.md rename to sdks/marketingsolutions_2024-07/docs/PatchCampaignListRequest.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchCampaignSpendLimit.md b/sdks/marketingsolutions_2024-07/docs/PatchCampaignSpendLimit.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchCampaignSpendLimit.md rename to sdks/marketingsolutions_2024-07/docs/PatchCampaignSpendLimit.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchCampaignWriteResource.md b/sdks/marketingsolutions_2024-07/docs/PatchCampaignWriteResource.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchCampaignWriteResource.md rename to sdks/marketingsolutions_2024-07/docs/PatchCampaignWriteResource.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchResultCampaignListResponse.md b/sdks/marketingsolutions_2024-07/docs/PatchResultCampaignListResponse.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchResultCampaignListResponse.md rename to sdks/marketingsolutions_2024-07/docs/PatchResultCampaignListResponse.md diff --git a/sdks/marketingsolutions_2023-04/docs/PatchResultCampaignReadResource.md b/sdks/marketingsolutions_2024-07/docs/PatchResultCampaignReadResource.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PatchResultCampaignReadResource.md rename to sdks/marketingsolutions_2024-07/docs/PatchResultCampaignReadResource.md diff --git a/sdks/marketingsolutions_2023-04/docs/PlacementsReportQueryDataMessage.md b/sdks/marketingsolutions_2024-07/docs/PlacementsReportQueryDataMessage.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PlacementsReportQueryDataMessage.md rename to sdks/marketingsolutions_2024-07/docs/PlacementsReportQueryDataMessage.md diff --git a/sdks/marketingsolutions_2023-04/docs/PlacementsReportQueryEntityMessage.md b/sdks/marketingsolutions_2024-07/docs/PlacementsReportQueryEntityMessage.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PlacementsReportQueryEntityMessage.md rename to sdks/marketingsolutions_2024-07/docs/PlacementsReportQueryEntityMessage.md diff --git a/sdks/marketingsolutions_2023-04/docs/PlacementsReportQueryMessage.md b/sdks/marketingsolutions_2024-07/docs/PlacementsReportQueryMessage.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PlacementsReportQueryMessage.md rename to sdks/marketingsolutions_2024-07/docs/PlacementsReportQueryMessage.md diff --git a/sdks/marketingsolutions_2024-07/docs/PointOfInterestV1.md b/sdks/marketingsolutions_2024-07/docs/PointOfInterestV1.md new file mode 100644 index 00000000..52a343bc --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/PointOfInterestV1.md @@ -0,0 +1,16 @@ + + +# PointOfInterestV1 + +Named coordinate defined by its latitude and longitude. Latitude and Longitude are rounded at 5 decimals. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the point of interest | [optional] | +|**latitude** | **Double** | ISO-6709 latitude (rounded at 5 decimals) | [optional] | +|**longitude** | **Double** | ISO-6709 longitude (rounded at 5 decimals) | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/PortfolioMessage.md b/sdks/marketingsolutions_2024-07/docs/PortfolioMessage.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/PortfolioMessage.md rename to sdks/marketingsolutions_2024-07/docs/PortfolioMessage.md diff --git a/sdks/marketingsolutions_2023-04/docs/ProblemDetails.md b/sdks/marketingsolutions_2024-07/docs/ProblemDetails.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/ProblemDetails.md rename to sdks/marketingsolutions_2024-07/docs/ProblemDetails.md diff --git a/sdks/marketingsolutions_2023-04/docs/ProblemsDetails.md b/sdks/marketingsolutions_2024-07/docs/ProblemsDetails.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/ProblemsDetails.md rename to sdks/marketingsolutions_2024-07/docs/ProblemsDetails.md diff --git a/sdks/marketingsolutions_2024-07/docs/ProspectingCreateV1.md b/sdks/marketingsolutions_2024-07/docs/ProspectingCreateV1.md new file mode 100644 index 00000000..f8604536 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ProspectingCreateV1.md @@ -0,0 +1,25 @@ + + +# ProspectingCreateV1 + +Settings to target prospecting users to website visitors. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**daysSinceLastVisitMin** | **Integer** | When non buyers are included, include users who visited your website before this number of days | [optional] | +|**daysSinceLastVisitMax** | **Integer** | When non buyers are included, include users who visited your website after this number of days | [optional] | +|**usersType** | [**UsersTypeEnum**](#UsersTypeEnum) | Type of users to target | | + + + +## Enum: UsersTypeEnum + +| Name | Value | +|---- | -----| +| PROSPECTS | "Prospects" | +| PROSPECTSORNONBUYERS | "ProspectsOrNonBuyers" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/ProspectingUpdateV1.md b/sdks/marketingsolutions_2024-07/docs/ProspectingUpdateV1.md new file mode 100644 index 00000000..89bab03f --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ProspectingUpdateV1.md @@ -0,0 +1,25 @@ + + +# ProspectingUpdateV1 + +Settings to target prospecting users to website visitors. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**daysSinceLastVisitMin** | [**NillableInt32**](NillableInt32.md) | | [optional] | +|**daysSinceLastVisitMax** | [**NillableInt32**](NillableInt32.md) | | [optional] | +|**usersType** | [**UsersTypeEnum**](#UsersTypeEnum) | Type of users to target | [optional] | + + + +## Enum: UsersTypeEnum + +| Name | Value | +|---- | -----| +| PROSPECTS | "Prospects" | +| PROSPECTSORNONBUYERS | "ProspectsOrNonBuyers" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/ProspectingV1.md b/sdks/marketingsolutions_2024-07/docs/ProspectingV1.md new file mode 100644 index 00000000..0980d466 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ProspectingV1.md @@ -0,0 +1,26 @@ + + +# ProspectingV1 + +Settings to target prospecting users to website visitors. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**daysSinceLastVisitMin** | **Integer** | When non buyers are included, include users who visited your website before this number of days | [optional] | +|**daysSinceLastVisitMax** | **Integer** | When non buyers are included, include users who visited your website after this number of days | [optional] | +|**usersType** | [**UsersTypeEnum**](#UsersTypeEnum) | Type of users to target | [optional] | + + + +## Enum: UsersTypeEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "Unknown" | +| PROSPECTS | "Prospects" | +| PROSPECTSORNONBUYERS | "ProspectsOrNonBuyers" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/ReadAdSetBiddingV24Q1.md b/sdks/marketingsolutions_2024-07/docs/ReadAdSetBiddingV24Q1.md new file mode 100644 index 00000000..441a7f6d --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ReadAdSetBiddingV24Q1.md @@ -0,0 +1,31 @@ + + +# ReadAdSetBiddingV24Q1 + +ad set bidding read model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bidAmount** | **Double** | Decimal value target relating to the `adSetObjective` specified. May be `null` for objectives that do not require a target value. At most 4 decimals are supported. Additional decimals are rounded. | [optional] | +|**costController** | [**CostControllerEnum**](#CostControllerEnum) | How spend is controlled | [optional] | + + + +## Enum: CostControllerEnum + +| Name | Value | +|---- | -----| +| COS | "COS" | +| CPC | "CPC" | +| CPI | "CPI" | +| CPM | "CPM" | +| CPO | "CPO" | +| CPSV | "CPSV" | +| CPV | "CPV" | +| DAILYBUDGET | "dailyBudget" | +| TARGETCPM | "targetCPM" | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/ReadAdSetBudget.md b/sdks/marketingsolutions_2024-07/docs/ReadAdSetBudgetV24Q1.md similarity index 93% rename from sdks/marketingsolutions_2023-04/docs/ReadAdSetBudget.md rename to sdks/marketingsolutions_2024-07/docs/ReadAdSetBudgetV24Q1.md index 2847e887..b78f4dd5 100644 --- a/sdks/marketingsolutions_2023-04/docs/ReadAdSetBudget.md +++ b/sdks/marketingsolutions_2024-07/docs/ReadAdSetBudgetV24Q1.md @@ -1,6 +1,6 @@ -# ReadAdSetBudget +# ReadAdSetBudgetV24Q1 ad set budget read model @@ -12,7 +12,7 @@ ad set budget read model |**budgetRenewal** | [**BudgetRenewalEnum**](#BudgetRenewalEnum) | | [optional] | |**budgetDeliverySmoothing** | [**BudgetDeliverySmoothingEnum**](#BudgetDeliverySmoothingEnum) | | [optional] | |**budgetDeliveryWeek** | [**BudgetDeliveryWeekEnum**](#BudgetDeliveryWeekEnum) | | [optional] | -|**budgetAmount** | [**NillableDecimal**](NillableDecimal.md) | | [optional] | +|**budgetAmount** | **Double** | | [optional] | @@ -33,6 +33,7 @@ ad set budget read model | DAILY | "daily" | | MONTHLY | "monthly" | | LIFETIME | "lifetime" | +| WEEKLY | "weekly" | diff --git a/sdks/marketingsolutions_2023-04/docs/ReadAdSetSchedule.md b/sdks/marketingsolutions_2024-07/docs/ReadAdSetScheduleV24Q1.md similarity index 97% rename from sdks/marketingsolutions_2023-04/docs/ReadAdSetSchedule.md rename to sdks/marketingsolutions_2024-07/docs/ReadAdSetScheduleV24Q1.md index 9a07ad92..43ecf8ac 100644 --- a/sdks/marketingsolutions_2023-04/docs/ReadAdSetSchedule.md +++ b/sdks/marketingsolutions_2024-07/docs/ReadAdSetScheduleV24Q1.md @@ -1,6 +1,6 @@ -# ReadAdSetSchedule +# ReadAdSetScheduleV24Q1 ad set schedule read model diff --git a/sdks/marketingsolutions_2024-07/docs/ReadAdSetV24Q1.md b/sdks/marketingsolutions_2024-07/docs/ReadAdSetV24Q1.md new file mode 100644 index 00000000..8c47e82c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/ReadAdSetV24Q1.md @@ -0,0 +1,71 @@ + + +# ReadAdSetV24Q1 + +ad set read model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | +|**advertiserId** | **String** | | [optional] | +|**datasetId** | **String** | | [optional] | +|**campaignId** | **String** | | [optional] | +|**destinationEnvironment** | [**DestinationEnvironmentEnum**](#DestinationEnvironmentEnum) | | [optional] | +|**objective** | [**ObjectiveEnum**](#ObjectiveEnum) | | [optional] | +|**schedule** | [**ReadAdSetScheduleV24Q1**](ReadAdSetScheduleV24Q1.md) | | [optional] | +|**bidding** | [**ReadAdSetBiddingV24Q1**](ReadAdSetBiddingV24Q1.md) | | [optional] | +|**targeting** | [**AdSetTargetingV24Q1**](AdSetTargetingV24Q1.md) | | [optional] | +|**budget** | [**ReadAdSetBudgetV24Q1**](ReadAdSetBudgetV24Q1.md) | | [optional] | +|**mediaType** | [**MediaTypeEnum**](#MediaTypeEnum) | | [optional] | +|**videoChannel** | [**VideoChannelEnum**](#VideoChannelEnum) | | [optional] | + + + +## Enum: DestinationEnvironmentEnum + +| Name | Value | +|---- | -----| +| UNDEFINED | "undefined" | +| WEB | "web" | +| APP | "app" | + + + +## Enum: ObjectiveEnum + +| Name | Value | +|---- | -----| +| CUSTOMACTION | "customAction" | +| CLICKS | "clicks" | +| CONVERSIONS | "conversions" | +| DISPLAYS | "displays" | +| APPPROMOTION | "appPromotion" | +| REVENUE | "revenue" | +| STORECONVERSIONS | "storeConversions" | +| VALUE | "value" | +| REACH | "reach" | +| VISITS | "visits" | +| VIDEOVIEWS | "videoViews" | + + + +## Enum: MediaTypeEnum + +| Name | Value | +|---- | -----| +| DISPLAY | "display" | +| VIDEO | "video" | + + + +## Enum: VideoChannelEnum + +| Name | Value | +|---- | -----| +| OLV | "olv" | +| CTV | "ctv" | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/ReadModelAdSetId.md b/sdks/marketingsolutions_2024-07/docs/ReadModelAdSetId.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/ReadModelAdSetId.md rename to sdks/marketingsolutions_2024-07/docs/ReadModelAdSetId.md diff --git a/sdks/marketingsolutions_2023-04/docs/ReadModelReadAdSet.md b/sdks/marketingsolutions_2024-07/docs/ReadModelAdSetIdV24Q1.md similarity index 75% rename from sdks/marketingsolutions_2023-04/docs/ReadModelReadAdSet.md rename to sdks/marketingsolutions_2024-07/docs/ReadModelAdSetIdV24Q1.md index 6ca34392..02a7c789 100644 --- a/sdks/marketingsolutions_2023-04/docs/ReadModelReadAdSet.md +++ b/sdks/marketingsolutions_2024-07/docs/ReadModelAdSetIdV24Q1.md @@ -1,6 +1,6 @@ -# ReadModelReadAdSet +# ReadModelAdSetIdV24Q1 read model data for resources @@ -10,7 +10,7 @@ read model data for resources |------------ | ------------- | ------------- | -------------| |**id** | **String** | Id of the entity | [optional] [readonly] | |**type** | **String** | | [optional] [readonly] | -|**attributes** | [**ReadAdSet**](ReadAdSet.md) | | [optional] | +|**attributes** | **Object** | ad set id model | [optional] | diff --git a/sdks/marketingsolutions_2023-04/docs/CampaignReadResource.md b/sdks/marketingsolutions_2024-07/docs/ReadModelReadAdSetV24Q1.md similarity index 72% rename from sdks/marketingsolutions_2023-04/docs/CampaignReadResource.md rename to sdks/marketingsolutions_2024-07/docs/ReadModelReadAdSetV24Q1.md index 49770952..f184d6b4 100644 --- a/sdks/marketingsolutions_2023-04/docs/CampaignReadResource.md +++ b/sdks/marketingsolutions_2024-07/docs/ReadModelReadAdSetV24Q1.md @@ -1,6 +1,6 @@ -# CampaignReadResource +# ReadModelReadAdSetV24Q1 read model data for resources @@ -10,7 +10,7 @@ read model data for resources |------------ | ------------- | ------------- | -------------| |**id** | **String** | Id of the entity | [optional] [readonly] | |**type** | **String** | | [optional] [readonly] | -|**attributes** | [**Campaign**](Campaign.md) | | [optional] | +|**attributes** | [**ReadAdSetV24Q1**](ReadAdSetV24Q1.md) | | [optional] | diff --git a/sdks/marketingsolutions_2023-04/docs/RequestsAdSetId.md b/sdks/marketingsolutions_2024-07/docs/RequestsAdSetId.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/RequestsAdSetId.md rename to sdks/marketingsolutions_2024-07/docs/RequestsAdSetId.md diff --git a/sdks/marketingsolutions_2023-04/docs/RequestsPatchAdSet.md b/sdks/marketingsolutions_2024-07/docs/RequestsPatchAdSetV24Q1.md similarity index 52% rename from sdks/marketingsolutions_2023-04/docs/RequestsPatchAdSet.md rename to sdks/marketingsolutions_2024-07/docs/RequestsPatchAdSetV24Q1.md index 3329da3e..e7b5a630 100644 --- a/sdks/marketingsolutions_2023-04/docs/RequestsPatchAdSet.md +++ b/sdks/marketingsolutions_2024-07/docs/RequestsPatchAdSetV24Q1.md @@ -1,6 +1,6 @@ -# RequestsPatchAdSet +# RequestsPatchAdSetV24Q1 List of input resources @@ -8,7 +8,7 @@ List of input resources | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**data** | [**List<WriteModelPatchAdSet>**](WriteModelPatchAdSet.md) | | [optional] | +|**data** | [**List<WriteModelPatchAdSetV24Q1>**](WriteModelPatchAdSetV24Q1.md) | | [optional] | diff --git a/sdks/marketingsolutions_2023-04/docs/CampaignResponse.md b/sdks/marketingsolutions_2024-07/docs/ResponseReadAdSetV24Q1.md similarity index 74% rename from sdks/marketingsolutions_2023-04/docs/CampaignResponse.md rename to sdks/marketingsolutions_2024-07/docs/ResponseReadAdSetV24Q1.md index 07d3fa7b..6f00d6f2 100644 --- a/sdks/marketingsolutions_2023-04/docs/CampaignResponse.md +++ b/sdks/marketingsolutions_2024-07/docs/ResponseReadAdSetV24Q1.md @@ -1,6 +1,6 @@ -# CampaignResponse +# ResponseReadAdSetV24Q1 output resource @@ -8,7 +8,7 @@ output resource | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**data** | [**CampaignReadResource**](CampaignReadResource.md) | | [optional] | +|**data** | [**ReadModelReadAdSetV24Q1**](ReadModelReadAdSetV24Q1.md) | | [optional] | |**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | |**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | diff --git a/sdks/marketingsolutions_2023-04/docs/ResponsesAdSetId.md b/sdks/marketingsolutions_2024-07/docs/ResponsesAdSetId.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/ResponsesAdSetId.md rename to sdks/marketingsolutions_2024-07/docs/ResponsesAdSetId.md diff --git a/sdks/marketingsolutions_2023-04/docs/ResponsesReadAdSet.md b/sdks/marketingsolutions_2024-07/docs/ResponsesAdSetIdV24Q1.md similarity index 71% rename from sdks/marketingsolutions_2023-04/docs/ResponsesReadAdSet.md rename to sdks/marketingsolutions_2024-07/docs/ResponsesAdSetIdV24Q1.md index a332ae76..a5807292 100644 --- a/sdks/marketingsolutions_2023-04/docs/ResponsesReadAdSet.md +++ b/sdks/marketingsolutions_2024-07/docs/ResponsesAdSetIdV24Q1.md @@ -1,6 +1,6 @@ -# ResponsesReadAdSet +# ResponsesAdSetIdV24Q1 List of output resources @@ -8,7 +8,7 @@ List of output resources | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**data** | [**List<ReadModelReadAdSet>**](ReadModelReadAdSet.md) | | [optional] [readonly] | +|**data** | [**List<ReadModelAdSetIdV24Q1>**](ReadModelAdSetIdV24Q1.md) | | [optional] [readonly] | |**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | |**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | diff --git a/sdks/marketingsolutions_2023-04/docs/CampaignListResponse.md b/sdks/marketingsolutions_2024-07/docs/ResponsesReadAdSetV24Q1.md similarity index 71% rename from sdks/marketingsolutions_2023-04/docs/CampaignListResponse.md rename to sdks/marketingsolutions_2024-07/docs/ResponsesReadAdSetV24Q1.md index e6f20c64..5b65a17a 100644 --- a/sdks/marketingsolutions_2023-04/docs/CampaignListResponse.md +++ b/sdks/marketingsolutions_2024-07/docs/ResponsesReadAdSetV24Q1.md @@ -1,6 +1,6 @@ -# CampaignListResponse +# ResponsesReadAdSetV24Q1 List of output resources @@ -8,7 +8,7 @@ List of output resources | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**data** | [**List<CampaignReadResource>**](CampaignReadResource.md) | | [optional] [readonly] | +|**data** | [**List<ReadModelReadAdSetV24Q1>**](ReadModelReadAdSetV24Q1.md) | | [optional] [readonly] | |**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | |**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | diff --git a/sdks/marketingsolutions_2024-07/docs/RetargetingCreateV1.md b/sdks/marketingsolutions_2024-07/docs/RetargetingCreateV1.md new file mode 100644 index 00000000..8d28dd9c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/RetargetingCreateV1.md @@ -0,0 +1,26 @@ + + +# RetargetingCreateV1 + +Settings to target users based on its type and days since last visit. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**visitorsType** | [**VisitorsTypeEnum**](#VisitorsTypeEnum) | Types of visitors. | | +|**daysSinceLastVisitMin** | **Integer** | Minimum number of days since last visit to partner. | | +|**daysSinceLastVisitMax** | **Integer** | Maximum number of days since last visit to partner. | | + + + +## Enum: VisitorsTypeEnum + +| Name | Value | +|---- | -----| +| ALL | "All" | +| BUYERS | "Buyers" | +| NONBUYERS | "NonBuyers" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/RetargetingUpdateV1.md b/sdks/marketingsolutions_2024-07/docs/RetargetingUpdateV1.md new file mode 100644 index 00000000..349087ab --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/RetargetingUpdateV1.md @@ -0,0 +1,26 @@ + + +# RetargetingUpdateV1 + +Settings to target users based on its type and days since last visit. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**visitorsType** | [**VisitorsTypeEnum**](#VisitorsTypeEnum) | Types of visitors. | [optional] | +|**daysSinceLastVisitMin** | **Integer** | Minimum number of days since last visit to partner. | [optional] | +|**daysSinceLastVisitMax** | **Integer** | Maximum number of days since last visit to partner. | [optional] | + + + +## Enum: VisitorsTypeEnum + +| Name | Value | +|---- | -----| +| ALL | "All" | +| BUYERS | "Buyers" | +| NONBUYERS | "NonBuyers" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/RetargetingV1.md b/sdks/marketingsolutions_2024-07/docs/RetargetingV1.md new file mode 100644 index 00000000..d0337fd6 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/RetargetingV1.md @@ -0,0 +1,27 @@ + + +# RetargetingV1 + +Settings to target users based on its type and days since last visit. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**visitorsType** | [**VisitorsTypeEnum**](#VisitorsTypeEnum) | Types of visitors. | [optional] | +|**daysSinceLastVisitMin** | **Integer** | Minimum number of days since last visit to partner. | [optional] | +|**daysSinceLastVisitMax** | **Integer** | Maximum number of days since last visit to partner. | [optional] | + + + +## Enum: VisitorsTypeEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "Unknown" | +| ALL | "All" | +| BUYERS | "Buyers" | +| NONBUYERS | "NonBuyers" | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/Size.md b/sdks/marketingsolutions_2024-07/docs/Size.md new file mode 100644 index 00000000..eabcb400 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/Size.md @@ -0,0 +1,15 @@ + + +# Size + +Size entity containing width and height of the creative + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**width** | **Integer** | | [optional] | +|**height** | **Integer** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/StatisticsReportQueryMessage.md b/sdks/marketingsolutions_2024-07/docs/StatisticsReportQueryMessage.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/StatisticsReportQueryMessage.md rename to sdks/marketingsolutions_2024-07/docs/StatisticsReportQueryMessage.md diff --git a/sdks/marketingsolutions_2024-07/docs/Tag.md b/sdks/marketingsolutions_2024-07/docs/Tag.md new file mode 100644 index 00000000..9549241a --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/Tag.md @@ -0,0 +1,15 @@ + + +# Tag + +Entity specifying the html of the tag and its size + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**htmlTag** | **String** | Html tag | [optional] | +|**size** | [**Size**](Size.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/TransactionsReportQueryDataMessage.md b/sdks/marketingsolutions_2024-07/docs/TransactionsReportQueryDataMessage.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/TransactionsReportQueryDataMessage.md rename to sdks/marketingsolutions_2024-07/docs/TransactionsReportQueryDataMessage.md diff --git a/sdks/marketingsolutions_2023-04/docs/TransactionsReportQueryEntityMessage.md b/sdks/marketingsolutions_2024-07/docs/TransactionsReportQueryEntityMessage.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/TransactionsReportQueryEntityMessage.md rename to sdks/marketingsolutions_2024-07/docs/TransactionsReportQueryEntityMessage.md diff --git a/sdks/marketingsolutions_2023-04/docs/TransactionsReportQueryMessage.md b/sdks/marketingsolutions_2024-07/docs/TransactionsReportQueryMessage.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/TransactionsReportQueryMessage.md rename to sdks/marketingsolutions_2024-07/docs/TransactionsReportQueryMessage.md diff --git a/sdks/marketingsolutions_2023-04/docs/TransparencyQueryMessage.md b/sdks/marketingsolutions_2024-07/docs/TransparencyQueryMessage.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/TransparencyQueryMessage.md rename to sdks/marketingsolutions_2024-07/docs/TransparencyQueryMessage.md diff --git a/sdks/marketingsolutions_2023-04/docs/TransparencyReportAttributes.md b/sdks/marketingsolutions_2024-07/docs/TransparencyReportAttributes.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/TransparencyReportAttributes.md rename to sdks/marketingsolutions_2024-07/docs/TransparencyReportAttributes.md diff --git a/sdks/marketingsolutions_2023-04/docs/TransparencyReportDataMessage.md b/sdks/marketingsolutions_2024-07/docs/TransparencyReportDataMessage.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/TransparencyReportDataMessage.md rename to sdks/marketingsolutions_2024-07/docs/TransparencyReportDataMessage.md diff --git a/sdks/marketingsolutions_2023-04/docs/TransparencyReportEntityMessage.md b/sdks/marketingsolutions_2024-07/docs/TransparencyReportEntityMessage.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/TransparencyReportEntityMessage.md rename to sdks/marketingsolutions_2024-07/docs/TransparencyReportEntityMessage.md diff --git a/sdks/marketingsolutions_2023-04/docs/TransparencyReportFile.md b/sdks/marketingsolutions_2024-07/docs/TransparencyReportFile.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/TransparencyReportFile.md rename to sdks/marketingsolutions_2024-07/docs/TransparencyReportFile.md diff --git a/sdks/marketingsolutions_2024-07/docs/UpdateCoupon.md b/sdks/marketingsolutions_2024-07/docs/UpdateCoupon.md new file mode 100644 index 00000000..7bc935eb --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/UpdateCoupon.md @@ -0,0 +1,15 @@ + + +# UpdateCoupon + +Entity to edit a Coupon + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startDate** | **String** | The date when the Coupon will be launched String must be in ISO8601 format | | +|**endDate** | **String** | The date when when we will stop to show this Coupon. If the end date is not specified (i.e. null) then the Coupon will go on forever String must be in ISO8601 format | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/UpdateCouponRequest.md b/sdks/marketingsolutions_2024-07/docs/UpdateCouponRequest.md new file mode 100644 index 00000000..c5d8c513 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/UpdateCouponRequest.md @@ -0,0 +1,14 @@ + + +# UpdateCouponRequest + +Data model for input resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**UpdateCouponResource**](UpdateCouponResource.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/UpdateCouponResource.md b/sdks/marketingsolutions_2024-07/docs/UpdateCouponResource.md new file mode 100644 index 00000000..ef188440 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/UpdateCouponResource.md @@ -0,0 +1,16 @@ + + +# UpdateCouponResource + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**UpdateCoupon**](UpdateCoupon.md) | | [optional] | +|**id** | **String** | | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_2024-07/docs/VideoDetail.md b/sdks/marketingsolutions_2024-07/docs/VideoDetail.md new file mode 100644 index 00000000..6b2c80a9 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/docs/VideoDetail.md @@ -0,0 +1,26 @@ + + +# VideoDetail + +Entity consists of the url of the video, its duration and its shape. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**duration** | **Double** | The duration of the video in milliseconds, the video could be trimmed if it is longer than 30000 ms. | | +|**shape** | [**ShapeEnum**](#ShapeEnum) | Shape of the video | | +|**url** | **URI** | URL of the video uploaded on demostatic.criteo.com when deploying and then static.criteo.net | | + + + +## Enum: ShapeEnum + +| Name | Value | +|---- | -----| +| HORIZONTAL | "Horizontal" | +| VERTICAL | "Vertical" | +| SQUARE | "Square" | + + + diff --git a/sdks/marketingsolutions_2023-04/docs/WriteModelAdSetId.md b/sdks/marketingsolutions_2024-07/docs/WriteModelAdSetId.md similarity index 100% rename from sdks/marketingsolutions_2023-04/docs/WriteModelAdSetId.md rename to sdks/marketingsolutions_2024-07/docs/WriteModelAdSetId.md diff --git a/sdks/marketingsolutions_2023-04/docs/WriteModelPatchAdSet.md b/sdks/marketingsolutions_2024-07/docs/WriteModelPatchAdSetV24Q1.md similarity index 72% rename from sdks/marketingsolutions_2023-04/docs/WriteModelPatchAdSet.md rename to sdks/marketingsolutions_2024-07/docs/WriteModelPatchAdSetV24Q1.md index aa10f6ea..dd630469 100644 --- a/sdks/marketingsolutions_2023-04/docs/WriteModelPatchAdSet.md +++ b/sdks/marketingsolutions_2024-07/docs/WriteModelPatchAdSetV24Q1.md @@ -1,6 +1,6 @@ -# WriteModelPatchAdSet +# WriteModelPatchAdSetV24Q1 write model data for resources @@ -10,7 +10,7 @@ write model data for resources |------------ | ------------- | ------------- | -------------| |**id** | **String** | Id of the entity | [optional] | |**type** | **String** | Canonical type name of the entity | [optional] | -|**attributes** | [**PatchAdSet**](PatchAdSet.md) | | [optional] | +|**attributes** | [**PatchAdSetV24Q1**](PatchAdSetV24Q1.md) | | [optional] | diff --git a/sdks/marketingsolutions_2023-04/gradle/wrapper/gradle-wrapper.jar b/sdks/marketingsolutions_2024-07/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from sdks/marketingsolutions_2023-04/gradle/wrapper/gradle-wrapper.jar rename to sdks/marketingsolutions_2024-07/gradle/wrapper/gradle-wrapper.jar diff --git a/sdks/marketingsolutions_2023-04/gradle/wrapper/gradle-wrapper.properties b/sdks/marketingsolutions_2024-07/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from sdks/marketingsolutions_2023-04/gradle/wrapper/gradle-wrapper.properties rename to sdks/marketingsolutions_2024-07/gradle/wrapper/gradle-wrapper.properties diff --git a/sdks/marketingsolutions_2023-04/gradlew b/sdks/marketingsolutions_2024-07/gradlew similarity index 100% rename from sdks/marketingsolutions_2023-04/gradlew rename to sdks/marketingsolutions_2024-07/gradlew diff --git a/sdks/marketingsolutions_2023-04/gradlew.bat b/sdks/marketingsolutions_2024-07/gradlew.bat similarity index 100% rename from sdks/marketingsolutions_2023-04/gradlew.bat rename to sdks/marketingsolutions_2024-07/gradlew.bat diff --git a/sdks/marketingsolutions_2023-04/settings.gradle b/sdks/marketingsolutions_2024-07/settings.gradle similarity index 100% rename from sdks/marketingsolutions_2023-04/settings.gradle rename to sdks/marketingsolutions_2024-07/settings.gradle diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiCallback.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiCallback.java similarity index 94% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiCallback.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiCallback.java index d7d33529..32e93891 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiCallback.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiCallback.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; import java.io.IOException; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiClient.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiClient.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiClient.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiClient.java index ab30a8e7..cf5dd233 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiClient.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiClient.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; import okhttp3.*; import okhttp3.internal.http.HttpMethod; @@ -52,13 +52,13 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import com.criteo.api.marketingsolutions.v2023_04.auth.Authentication; -import com.criteo.api.marketingsolutions.v2023_04.auth.HttpBasicAuth; -import com.criteo.api.marketingsolutions.v2023_04.auth.HttpBearerAuth; -import com.criteo.api.marketingsolutions.v2023_04.auth.ApiKeyAuth; -import com.criteo.api.marketingsolutions.v2023_04.auth.OAuth; -import com.criteo.api.marketingsolutions.v2023_04.auth.RetryingOAuth; -import com.criteo.api.marketingsolutions.v2023_04.auth.OAuthFlow; +import com.criteo.api.marketingsolutions.v2024_07.auth.Authentication; +import com.criteo.api.marketingsolutions.v2024_07.auth.HttpBasicAuth; +import com.criteo.api.marketingsolutions.v2024_07.auth.HttpBearerAuth; +import com.criteo.api.marketingsolutions.v2024_07.auth.ApiKeyAuth; +import com.criteo.api.marketingsolutions.v2024_07.auth.OAuth; +import com.criteo.api.marketingsolutions.v2024_07.auth.RetryingOAuth; +import com.criteo.api.marketingsolutions.v2024_07.auth.OAuthFlow; /** *

ApiClient class.

@@ -213,7 +213,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2023.04.0.240626/java"); + setUserAgent("OpenAPI-Generator/2024.07.0.240731/java"); authentications = new HashMap(); } @@ -386,7 +386,7 @@ public DateFormat getDateFormat() { *

Setter for the field dateFormat.

* * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link com.criteo.api.marketingsolutions.v2023_04.ApiClient} object + * @return a {@link com.criteo.api.marketingsolutions.v2024_07.ApiClient} object */ public ApiClient setDateFormat(DateFormat dateFormat) { JSON.setDateFormat(dateFormat); @@ -397,7 +397,7 @@ public ApiClient setDateFormat(DateFormat dateFormat) { *

Set SqlDateFormat.

* * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link com.criteo.api.marketingsolutions.v2023_04.ApiClient} object + * @return a {@link com.criteo.api.marketingsolutions.v2024_07.ApiClient} object */ public ApiClient setSqlDateFormat(DateFormat dateFormat) { JSON.setSqlDateFormat(dateFormat); @@ -408,7 +408,7 @@ public ApiClient setSqlDateFormat(DateFormat dateFormat) { *

Set OffsetDateTimeFormat.

* * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link com.criteo.api.marketingsolutions.v2023_04.ApiClient} object + * @return a {@link com.criteo.api.marketingsolutions.v2024_07.ApiClient} object */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { JSON.setOffsetDateTimeFormat(dateFormat); @@ -419,7 +419,7 @@ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { *

Set LocalDateFormat.

* * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link com.criteo.api.marketingsolutions.v2023_04.ApiClient} object + * @return a {@link com.criteo.api.marketingsolutions.v2024_07.ApiClient} object */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { JSON.setLocalDateFormat(dateFormat); @@ -430,7 +430,7 @@ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { *

Set LenientOnJson.

* * @param lenientOnJson a boolean - * @return a {@link com.criteo.api.marketingsolutions.v2023_04.ApiClient} object + * @return a {@link com.criteo.api.marketingsolutions.v2024_07.ApiClient} object */ public ApiClient setLenientOnJson(boolean lenientOnJson) { JSON.setLenientOnJson(lenientOnJson); @@ -944,7 +944,7 @@ public String escapeString(String str) { * @param response HTTP response * @param returnType The type of the Java object * @return The deserialized Java object - * @throws com.criteo.api.marketingsolutions.v2023_04.ApiException If fail to deserialize response body, i.e. cannot read response body + * @throws com.criteo.api.marketingsolutions.v2024_07.ApiException If fail to deserialize response body, i.e. cannot read response body * or the Content-Type of the response is not supported. */ @SuppressWarnings("unchecked") @@ -1005,7 +1005,7 @@ public T deserialize(Response response, Type returnType) throws ApiException * @param obj The Java object * @param contentType The request Content-Type * @return The serialized request body - * @throws com.criteo.api.marketingsolutions.v2023_04.ApiException If fail to serialize the given object + * @throws com.criteo.api.marketingsolutions.v2024_07.ApiException If fail to serialize the given object */ public RequestBody serialize(Object obj, String contentType) throws ApiException { if (obj instanceof byte[]) { @@ -1035,7 +1035,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException * Download file from the given response. * * @param response An instance of the Response object - * @throws com.criteo.api.marketingsolutions.v2023_04.ApiException If fail to read file content from response and write to disk + * @throws com.criteo.api.marketingsolutions.v2024_07.ApiException If fail to read file content from response and write to disk * @return Downloaded file */ public File downloadFileFromResponse(Response response) throws ApiException { @@ -1099,7 +1099,7 @@ public File prepareDownloadFile(Response response) throws IOException { * @param Type * @param call An instance of the Call object * @return ApiResponse<T> - * @throws com.criteo.api.marketingsolutions.v2023_04.ApiException If fail to execute the call + * @throws com.criteo.api.marketingsolutions.v2024_07.ApiException If fail to execute the call */ public ApiResponse execute(Call call) throws ApiException { return execute(call, null); @@ -1114,7 +1114,7 @@ public ApiResponse execute(Call call) throws ApiException { * @return ApiResponse object containing response status, headers and * data, which is a Java object deserialized from response body and would be null * when returnType is null. - * @throws com.criteo.api.marketingsolutions.v2023_04.ApiException If fail to execute the call + * @throws com.criteo.api.marketingsolutions.v2024_07.ApiException If fail to execute the call */ public ApiResponse execute(Call call, Type returnType) throws ApiException { try { @@ -1178,7 +1178,7 @@ public void onResponse(Call call, Response response) throws IOException { * @param response Response * @param returnType Return type * @return Type - * @throws com.criteo.api.marketingsolutions.v2023_04.ApiException If the response has an unsuccessful status code or + * @throws com.criteo.api.marketingsolutions.v2024_07.ApiException If the response has an unsuccessful status code or * fail to deserialize the response body */ public T handleResponse(Response response, Type returnType) throws ApiException { @@ -1225,7 +1225,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP call - * @throws com.criteo.api.marketingsolutions.v2023_04.ApiException If fail to serialize the request body object + * @throws com.criteo.api.marketingsolutions.v2024_07.ApiException If fail to serialize the request body object */ public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); @@ -1248,7 +1248,7 @@ public Call buildCall(String baseUrl, String path, String method, List que * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP request - * @throws com.criteo.api.marketingsolutions.v2023_04.ApiException If fail to serialize the request body object + * @throws com.criteo.api.marketingsolutions.v2024_07.ApiException If fail to serialize the request body object */ public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams @@ -1411,7 +1411,7 @@ public void processCookieParams(Map cookieParams, Request.Builde * @param payload HTTP request body * @param method HTTP method * @param uri URI - * @throws com.criteo.api.marketingsolutions.v2023_04.ApiException If fails to update the parameters + * @throws com.criteo.api.marketingsolutions.v2024_07.ApiException If fails to update the parameters */ public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { @@ -1622,7 +1622,7 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti * * @param requestBody The HTTP request object * @return The string representation of the HTTP request body - * @throws com.criteo.api.marketingsolutions.v2023_04.ApiException If fail to serialize the request body object into a string + * @throws com.criteo.api.marketingsolutions.v2024_07.ApiException If fail to serialize the request body object into a string */ private String requestBodyToString(RequestBody requestBody) throws ApiException { if (requestBody != null) { diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiClientBuilder.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiClientBuilder.java similarity index 87% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiClientBuilder.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiClientBuilder.java index 83c70921..c87c4c7e 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiClientBuilder.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiClientBuilder.java @@ -1,4 +1,4 @@ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; import java.util.Map; import java.util.HashMap; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiException.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiException.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiException.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiException.java index d622bc06..1b5aaba1 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiException.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiException.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; import java.util.Map; import java.util.List; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiResponse.java similarity index 94% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiResponse.java index 3075b232..b8727e7e 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ApiResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ApiResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; import java.util.List; import java.util.Map; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/Configuration.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/Configuration.java similarity index 90% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/Configuration.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/Configuration.java index 2a5791fc..56022b2f 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/Configuration.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/Configuration.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/GzipRequestInterceptor.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/GzipRequestInterceptor.java similarity index 96% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/GzipRequestInterceptor.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/GzipRequestInterceptor.java index 3de950f3..4ef45369 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/GzipRequestInterceptor.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/GzipRequestInterceptor.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; import okhttp3.*; import okio.Buffer; diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/JSON.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/JSON.java new file mode 100644 index 00000000..ddf97514 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/JSON.java @@ -0,0 +1,645 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.internal.bind.util.ISO8601Utils; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonElement; +import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; + +import okio.ByteString; + +import java.io.IOException; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.ParsePosition; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.HashMap; + +/* + * A JSON utility class + * + * NOTE: in the future, this class may be converted to static, which may break + * backward-compatibility + */ +public class JSON { + private static Gson gson; + private static boolean isLenientOnJson = false; + private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + + @SuppressWarnings("unchecked") + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder() + ; + GsonBuilder builder = fireBuilder.createGsonBuilder(); + return builder; + } + + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if (null == element) { + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + /** + * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. + * + * @param classByDiscriminatorValue The map of discriminator values to Java classes. + * @param discriminatorValue The value of the OpenAPI discriminator in the input data. + * @return The Java class that implements the OpenAPI schema + */ + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); + if (null == clazz) { + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + + { + GsonBuilder gsonBuilder = createGson(); + gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); + gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); + gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); + gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.Ad.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetAudienceLinkEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetAudienceLinkEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetAudienceLinkEntityV1Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetAudienceLinkInputEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetCategoryBid.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetCategoryBidListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetCategoryBidResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetDeliveryLimitationsV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetDisplayMultiplier.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetDisplayMultiplierListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetDisplayMultiplierResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetFrequencyCappingV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetGeoLocationV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetSearchFilterV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetSearchRequestV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetTargetingRuleV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdSetTargetingV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdWrite.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdWriteRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdWriteResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdaptiveAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdaptiveColors.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AdaptiveWriteAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AlgebraNodeV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ApplicationSummaryModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ApplicationSummaryModelResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ApplicationSummaryModelResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceBulkCreateInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceBulkDeleteInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceBulkUpdateInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceComputeSizeEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceComputeSizesInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceCreateEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceCreateEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceDeleteEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceEntityV1AudienceSearchMetadataV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceEntityV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceError.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceEstimateSizeEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceEstimateSizeEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceEstimateSizeInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceIdEntityV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceIdEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceNameDescription.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSearchEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSearchEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSearchInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSearchMetadataV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentBulkCreateInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentBulkDeleteInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentBulkUpdateInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentComputeSizeEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentComputeSizesInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentCreateEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentCreateEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentDeleteEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentEntityV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentEstimateSizeInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentIdEntityV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentIdEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSearchEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSearchEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSearchInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSearchMetadataV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEntityV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEstimationEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEstimationEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEstimationV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEstimationV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEstimationV1Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentUpdateEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentUpdateEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSizeEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSizeEntityV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSizeEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSizeEstimationV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSizeEstimationV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceSizeEstimationV1Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceUpdateEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceUpdateEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.AudienceWarning.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.BasicAudienceDefinition.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.BehavioralV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CampaignSearchFiltersV23Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CampaignSearchRequestV23Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CampaignSpendLimitV23Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CampaignV23Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CampaignV23Q1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CampaignV23Q1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CampaignV23Q1Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ContactListStatisticsEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ContactListStatisticsEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ContactListStatisticsEntityV1Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ContactListV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ContactlistAmendment.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ContactlistAmendmentAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ContactlistAmendmentRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ContactlistOperation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ContactlistOperationAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.Coupon.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CouponListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CouponResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CouponResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CouponSupportedSizes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CouponSupportedSizesResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CouponSupportedSizesResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetBiddingV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetBudgetV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetGeoLocationV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetScheduleV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetTargetingV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetV24Q1Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetV24Q1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateCampaign.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateCampaignRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateCampaignResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateCampaignSpendLimit.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateCoupon.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateCouponRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateCouponResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreateImageSlide.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.Creative.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreativeListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreativeResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreativeResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreativeWrite.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreativeWriteRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CreativeWriteResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CriteoApiError.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.CriteoApiWarning.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.DeleteAudienceContactListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.DynamicAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.DynamicWriteAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.EntityOfPortfolioMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ErrorCodeResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.GetPortfolioResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.HtmlTagAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.HtmlTagWriteAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ImageAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ImageSet.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ImageSetBase64.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ImageShape.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ImageSlide.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ImageWriteAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.InMarketAudienceSegmentBrandEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.InMarketAudienceSegmentBrandEntityV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.InMarketAudienceSegmentBrandEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.InMarketAudienceSegmentInterestEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.InMarketAudienceSegmentInterestEntityV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.InMarketAudienceSegmentInterestEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.InMarketCreateV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.InMarketSizeEstimationV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.InMarketUpdateV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.InMarketV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.LocationCreateV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.LocationSizeEstimationV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.LocationUpdateV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.LocationV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.LookalikeCreateV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.LookalikeUpdateV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.LookalikeV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ModifyAudienceResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.NillableAdSetTargetingRuleV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.NillableAdSetTargetingRuleV24Q1Value.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.NillableDateTime.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.NillableDecimal.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.NillableGenderV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.NillableInt32.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.NillableString.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetBiddingV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetBudgetV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetCategoryBid.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetCategoryBidListRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetCategoryBidResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetCategoryBidResultListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetCategoryBidResultResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetDisplayMultiplier.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetDisplayMultiplierListRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetDisplayMultiplierResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetDisplayMultiplierResultListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetDisplayMultiplierResultResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetSchedulingV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchCampaign.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchCampaignListRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchCampaignSpendLimit.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchCampaignWriteResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchResultCampaignListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PatchResultCampaignReadResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PlacementsReportQueryDataMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PlacementsReportQueryEntityMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PlacementsReportQueryMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PointOfInterestV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.PortfolioMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ProblemDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ProblemsDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ProspectingCreateV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ProspectingUpdateV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ProspectingV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ReadAdSetBiddingV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ReadAdSetBudgetV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ReadAdSetScheduleV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ReadAdSetV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ReadModelAdSetId.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ReadModelAdSetIdV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ReadModelReadAdSetV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.RequestsAdSetId.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.RequestsPatchAdSetV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ResponseReadAdSetV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ResponsesAdSetId.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ResponsesAdSetIdV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.ResponsesReadAdSetV24Q1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.RetargetingCreateV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.RetargetingUpdateV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.RetargetingV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.Size.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.StatisticsReportQueryMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.Tag.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.TransactionsReportQueryDataMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.TransactionsReportQueryEntityMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.TransactionsReportQueryMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.TransparencyQueryMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.TransparencyReportAttributes.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.TransparencyReportDataMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.TransparencyReportEntityMessage.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.TransparencyReportFile.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.UpdateCoupon.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.UpdateCouponRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.UpdateCouponResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.VideoDetail.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.WriteModelAdSetId.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.v2024_07.model.WriteModelPatchAdSetV24Q1.CustomTypeAdapterFactory()); + gson = gsonBuilder.create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public static Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + */ + public static void setGson(Gson gson) { + JSON.gson = gson; + } + + public static void setLenientOnJson(boolean lenientOnJson) { + isLenientOnJson = lenientOnJson; + } + + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public static String serialize(Object obj) { + return gson.toJson(obj); + } + + /** + * Deserialize the given JSON string to Java object. + * + * @param Type + * @param body The JSON string + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public static T deserialize(String body, Type returnType) { + try { + if (isLenientOnJson) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(body, returnType); + } + } catch (JsonParseException e) { + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + if (returnType.equals(String.class)) { + return (T) body; + } else { + throw (e); + } + } + } + + /** + * Gson TypeAdapter for Byte Array type + */ + public static class ByteArrayAdapter extends TypeAdapter { + + @Override + public void write(JsonWriter out, byte[] value) throws IOException { + if (value == null) { + out.nullValue(); + } else { + out.value(ByteString.of(value).base64()); + } + } + + @Override + public byte[] read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String bytesAsBase64 = in.nextString(); + ByteString byteString = ByteString.decodeBase64(bytesAsBase64); + return byteString.toByteArray(); + } + } + } + + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } + } + + /** + * Gson TypeAdapter for JSR310 LocalDate type + */ + public static class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } + } + + public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + } + + public static void setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + } + + /** + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() {} + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } + } + + /** + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, ISO8601Utils will be used. + */ + public static class DateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public DateTypeAdapter() {} + + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = ISO8601Utils.format(date, true); + } + out.value(value); + } + } + + @Override + public Date read(JsonReader in) throws IOException { + try { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } + + public static void setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + } + + public static void setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + } +} diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/Pair.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/Pair.java similarity index 91% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/Pair.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/Pair.java index b3c0ed4a..63687443 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/Pair.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/Pair.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Pair { diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ProgressRequestBody.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ProgressRequestBody.java similarity index 94% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ProgressRequestBody.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ProgressRequestBody.java index d5b0cbc7..c5981ced 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ProgressRequestBody.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ProgressRequestBody.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; import okhttp3.MediaType; import okhttp3.RequestBody; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ProgressResponseBody.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ProgressResponseBody.java similarity index 94% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ProgressResponseBody.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ProgressResponseBody.java index f21d63dd..d4ce2613 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ProgressResponseBody.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ProgressResponseBody.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; import okhttp3.MediaType; import okhttp3.ResponseBody; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ServerConfiguration.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ServerConfiguration.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ServerConfiguration.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ServerConfiguration.java index 333c3098..fc8f8424 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ServerConfiguration.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ServerConfiguration.java @@ -1,4 +1,4 @@ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; import java.util.Map; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ServerVariable.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ServerVariable.java similarity index 93% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ServerVariable.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ServerVariable.java index f9e060fb..e719d1b2 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/ServerVariable.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/ServerVariable.java @@ -1,4 +1,4 @@ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; import java.util.HashSet; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/StringUtil.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/StringUtil.java similarity index 95% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/StringUtil.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/StringUtil.java index 91729cfd..301055d6 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/StringUtil.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/StringUtil.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; import java.util.Collection; import java.util.Iterator; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/AdvertiserApi.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/AdvertiserApi.java similarity index 90% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/AdvertiserApi.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/AdvertiserApi.java index 761fb183..9da8d972 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/AdvertiserApi.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/AdvertiserApi.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,23 +11,23 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.api; +package com.criteo.api.marketingsolutions.v2024_07.api; -import com.criteo.api.marketingsolutions.v2023_04.ApiCallback; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.ApiResponse; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.Pair; -import com.criteo.api.marketingsolutions.v2023_04.ProgressRequestBody; -import com.criteo.api.marketingsolutions.v2023_04.ProgressResponseBody; +import com.criteo.api.marketingsolutions.v2024_07.ApiCallback; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.ApiResponse; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.Pair; +import com.criteo.api.marketingsolutions.v2024_07.ProgressRequestBody; +import com.criteo.api.marketingsolutions.v2024_07.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; -import com.criteo.api.marketingsolutions.v2023_04.model.GetPortfolioResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.GetPortfolioResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -102,7 +102,7 @@ public okhttp3.Call apiPortfolioGetCall(final ApiCallback _callback) throws ApiE Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/advertisers/me"; + String localVarPath = "/2024-07/advertisers/me"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/AnalyticsApi.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/AnalyticsApi.java similarity index 95% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/AnalyticsApi.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/AnalyticsApi.java index d6232479..6d990368 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/AnalyticsApi.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/AnalyticsApi.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,16 +11,16 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.api; +package com.criteo.api.marketingsolutions.v2024_07.api; -import com.criteo.api.marketingsolutions.v2023_04.ApiCallback; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.ApiResponse; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.Pair; -import com.criteo.api.marketingsolutions.v2023_04.ProgressRequestBody; -import com.criteo.api.marketingsolutions.v2023_04.ProgressResponseBody; +import com.criteo.api.marketingsolutions.v2024_07.ApiCallback; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.ApiResponse; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.Pair; +import com.criteo.api.marketingsolutions.v2024_07.ProgressRequestBody; +import com.criteo.api.marketingsolutions.v2024_07.ProgressResponseBody; import com.google.gson.reflect.TypeToken; @@ -28,12 +28,12 @@ import java.io.File; -import com.criteo.api.marketingsolutions.v2023_04.model.PlacementsReportQueryDataMessage; -import com.criteo.api.marketingsolutions.v2023_04.model.ProblemsDetails; -import com.criteo.api.marketingsolutions.v2023_04.model.StatisticsReportQueryMessage; -import com.criteo.api.marketingsolutions.v2023_04.model.TransactionsReportQueryDataMessage; -import com.criteo.api.marketingsolutions.v2023_04.model.TransparencyQueryMessage; -import com.criteo.api.marketingsolutions.v2023_04.model.TransparencyReportDataMessage; +import com.criteo.api.marketingsolutions.v2024_07.model.PlacementsReportQueryDataMessage; +import com.criteo.api.marketingsolutions.v2024_07.model.ProblemsDetails; +import com.criteo.api.marketingsolutions.v2024_07.model.StatisticsReportQueryMessage; +import com.criteo.api.marketingsolutions.v2024_07.model.TransactionsReportQueryDataMessage; +import com.criteo.api.marketingsolutions.v2024_07.model.TransparencyQueryMessage; +import com.criteo.api.marketingsolutions.v2024_07.model.TransparencyReportDataMessage; import java.lang.reflect.Type; import java.util.ArrayList; @@ -110,7 +110,7 @@ public okhttp3.Call getAdsetReportCall(StatisticsReportQueryMessage statisticsRe Object localVarPostBody = statisticsReportQueryMessage; // create path and map variables - String localVarPath = "/2023-04/statistics/report"; + String localVarPath = "/2024-07/statistics/report"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -244,7 +244,7 @@ public okhttp3.Call getPlacementsReportCall(PlacementsReportQueryDataMessage pla Object localVarPostBody = placementsReportQueryDataMessage; // create path and map variables - String localVarPath = "/2023-04/placements/report"; + String localVarPath = "/2024-07/placements/report"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -378,7 +378,7 @@ public okhttp3.Call getTransactionsReportCall(TransactionsReportQueryDataMessage Object localVarPostBody = transactionsReportQueryDataMessage; // create path and map variables - String localVarPath = "/2023-04/transactions/report"; + String localVarPath = "/2024-07/transactions/report"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -513,7 +513,7 @@ public okhttp3.Call getTransparencyReportCall(Integer advertiserId, Transparency Object localVarPostBody = transparencyQueryMessage; // create path and map variables - String localVarPath = "/2023-04/log-level/advertisers/{advertiser-id}/report" + String localVarPath = "/2024-07/log-level/advertisers/{advertiser-id}/report" .replace("{" + "advertiser-id" + "}", localVarApiClient.escapeString(advertiserId.toString())); List localVarQueryParams = new ArrayList(); diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/AudienceApi.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/AudienceApi.java new file mode 100644 index 00000000..1d5e2ccf --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/AudienceApi.java @@ -0,0 +1,2519 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.api; + +import com.criteo.api.marketingsolutions.v2024_07.ApiCallback; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.ApiResponse; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.Pair; +import com.criteo.api.marketingsolutions.v2024_07.ProgressRequestBody; +import com.criteo.api.marketingsolutions.v2024_07.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceBulkCreateInputV1; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceBulkDeleteInputV1; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceBulkUpdateInputV1; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceComputeSizesInputV1; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceEntityV1AudienceSearchMetadataV1ListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceEntityV1ListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceEstimateSizeInputV1; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceIdEntityV1ListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSearchInputV1; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentBulkCreateInputV1; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentBulkDeleteInputV1; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentBulkUpdateInputV1; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentComputeSizesInputV1; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentEntityV1ListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentEstimateSizeInputV1; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentIdEntityV1ListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSearchInputV1; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEntityV1ListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEstimationV1Response; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSizeEntityV1ListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSizeEstimationV1Response; +import com.criteo.api.marketingsolutions.v2024_07.model.ContactListStatisticsEntityV1Response; +import com.criteo.api.marketingsolutions.v2024_07.model.ContactlistAmendmentRequest; +import com.criteo.api.marketingsolutions.v2024_07.model.DeleteAudienceContactListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.ErrorCodeResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.InMarketAudienceSegmentBrandEntityV1ListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.InMarketAudienceSegmentInterestEntityV1ListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.ModifyAudienceResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class AudienceApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public AudienceApi() { + this(Configuration.getDefaultApiClient()); + } + + public AudienceApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for bulkCreateAudienceSegments + * @param audienceSegmentBulkCreateInputV1 Segment creation parameter (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkCreateAudienceSegmentsCall(AudienceSegmentBulkCreateInputV1 audienceSegmentBulkCreateInputV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = audienceSegmentBulkCreateInputV1; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audience-segments/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call bulkCreateAudienceSegmentsValidateBeforeCall(AudienceSegmentBulkCreateInputV1 audienceSegmentBulkCreateInputV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceSegmentBulkCreateInputV1' is set + if (audienceSegmentBulkCreateInputV1 == null) { + throw new ApiException("Missing the required parameter 'audienceSegmentBulkCreateInputV1' when calling bulkCreateAudienceSegments(Async)"); + } + + return bulkCreateAudienceSegmentsCall(audienceSegmentBulkCreateInputV1, _callback); + + } + + /** + * + * Creates all segments with a valid configuration, and returns their IDs. For those that cannot be created, one or multiple errors are returned. + * @param audienceSegmentBulkCreateInputV1 Segment creation parameter (required) + * @return AudienceSegmentEntityV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public AudienceSegmentEntityV1ListResponse bulkCreateAudienceSegments(AudienceSegmentBulkCreateInputV1 audienceSegmentBulkCreateInputV1) throws ApiException { + ApiResponse localVarResp = bulkCreateAudienceSegmentsWithHttpInfo(audienceSegmentBulkCreateInputV1); + return localVarResp.getData(); + } + + /** + * + * Creates all segments with a valid configuration, and returns their IDs. For those that cannot be created, one or multiple errors are returned. + * @param audienceSegmentBulkCreateInputV1 Segment creation parameter (required) + * @return ApiResponse<AudienceSegmentEntityV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse bulkCreateAudienceSegmentsWithHttpInfo(AudienceSegmentBulkCreateInputV1 audienceSegmentBulkCreateInputV1) throws ApiException { + okhttp3.Call localVarCall = bulkCreateAudienceSegmentsValidateBeforeCall(audienceSegmentBulkCreateInputV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Creates all segments with a valid configuration, and returns their IDs. For those that cannot be created, one or multiple errors are returned. + * @param audienceSegmentBulkCreateInputV1 Segment creation parameter (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkCreateAudienceSegmentsAsync(AudienceSegmentBulkCreateInputV1 audienceSegmentBulkCreateInputV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = bulkCreateAudienceSegmentsValidateBeforeCall(audienceSegmentBulkCreateInputV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for bulkCreateAudiences + * @param audienceBulkCreateInputV1 (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkCreateAudiencesCall(AudienceBulkCreateInputV1 audienceBulkCreateInputV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = audienceBulkCreateInputV1; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audiences/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call bulkCreateAudiencesValidateBeforeCall(AudienceBulkCreateInputV1 audienceBulkCreateInputV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceBulkCreateInputV1' is set + if (audienceBulkCreateInputV1 == null) { + throw new ApiException("Missing the required parameter 'audienceBulkCreateInputV1' when calling bulkCreateAudiences(Async)"); + } + + return bulkCreateAudiencesCall(audienceBulkCreateInputV1, _callback); + + } + + /** + * + * Creates all audiences with a valid configuration, and returns their IDs. For those that cannot be created, one or multiple errors are returned. + * @param audienceBulkCreateInputV1 (required) + * @return AudienceEntityV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public AudienceEntityV1ListResponse bulkCreateAudiences(AudienceBulkCreateInputV1 audienceBulkCreateInputV1) throws ApiException { + ApiResponse localVarResp = bulkCreateAudiencesWithHttpInfo(audienceBulkCreateInputV1); + return localVarResp.getData(); + } + + /** + * + * Creates all audiences with a valid configuration, and returns their IDs. For those that cannot be created, one or multiple errors are returned. + * @param audienceBulkCreateInputV1 (required) + * @return ApiResponse<AudienceEntityV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse bulkCreateAudiencesWithHttpInfo(AudienceBulkCreateInputV1 audienceBulkCreateInputV1) throws ApiException { + okhttp3.Call localVarCall = bulkCreateAudiencesValidateBeforeCall(audienceBulkCreateInputV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Creates all audiences with a valid configuration, and returns their IDs. For those that cannot be created, one or multiple errors are returned. + * @param audienceBulkCreateInputV1 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkCreateAudiencesAsync(AudienceBulkCreateInputV1 audienceBulkCreateInputV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = bulkCreateAudiencesValidateBeforeCall(audienceBulkCreateInputV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for bulkDeleteAudienceSegments + * @param audienceSegmentBulkDeleteInputV1 Segment delete request. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkDeleteAudienceSegmentsCall(AudienceSegmentBulkDeleteInputV1 audienceSegmentBulkDeleteInputV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = audienceSegmentBulkDeleteInputV1; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audience-segments/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call bulkDeleteAudienceSegmentsValidateBeforeCall(AudienceSegmentBulkDeleteInputV1 audienceSegmentBulkDeleteInputV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceSegmentBulkDeleteInputV1' is set + if (audienceSegmentBulkDeleteInputV1 == null) { + throw new ApiException("Missing the required parameter 'audienceSegmentBulkDeleteInputV1' when calling bulkDeleteAudienceSegments(Async)"); + } + + return bulkDeleteAudienceSegmentsCall(audienceSegmentBulkDeleteInputV1, _callback); + + } + + /** + * + * Delete the segments associated to the given audience IDs. + * @param audienceSegmentBulkDeleteInputV1 Segment delete request. (required) + * @return AudienceSegmentIdEntityV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public AudienceSegmentIdEntityV1ListResponse bulkDeleteAudienceSegments(AudienceSegmentBulkDeleteInputV1 audienceSegmentBulkDeleteInputV1) throws ApiException { + ApiResponse localVarResp = bulkDeleteAudienceSegmentsWithHttpInfo(audienceSegmentBulkDeleteInputV1); + return localVarResp.getData(); + } + + /** + * + * Delete the segments associated to the given audience IDs. + * @param audienceSegmentBulkDeleteInputV1 Segment delete request. (required) + * @return ApiResponse<AudienceSegmentIdEntityV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse bulkDeleteAudienceSegmentsWithHttpInfo(AudienceSegmentBulkDeleteInputV1 audienceSegmentBulkDeleteInputV1) throws ApiException { + okhttp3.Call localVarCall = bulkDeleteAudienceSegmentsValidateBeforeCall(audienceSegmentBulkDeleteInputV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Delete the segments associated to the given audience IDs. + * @param audienceSegmentBulkDeleteInputV1 Segment delete request. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkDeleteAudienceSegmentsAsync(AudienceSegmentBulkDeleteInputV1 audienceSegmentBulkDeleteInputV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = bulkDeleteAudienceSegmentsValidateBeforeCall(audienceSegmentBulkDeleteInputV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for bulkDeleteAudiences + * @param audienceBulkDeleteInputV1 (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
204 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkDeleteAudiencesCall(AudienceBulkDeleteInputV1 audienceBulkDeleteInputV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = audienceBulkDeleteInputV1; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audiences/delete"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call bulkDeleteAudiencesValidateBeforeCall(AudienceBulkDeleteInputV1 audienceBulkDeleteInputV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceBulkDeleteInputV1' is set + if (audienceBulkDeleteInputV1 == null) { + throw new ApiException("Missing the required parameter 'audienceBulkDeleteInputV1' when calling bulkDeleteAudiences(Async)"); + } + + return bulkDeleteAudiencesCall(audienceBulkDeleteInputV1, _callback); + + } + + /** + * + * Deletes the audiences associated to the given audience IDs. + * @param audienceBulkDeleteInputV1 (required) + * @return AudienceIdEntityV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
204 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public AudienceIdEntityV1ListResponse bulkDeleteAudiences(AudienceBulkDeleteInputV1 audienceBulkDeleteInputV1) throws ApiException { + ApiResponse localVarResp = bulkDeleteAudiencesWithHttpInfo(audienceBulkDeleteInputV1); + return localVarResp.getData(); + } + + /** + * + * Deletes the audiences associated to the given audience IDs. + * @param audienceBulkDeleteInputV1 (required) + * @return ApiResponse<AudienceIdEntityV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
204 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse bulkDeleteAudiencesWithHttpInfo(AudienceBulkDeleteInputV1 audienceBulkDeleteInputV1) throws ApiException { + okhttp3.Call localVarCall = bulkDeleteAudiencesValidateBeforeCall(audienceBulkDeleteInputV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Deletes the audiences associated to the given audience IDs. + * @param audienceBulkDeleteInputV1 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
204 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkDeleteAudiencesAsync(AudienceBulkDeleteInputV1 audienceBulkDeleteInputV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = bulkDeleteAudiencesValidateBeforeCall(audienceBulkDeleteInputV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for bulkUpdateAudienceSegments + * @param audienceSegmentBulkUpdateInputV1 Segment Update request (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkUpdateAudienceSegmentsCall(AudienceSegmentBulkUpdateInputV1 audienceSegmentBulkUpdateInputV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = audienceSegmentBulkUpdateInputV1; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audience-segments"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call bulkUpdateAudienceSegmentsValidateBeforeCall(AudienceSegmentBulkUpdateInputV1 audienceSegmentBulkUpdateInputV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceSegmentBulkUpdateInputV1' is set + if (audienceSegmentBulkUpdateInputV1 == null) { + throw new ApiException("Missing the required parameter 'audienceSegmentBulkUpdateInputV1' when calling bulkUpdateAudienceSegments(Async)"); + } + + return bulkUpdateAudienceSegmentsCall(audienceSegmentBulkUpdateInputV1, _callback); + + } + + /** + * + * Updates the properties of all segments with a valid configuration, and returns their IDs. For those that cannot be updated, one or multiple errors are returned. + * @param audienceSegmentBulkUpdateInputV1 Segment Update request (required) + * @return AudienceSegmentEntityV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public AudienceSegmentEntityV1ListResponse bulkUpdateAudienceSegments(AudienceSegmentBulkUpdateInputV1 audienceSegmentBulkUpdateInputV1) throws ApiException { + ApiResponse localVarResp = bulkUpdateAudienceSegmentsWithHttpInfo(audienceSegmentBulkUpdateInputV1); + return localVarResp.getData(); + } + + /** + * + * Updates the properties of all segments with a valid configuration, and returns their IDs. For those that cannot be updated, one or multiple errors are returned. + * @param audienceSegmentBulkUpdateInputV1 Segment Update request (required) + * @return ApiResponse<AudienceSegmentEntityV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse bulkUpdateAudienceSegmentsWithHttpInfo(AudienceSegmentBulkUpdateInputV1 audienceSegmentBulkUpdateInputV1) throws ApiException { + okhttp3.Call localVarCall = bulkUpdateAudienceSegmentsValidateBeforeCall(audienceSegmentBulkUpdateInputV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Updates the properties of all segments with a valid configuration, and returns their IDs. For those that cannot be updated, one or multiple errors are returned. + * @param audienceSegmentBulkUpdateInputV1 Segment Update request (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkUpdateAudienceSegmentsAsync(AudienceSegmentBulkUpdateInputV1 audienceSegmentBulkUpdateInputV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = bulkUpdateAudienceSegmentsValidateBeforeCall(audienceSegmentBulkUpdateInputV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for bulkUpdateAudiences + * @param audienceBulkUpdateInputV1 (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkUpdateAudiencesCall(AudienceBulkUpdateInputV1 audienceBulkUpdateInputV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = audienceBulkUpdateInputV1; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audiences"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call bulkUpdateAudiencesValidateBeforeCall(AudienceBulkUpdateInputV1 audienceBulkUpdateInputV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceBulkUpdateInputV1' is set + if (audienceBulkUpdateInputV1 == null) { + throw new ApiException("Missing the required parameter 'audienceBulkUpdateInputV1' when calling bulkUpdateAudiences(Async)"); + } + + return bulkUpdateAudiencesCall(audienceBulkUpdateInputV1, _callback); + + } + + /** + * + * Updates the properties of all audiences with a valid configuration, and returns their IDs. For those that cannot be updated, one or multiple errors are returned. + * @param audienceBulkUpdateInputV1 (required) + * @return AudienceEntityV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public AudienceEntityV1ListResponse bulkUpdateAudiences(AudienceBulkUpdateInputV1 audienceBulkUpdateInputV1) throws ApiException { + ApiResponse localVarResp = bulkUpdateAudiencesWithHttpInfo(audienceBulkUpdateInputV1); + return localVarResp.getData(); + } + + /** + * + * Updates the properties of all audiences with a valid configuration, and returns their IDs. For those that cannot be updated, one or multiple errors are returned. + * @param audienceBulkUpdateInputV1 (required) + * @return ApiResponse<AudienceEntityV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse bulkUpdateAudiencesWithHttpInfo(AudienceBulkUpdateInputV1 audienceBulkUpdateInputV1) throws ApiException { + okhttp3.Call localVarCall = bulkUpdateAudiencesValidateBeforeCall(audienceBulkUpdateInputV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Updates the properties of all audiences with a valid configuration, and returns their IDs. For those that cannot be updated, one or multiple errors are returned. + * @param audienceBulkUpdateInputV1 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkUpdateAudiencesAsync(AudienceBulkUpdateInputV1 audienceBulkUpdateInputV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = bulkUpdateAudiencesValidateBeforeCall(audienceBulkUpdateInputV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for computeAudienceSegmentsSizes + * @param audienceSegmentComputeSizesInputV1 (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call computeAudienceSegmentsSizesCall(AudienceSegmentComputeSizesInputV1 audienceSegmentComputeSizesInputV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = audienceSegmentComputeSizesInputV1; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audience-segments/compute-sizes"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call computeAudienceSegmentsSizesValidateBeforeCall(AudienceSegmentComputeSizesInputV1 audienceSegmentComputeSizesInputV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceSegmentComputeSizesInputV1' is set + if (audienceSegmentComputeSizesInputV1 == null) { + throw new ApiException("Missing the required parameter 'audienceSegmentComputeSizesInputV1' when calling computeAudienceSegmentsSizes(Async)"); + } + + return computeAudienceSegmentsSizesCall(audienceSegmentComputeSizesInputV1, _callback); + + } + + /** + * + * Gets the size of all segments. An error is returned for those whose size calculation is not supported. + * @param audienceSegmentComputeSizesInputV1 (required) + * @return AudienceSegmentSizeEntityV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public AudienceSegmentSizeEntityV1ListResponse computeAudienceSegmentsSizes(AudienceSegmentComputeSizesInputV1 audienceSegmentComputeSizesInputV1) throws ApiException { + ApiResponse localVarResp = computeAudienceSegmentsSizesWithHttpInfo(audienceSegmentComputeSizesInputV1); + return localVarResp.getData(); + } + + /** + * + * Gets the size of all segments. An error is returned for those whose size calculation is not supported. + * @param audienceSegmentComputeSizesInputV1 (required) + * @return ApiResponse<AudienceSegmentSizeEntityV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse computeAudienceSegmentsSizesWithHttpInfo(AudienceSegmentComputeSizesInputV1 audienceSegmentComputeSizesInputV1) throws ApiException { + okhttp3.Call localVarCall = computeAudienceSegmentsSizesValidateBeforeCall(audienceSegmentComputeSizesInputV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets the size of all segments. An error is returned for those whose size calculation is not supported. + * @param audienceSegmentComputeSizesInputV1 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call computeAudienceSegmentsSizesAsync(AudienceSegmentComputeSizesInputV1 audienceSegmentComputeSizesInputV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = computeAudienceSegmentsSizesValidateBeforeCall(audienceSegmentComputeSizesInputV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for computeAudiencesSizes + * @param audienceComputeSizesInputV1 (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call computeAudiencesSizesCall(AudienceComputeSizesInputV1 audienceComputeSizesInputV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = audienceComputeSizesInputV1; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audiences/compute-sizes"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call computeAudiencesSizesValidateBeforeCall(AudienceComputeSizesInputV1 audienceComputeSizesInputV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceComputeSizesInputV1' is set + if (audienceComputeSizesInputV1 == null) { + throw new ApiException("Missing the required parameter 'audienceComputeSizesInputV1' when calling computeAudiencesSizes(Async)"); + } + + return computeAudiencesSizesCall(audienceComputeSizesInputV1, _callback); + + } + + /** + * + * Gets the size of all audiences. An error is returned for those whose size calculation is not supported. + * @param audienceComputeSizesInputV1 (required) + * @return AudienceSizeEntityV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public AudienceSizeEntityV1ListResponse computeAudiencesSizes(AudienceComputeSizesInputV1 audienceComputeSizesInputV1) throws ApiException { + ApiResponse localVarResp = computeAudiencesSizesWithHttpInfo(audienceComputeSizesInputV1); + return localVarResp.getData(); + } + + /** + * + * Gets the size of all audiences. An error is returned for those whose size calculation is not supported. + * @param audienceComputeSizesInputV1 (required) + * @return ApiResponse<AudienceSizeEntityV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse computeAudiencesSizesWithHttpInfo(AudienceComputeSizesInputV1 audienceComputeSizesInputV1) throws ApiException { + okhttp3.Call localVarCall = computeAudiencesSizesValidateBeforeCall(audienceComputeSizesInputV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets the size of all audiences. An error is returned for those whose size calculation is not supported. + * @param audienceComputeSizesInputV1 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call computeAudiencesSizesAsync(AudienceComputeSizesInputV1 audienceComputeSizesInputV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = computeAudiencesSizesValidateBeforeCall(audienceComputeSizesInputV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteContactListIdentifiers + * @param audienceSegmentId The id of the contact list audience-segment to amend (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 The Contact List was emptied -
403 Forbidden -
+ */ + public okhttp3.Call deleteContactListIdentifiersCall(String audienceSegmentId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audience-segments/{audience-segment-id}/contact-list" + .replace("{" + "audience-segment-id" + "}", localVarApiClient.escapeString(audienceSegmentId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteContactListIdentifiersValidateBeforeCall(String audienceSegmentId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceSegmentId' is set + if (audienceSegmentId == null) { + throw new ApiException("Missing the required parameter 'audienceSegmentId' when calling deleteContactListIdentifiers(Async)"); + } + + return deleteContactListIdentifiersCall(audienceSegmentId, _callback); + + } + + /** + * + * Delete all identifiers from a contact list audience-segment. + * @param audienceSegmentId The id of the contact list audience-segment to amend (required) + * @return DeleteAudienceContactListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 The Contact List was emptied -
403 Forbidden -
+ */ + public DeleteAudienceContactListResponse deleteContactListIdentifiers(String audienceSegmentId) throws ApiException { + ApiResponse localVarResp = deleteContactListIdentifiersWithHttpInfo(audienceSegmentId); + return localVarResp.getData(); + } + + /** + * + * Delete all identifiers from a contact list audience-segment. + * @param audienceSegmentId The id of the contact list audience-segment to amend (required) + * @return ApiResponse<DeleteAudienceContactListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 The Contact List was emptied -
403 Forbidden -
+ */ + public ApiResponse deleteContactListIdentifiersWithHttpInfo(String audienceSegmentId) throws ApiException { + okhttp3.Call localVarCall = deleteContactListIdentifiersValidateBeforeCall(audienceSegmentId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Delete all identifiers from a contact list audience-segment. + * @param audienceSegmentId The id of the contact list audience-segment to amend (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 The Contact List was emptied -
403 Forbidden -
+ */ + public okhttp3.Call deleteContactListIdentifiersAsync(String audienceSegmentId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteContactListIdentifiersValidateBeforeCall(audienceSegmentId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for estimateAudienceSegmentSize + * @param audienceSegmentEstimateSizeInputV1 (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call estimateAudienceSegmentSizeCall(AudienceSegmentEstimateSizeInputV1 audienceSegmentEstimateSizeInputV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = audienceSegmentEstimateSizeInputV1; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audience-segments/estimate-size"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call estimateAudienceSegmentSizeValidateBeforeCall(AudienceSegmentEstimateSizeInputV1 audienceSegmentEstimateSizeInputV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceSegmentEstimateSizeInputV1' is set + if (audienceSegmentEstimateSizeInputV1 == null) { + throw new ApiException("Missing the required parameter 'audienceSegmentEstimateSizeInputV1' when calling estimateAudienceSegmentSize(Async)"); + } + + return estimateAudienceSegmentSizeCall(audienceSegmentEstimateSizeInputV1, _callback); + + } + + /** + * + * Gets the size estimation of a non existent segment. An error is returned when size calculation is not supported. + * @param audienceSegmentEstimateSizeInputV1 (required) + * @return AudienceSegmentSizeEstimationV1Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public AudienceSegmentSizeEstimationV1Response estimateAudienceSegmentSize(AudienceSegmentEstimateSizeInputV1 audienceSegmentEstimateSizeInputV1) throws ApiException { + ApiResponse localVarResp = estimateAudienceSegmentSizeWithHttpInfo(audienceSegmentEstimateSizeInputV1); + return localVarResp.getData(); + } + + /** + * + * Gets the size estimation of a non existent segment. An error is returned when size calculation is not supported. + * @param audienceSegmentEstimateSizeInputV1 (required) + * @return ApiResponse<AudienceSegmentSizeEstimationV1Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse estimateAudienceSegmentSizeWithHttpInfo(AudienceSegmentEstimateSizeInputV1 audienceSegmentEstimateSizeInputV1) throws ApiException { + okhttp3.Call localVarCall = estimateAudienceSegmentSizeValidateBeforeCall(audienceSegmentEstimateSizeInputV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets the size estimation of a non existent segment. An error is returned when size calculation is not supported. + * @param audienceSegmentEstimateSizeInputV1 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call estimateAudienceSegmentSizeAsync(AudienceSegmentEstimateSizeInputV1 audienceSegmentEstimateSizeInputV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = estimateAudienceSegmentSizeValidateBeforeCall(audienceSegmentEstimateSizeInputV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for estimateAudienceSize + * @param audienceEstimateSizeInputV1 (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call estimateAudienceSizeCall(AudienceEstimateSizeInputV1 audienceEstimateSizeInputV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = audienceEstimateSizeInputV1; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audiences/estimate-size"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call estimateAudienceSizeValidateBeforeCall(AudienceEstimateSizeInputV1 audienceEstimateSizeInputV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceEstimateSizeInputV1' is set + if (audienceEstimateSizeInputV1 == null) { + throw new ApiException("Missing the required parameter 'audienceEstimateSizeInputV1' when calling estimateAudienceSize(Async)"); + } + + return estimateAudienceSizeCall(audienceEstimateSizeInputV1, _callback); + + } + + /** + * + * Gets the size estimation of a non existent audience. An error is returned when size calculation is not supported. + * @param audienceEstimateSizeInputV1 (required) + * @return AudienceSizeEstimationV1Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public AudienceSizeEstimationV1Response estimateAudienceSize(AudienceEstimateSizeInputV1 audienceEstimateSizeInputV1) throws ApiException { + ApiResponse localVarResp = estimateAudienceSizeWithHttpInfo(audienceEstimateSizeInputV1); + return localVarResp.getData(); + } + + /** + * + * Gets the size estimation of a non existent audience. An error is returned when size calculation is not supported. + * @param audienceEstimateSizeInputV1 (required) + * @return ApiResponse<AudienceSizeEstimationV1Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse estimateAudienceSizeWithHttpInfo(AudienceEstimateSizeInputV1 audienceEstimateSizeInputV1) throws ApiException { + okhttp3.Call localVarCall = estimateAudienceSizeValidateBeforeCall(audienceEstimateSizeInputV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets the size estimation of a non existent audience. An error is returned when size calculation is not supported. + * @param audienceEstimateSizeInputV1 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call estimateAudienceSizeAsync(AudienceEstimateSizeInputV1 audienceEstimateSizeInputV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = estimateAudienceSizeValidateBeforeCall(audienceEstimateSizeInputV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAudienceSegmentContactListStatistics + * @param audienceSegmentId The segment ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call getAudienceSegmentContactListStatisticsCall(Integer audienceSegmentId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audience-segments/{audience-segment-id}/contact-list/statistics" + .replace("{" + "audience-segment-id" + "}", localVarApiClient.escapeString(audienceSegmentId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAudienceSegmentContactListStatisticsValidateBeforeCall(Integer audienceSegmentId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceSegmentId' is set + if (audienceSegmentId == null) { + throw new ApiException("Missing the required parameter 'audienceSegmentId' when calling getAudienceSegmentContactListStatistics(Async)"); + } + + return getAudienceSegmentContactListStatisticsCall(audienceSegmentId, _callback); + + } + + /** + * + * Returns the statistics of a contact list segment. + * @param audienceSegmentId The segment ID. (required) + * @return ContactListStatisticsEntityV1Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ContactListStatisticsEntityV1Response getAudienceSegmentContactListStatistics(Integer audienceSegmentId) throws ApiException { + ApiResponse localVarResp = getAudienceSegmentContactListStatisticsWithHttpInfo(audienceSegmentId); + return localVarResp.getData(); + } + + /** + * + * Returns the statistics of a contact list segment. + * @param audienceSegmentId The segment ID. (required) + * @return ApiResponse<ContactListStatisticsEntityV1Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse getAudienceSegmentContactListStatisticsWithHttpInfo(Integer audienceSegmentId) throws ApiException { + okhttp3.Call localVarCall = getAudienceSegmentContactListStatisticsValidateBeforeCall(audienceSegmentId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Returns the statistics of a contact list segment. + * @param audienceSegmentId The segment ID. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call getAudienceSegmentContactListStatisticsAsync(Integer audienceSegmentId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAudienceSegmentContactListStatisticsValidateBeforeCall(audienceSegmentId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAudienceSegmentsInMarketBrands + * @param advertiserId The advertiser ID. (required) + * @param country The ISO 3166-1 alpha-2 country code. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call getAudienceSegmentsInMarketBrandsCall(String advertiserId, String country, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audience-segments/in-market-brands"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (advertiserId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("advertiser-id", advertiserId)); + } + + if (country != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAudienceSegmentsInMarketBrandsValidateBeforeCall(String advertiserId, String country, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'advertiserId' is set + if (advertiserId == null) { + throw new ApiException("Missing the required parameter 'advertiserId' when calling getAudienceSegmentsInMarketBrands(Async)"); + } + + // verify the required parameter 'country' is set + if (country == null) { + throw new ApiException("Missing the required parameter 'country' when calling getAudienceSegmentsInMarketBrands(Async)"); + } + + return getAudienceSegmentsInMarketBrandsCall(advertiserId, country, _callback); + + } + + /** + * + * Returns a list with all available in-market brands that can be used to define an in-market segment. + * @param advertiserId The advertiser ID. (required) + * @param country The ISO 3166-1 alpha-2 country code. (required) + * @return InMarketAudienceSegmentBrandEntityV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public InMarketAudienceSegmentBrandEntityV1ListResponse getAudienceSegmentsInMarketBrands(String advertiserId, String country) throws ApiException { + ApiResponse localVarResp = getAudienceSegmentsInMarketBrandsWithHttpInfo(advertiserId, country); + return localVarResp.getData(); + } + + /** + * + * Returns a list with all available in-market brands that can be used to define an in-market segment. + * @param advertiserId The advertiser ID. (required) + * @param country The ISO 3166-1 alpha-2 country code. (required) + * @return ApiResponse<InMarketAudienceSegmentBrandEntityV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse getAudienceSegmentsInMarketBrandsWithHttpInfo(String advertiserId, String country) throws ApiException { + okhttp3.Call localVarCall = getAudienceSegmentsInMarketBrandsValidateBeforeCall(advertiserId, country, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Returns a list with all available in-market brands that can be used to define an in-market segment. + * @param advertiserId The advertiser ID. (required) + * @param country The ISO 3166-1 alpha-2 country code. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call getAudienceSegmentsInMarketBrandsAsync(String advertiserId, String country, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAudienceSegmentsInMarketBrandsValidateBeforeCall(advertiserId, country, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAudienceSegmentsInMarketInterests + * @param advertiserId The advertiser ID. (required) + * @param country The ISO 3166-1 alpha-2 country code. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call getAudienceSegmentsInMarketInterestsCall(String advertiserId, String country, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audience-segments/in-market-interests"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (advertiserId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("advertiser-id", advertiserId)); + } + + if (country != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAudienceSegmentsInMarketInterestsValidateBeforeCall(String advertiserId, String country, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'advertiserId' is set + if (advertiserId == null) { + throw new ApiException("Missing the required parameter 'advertiserId' when calling getAudienceSegmentsInMarketInterests(Async)"); + } + + // verify the required parameter 'country' is set + if (country == null) { + throw new ApiException("Missing the required parameter 'country' when calling getAudienceSegmentsInMarketInterests(Async)"); + } + + return getAudienceSegmentsInMarketInterestsCall(advertiserId, country, _callback); + + } + + /** + * + * Returns a list with all available in-market interests that can be used to define an in-market segment. These in-market interests correspond to the Google product taxonomy. + * @param advertiserId The advertiser ID. (required) + * @param country The ISO 3166-1 alpha-2 country code. (required) + * @return InMarketAudienceSegmentInterestEntityV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public InMarketAudienceSegmentInterestEntityV1ListResponse getAudienceSegmentsInMarketInterests(String advertiserId, String country) throws ApiException { + ApiResponse localVarResp = getAudienceSegmentsInMarketInterestsWithHttpInfo(advertiserId, country); + return localVarResp.getData(); + } + + /** + * + * Returns a list with all available in-market interests that can be used to define an in-market segment. These in-market interests correspond to the Google product taxonomy. + * @param advertiserId The advertiser ID. (required) + * @param country The ISO 3166-1 alpha-2 country code. (required) + * @return ApiResponse<InMarketAudienceSegmentInterestEntityV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse getAudienceSegmentsInMarketInterestsWithHttpInfo(String advertiserId, String country) throws ApiException { + okhttp3.Call localVarCall = getAudienceSegmentsInMarketInterestsValidateBeforeCall(advertiserId, country, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Returns a list with all available in-market interests that can be used to define an in-market segment. These in-market interests correspond to the Google product taxonomy. + * @param advertiserId The advertiser ID. (required) + * @param country The ISO 3166-1 alpha-2 country code. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call getAudienceSegmentsInMarketInterestsAsync(String advertiserId, String country, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAudienceSegmentsInMarketInterestsValidateBeforeCall(advertiserId, country, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchAudienceSegments + * @param audienceSegmentSearchInputV1 Segment search filters. (required) + * @param limit The number of elements to be returned. The default is 50 and the maximum is 100. (optional, default to 50) + * @param offset The (zero-based) offset into the collection. The default is 0. (optional, default to 0) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call searchAudienceSegmentsCall(AudienceSegmentSearchInputV1 audienceSegmentSearchInputV1, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = audienceSegmentSearchInputV1; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audience-segments/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchAudienceSegmentsValidateBeforeCall(AudienceSegmentSearchInputV1 audienceSegmentSearchInputV1, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceSegmentSearchInputV1' is set + if (audienceSegmentSearchInputV1 == null) { + throw new ApiException("Missing the required parameter 'audienceSegmentSearchInputV1' when calling searchAudienceSegments(Async)"); + } + + return searchAudienceSegmentsCall(audienceSegmentSearchInputV1, limit, offset, _callback); + + } + + /** + * + * Returns a list of segments that match the provided filters. If present, the filters are AND'ed together when applied. + * @param audienceSegmentSearchInputV1 Segment search filters. (required) + * @param limit The number of elements to be returned. The default is 50 and the maximum is 100. (optional, default to 50) + * @param offset The (zero-based) offset into the collection. The default is 0. (optional, default to 0) + * @return AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse searchAudienceSegments(AudienceSegmentSearchInputV1 audienceSegmentSearchInputV1, Integer limit, Integer offset) throws ApiException { + ApiResponse localVarResp = searchAudienceSegmentsWithHttpInfo(audienceSegmentSearchInputV1, limit, offset); + return localVarResp.getData(); + } + + /** + * + * Returns a list of segments that match the provided filters. If present, the filters are AND'ed together when applied. + * @param audienceSegmentSearchInputV1 Segment search filters. (required) + * @param limit The number of elements to be returned. The default is 50 and the maximum is 100. (optional, default to 50) + * @param offset The (zero-based) offset into the collection. The default is 0. (optional, default to 0) + * @return ApiResponse<AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse searchAudienceSegmentsWithHttpInfo(AudienceSegmentSearchInputV1 audienceSegmentSearchInputV1, Integer limit, Integer offset) throws ApiException { + okhttp3.Call localVarCall = searchAudienceSegmentsValidateBeforeCall(audienceSegmentSearchInputV1, limit, offset, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Returns a list of segments that match the provided filters. If present, the filters are AND'ed together when applied. + * @param audienceSegmentSearchInputV1 Segment search filters. (required) + * @param limit The number of elements to be returned. The default is 50 and the maximum is 100. (optional, default to 50) + * @param offset The (zero-based) offset into the collection. The default is 0. (optional, default to 0) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call searchAudienceSegmentsAsync(AudienceSegmentSearchInputV1 audienceSegmentSearchInputV1, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchAudienceSegmentsValidateBeforeCall(audienceSegmentSearchInputV1, limit, offset, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for searchAudiences + * @param audienceSearchInputV1 Audience search filters. (required) + * @param limit The number of elements to be returned. The default is 50 and the maximum is 100. (optional, default to 50) + * @param offset The (zero-based) offset into the collection. The default is 0. (optional, default to 0) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call searchAudiencesCall(AudienceSearchInputV1 audienceSearchInputV1, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = audienceSearchInputV1; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audiences/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchAudiencesValidateBeforeCall(AudienceSearchInputV1 audienceSearchInputV1, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceSearchInputV1' is set + if (audienceSearchInputV1 == null) { + throw new ApiException("Missing the required parameter 'audienceSearchInputV1' when calling searchAudiences(Async)"); + } + + return searchAudiencesCall(audienceSearchInputV1, limit, offset, _callback); + + } + + /** + * + * Returns a list of audiences that match the provided filters. If present, the filters are AND'ed together when applied. + * @param audienceSearchInputV1 Audience search filters. (required) + * @param limit The number of elements to be returned. The default is 50 and the maximum is 100. (optional, default to 50) + * @param offset The (zero-based) offset into the collection. The default is 0. (optional, default to 0) + * @return AudienceEntityV1AudienceSearchMetadataV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public AudienceEntityV1AudienceSearchMetadataV1ListResponse searchAudiences(AudienceSearchInputV1 audienceSearchInputV1, Integer limit, Integer offset) throws ApiException { + ApiResponse localVarResp = searchAudiencesWithHttpInfo(audienceSearchInputV1, limit, offset); + return localVarResp.getData(); + } + + /** + * + * Returns a list of audiences that match the provided filters. If present, the filters are AND'ed together when applied. + * @param audienceSearchInputV1 Audience search filters. (required) + * @param limit The number of elements to be returned. The default is 50 and the maximum is 100. (optional, default to 50) + * @param offset The (zero-based) offset into the collection. The default is 0. (optional, default to 0) + * @return ApiResponse<AudienceEntityV1AudienceSearchMetadataV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse searchAudiencesWithHttpInfo(AudienceSearchInputV1 audienceSearchInputV1, Integer limit, Integer offset) throws ApiException { + okhttp3.Call localVarCall = searchAudiencesValidateBeforeCall(audienceSearchInputV1, limit, offset, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Returns a list of audiences that match the provided filters. If present, the filters are AND'ed together when applied. + * @param audienceSearchInputV1 Audience search filters. (required) + * @param limit The number of elements to be returned. The default is 50 and the maximum is 100. (optional, default to 50) + * @param offset The (zero-based) offset into the collection. The default is 0. (optional, default to 0) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call searchAudiencesAsync(AudienceSearchInputV1 audienceSearchInputV1, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchAudiencesValidateBeforeCall(audienceSearchInputV1, limit, offset, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateContactListIdentifiers + * @param audienceSegmentId The id of the contact list audience-segment to amend (required) + * @param contactlistAmendmentRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Summary of created request -
403 Forbidden -
404 Audience 123 not found -
+ */ + public okhttp3.Call updateContactListIdentifiersCall(String audienceSegmentId, ContactlistAmendmentRequest contactlistAmendmentRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = contactlistAmendmentRequest; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/audience-segments/{audience-segment-id}/contact-list" + .replace("{" + "audience-segment-id" + "}", localVarApiClient.escapeString(audienceSegmentId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateContactListIdentifiersValidateBeforeCall(String audienceSegmentId, ContactlistAmendmentRequest contactlistAmendmentRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'audienceSegmentId' is set + if (audienceSegmentId == null) { + throw new ApiException("Missing the required parameter 'audienceSegmentId' when calling updateContactListIdentifiers(Async)"); + } + + // verify the required parameter 'contactlistAmendmentRequest' is set + if (contactlistAmendmentRequest == null) { + throw new ApiException("Missing the required parameter 'contactlistAmendmentRequest' when calling updateContactListIdentifiers(Async)"); + } + + return updateContactListIdentifiersCall(audienceSegmentId, contactlistAmendmentRequest, _callback); + + } + + /** + * + * Add/remove identifiers to or from a contact list audience-segment. + * @param audienceSegmentId The id of the contact list audience-segment to amend (required) + * @param contactlistAmendmentRequest (required) + * @return ModifyAudienceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Summary of created request -
403 Forbidden -
404 Audience 123 not found -
+ */ + public ModifyAudienceResponse updateContactListIdentifiers(String audienceSegmentId, ContactlistAmendmentRequest contactlistAmendmentRequest) throws ApiException { + ApiResponse localVarResp = updateContactListIdentifiersWithHttpInfo(audienceSegmentId, contactlistAmendmentRequest); + return localVarResp.getData(); + } + + /** + * + * Add/remove identifiers to or from a contact list audience-segment. + * @param audienceSegmentId The id of the contact list audience-segment to amend (required) + * @param contactlistAmendmentRequest (required) + * @return ApiResponse<ModifyAudienceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Summary of created request -
403 Forbidden -
404 Audience 123 not found -
+ */ + public ApiResponse updateContactListIdentifiersWithHttpInfo(String audienceSegmentId, ContactlistAmendmentRequest contactlistAmendmentRequest) throws ApiException { + okhttp3.Call localVarCall = updateContactListIdentifiersValidateBeforeCall(audienceSegmentId, contactlistAmendmentRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Add/remove identifiers to or from a contact list audience-segment. + * @param audienceSegmentId The id of the contact list audience-segment to amend (required) + * @param contactlistAmendmentRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Summary of created request -
403 Forbidden -
404 Audience 123 not found -
+ */ + public okhttp3.Call updateContactListIdentifiersAsync(String audienceSegmentId, ContactlistAmendmentRequest contactlistAmendmentRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateContactListIdentifiersValidateBeforeCall(audienceSegmentId, contactlistAmendmentRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/CampaignApi.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/CampaignApi.java similarity index 70% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/CampaignApi.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/CampaignApi.java index 2ac92ffe..eba00bf5 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/CampaignApi.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/CampaignApi.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,39 +11,44 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.api; +package com.criteo.api.marketingsolutions.v2024_07.api; -import com.criteo.api.marketingsolutions.v2023_04.ApiCallback; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.ApiResponse; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.Pair; -import com.criteo.api.marketingsolutions.v2023_04.ProgressRequestBody; -import com.criteo.api.marketingsolutions.v2023_04.ProgressResponseBody; +import com.criteo.api.marketingsolutions.v2024_07.ApiCallback; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.ApiResponse; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.Pair; +import com.criteo.api.marketingsolutions.v2024_07.ProgressRequestBody; +import com.criteo.api.marketingsolutions.v2024_07.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; -import com.criteo.api.marketingsolutions.v2023_04.model.AdSetCategoryBidListResponse; -import com.criteo.api.marketingsolutions.v2023_04.model.AdSetDisplayMultiplierListResponse; -import com.criteo.api.marketingsolutions.v2023_04.model.CampaignListResponse; -import com.criteo.api.marketingsolutions.v2023_04.model.CampaignResponse; -import com.criteo.api.marketingsolutions.v2023_04.model.CampaignSearchRequest; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetCategoryBidListRequest; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetCategoryBidResultListResponse; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetDisplayMultiplierListRequest; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetDisplayMultiplierResultListResponse; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchCampaignListRequest; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchResultCampaignListResponse; -import com.criteo.api.marketingsolutions.v2023_04.model.RequestAdSetSearch; -import com.criteo.api.marketingsolutions.v2023_04.model.RequestsAdSetId; -import com.criteo.api.marketingsolutions.v2023_04.model.RequestsPatchAdSet; -import com.criteo.api.marketingsolutions.v2023_04.model.ResponseReadAdSet; -import com.criteo.api.marketingsolutions.v2023_04.model.ResponsesAdSetId; -import com.criteo.api.marketingsolutions.v2023_04.model.ResponsesReadAdSet; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetAudienceLinkEntityV1Response; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetAudienceLinkInputEntityV1; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetCategoryBidListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetDisplayMultiplierListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetSearchRequestV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.CampaignSearchRequestV23Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.CampaignV23Q1ListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.CampaignV23Q1Response; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetV24Q1Request; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateCampaignRequest; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetCategoryBidListRequest; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetCategoryBidResultListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetDisplayMultiplierListRequest; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetDisplayMultiplierResultListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchCampaignListRequest; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchResultCampaignListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.RequestsAdSetId; +import com.criteo.api.marketingsolutions.v2024_07.model.RequestsPatchAdSetV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.ResponseReadAdSetV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.ResponsesAdSetId; +import com.criteo.api.marketingsolutions.v2024_07.model.ResponsesAdSetIdV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.ResponsesReadAdSetV24Q1; import java.lang.reflect.Type; import java.util.ArrayList; @@ -90,7 +95,279 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for getAdSet + * Build call for createAdSetV24Q1 + * @param createAdSetV24Q1Request the ad sets to create (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The ad set that has been created and errors / warnings -
400 Bad Request -
401 The API client is not properly authenticated. -
+ */ + public okhttp3.Call createAdSetV24Q1Call(CreateAdSetV24Q1Request createAdSetV24Q1Request, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createAdSetV24Q1Request; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/ad-sets"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createAdSetV24Q1ValidateBeforeCall(CreateAdSetV24Q1Request createAdSetV24Q1Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createAdSetV24Q1Request' is set + if (createAdSetV24Q1Request == null) { + throw new ApiException("Missing the required parameter 'createAdSetV24Q1Request' when calling createAdSetV24Q1(Async)"); + } + + return createAdSetV24Q1Call(createAdSetV24Q1Request, _callback); + + } + + /** + * + * Create the specified ad set + * @param createAdSetV24Q1Request the ad sets to create (required) + * @return ResponseReadAdSetV24Q1 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The ad set that has been created and errors / warnings -
400 Bad Request -
401 The API client is not properly authenticated. -
+ */ + public ResponseReadAdSetV24Q1 createAdSetV24Q1(CreateAdSetV24Q1Request createAdSetV24Q1Request) throws ApiException { + ApiResponse localVarResp = createAdSetV24Q1WithHttpInfo(createAdSetV24Q1Request); + return localVarResp.getData(); + } + + /** + * + * Create the specified ad set + * @param createAdSetV24Q1Request the ad sets to create (required) + * @return ApiResponse<ResponseReadAdSetV24Q1> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The ad set that has been created and errors / warnings -
400 Bad Request -
401 The API client is not properly authenticated. -
+ */ + public ApiResponse createAdSetV24Q1WithHttpInfo(CreateAdSetV24Q1Request createAdSetV24Q1Request) throws ApiException { + okhttp3.Call localVarCall = createAdSetV24Q1ValidateBeforeCall(createAdSetV24Q1Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create the specified ad set + * @param createAdSetV24Q1Request the ad sets to create (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The ad set that has been created and errors / warnings -
400 Bad Request -
401 The API client is not properly authenticated. -
+ */ + public okhttp3.Call createAdSetV24Q1Async(CreateAdSetV24Q1Request createAdSetV24Q1Request, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAdSetV24Q1ValidateBeforeCall(createAdSetV24Q1Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createCampaign + * @param createCampaignRequest the campaigns to create (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The campaign that has been created and errors / warnings -
400 Bad Request -
401 The API client is not properly authenticated. -
+ */ + public okhttp3.Call createCampaignCall(CreateCampaignRequest createCampaignRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createCampaignRequest; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/campaigns"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createCampaignValidateBeforeCall(CreateCampaignRequest createCampaignRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'createCampaignRequest' is set + if (createCampaignRequest == null) { + throw new ApiException("Missing the required parameter 'createCampaignRequest' when calling createCampaign(Async)"); + } + + return createCampaignCall(createCampaignRequest, _callback); + + } + + /** + * + * Create the specified campaign + * @param createCampaignRequest the campaigns to create (required) + * @return CampaignV23Q1Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The campaign that has been created and errors / warnings -
400 Bad Request -
401 The API client is not properly authenticated. -
+ */ + public CampaignV23Q1Response createCampaign(CreateCampaignRequest createCampaignRequest) throws ApiException { + ApiResponse localVarResp = createCampaignWithHttpInfo(createCampaignRequest); + return localVarResp.getData(); + } + + /** + * + * Create the specified campaign + * @param createCampaignRequest the campaigns to create (required) + * @return ApiResponse<CampaignV23Q1Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The campaign that has been created and errors / warnings -
400 Bad Request -
401 The API client is not properly authenticated. -
+ */ + public ApiResponse createCampaignWithHttpInfo(CreateCampaignRequest createCampaignRequest) throws ApiException { + okhttp3.Call localVarCall = createCampaignValidateBeforeCall(createCampaignRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create the specified campaign + * @param createCampaignRequest the campaigns to create (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The campaign that has been created and errors / warnings -
400 Bad Request -
401 The API client is not properly authenticated. -
+ */ + public okhttp3.Call createCampaignAsync(CreateCampaignRequest createCampaignRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createCampaignValidateBeforeCall(createCampaignRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAdSetV24Q1 * @param adSetId Id of the ad set (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -102,10 +379,8 @@ public void setCustomBaseUrl(String customBaseUrl) { 401 The API client is not properly authenticated. - 403 The API client is not authorized to access this resource or the resource does not exist. - - * @deprecated */ - @Deprecated - public okhttp3.Call getAdSetCall(String adSetId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAdSetV24Q1Call(String adSetId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -122,8 +397,8 @@ public okhttp3.Call getAdSetCall(String adSetId, final ApiCallback _callback) th Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/marketing-solutions/ad-sets/{adSetId}" - .replace("{" + "adSetId" + "}", localVarApiClient.escapeString(adSetId.toString())); + String localVarPath = "/2024-07/marketing-solutions/ad-sets/{ad-set-id}" + .replace("{" + "ad-set-id" + "}", localVarApiClient.escapeString(adSetId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -152,15 +427,14 @@ public okhttp3.Call getAdSetCall(String adSetId, final ApiCallback _callback) th return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } - @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getAdSetValidateBeforeCall(String adSetId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAdSetV24Q1ValidateBeforeCall(String adSetId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'adSetId' is set if (adSetId == null) { - throw new ApiException("Missing the required parameter 'adSetId' when calling getAdSet(Async)"); + throw new ApiException("Missing the required parameter 'adSetId' when calling getAdSetV24Q1(Async)"); } - return getAdSetCall(adSetId, _callback); + return getAdSetV24Q1Call(adSetId, _callback); } @@ -168,7 +442,7 @@ private okhttp3.Call getAdSetValidateBeforeCall(String adSetId, final ApiCallbac * * Get the data for the specified ad set * @param adSetId Id of the ad set (required) - * @return ResponseReadAdSet + * @return ResponseReadAdSetV24Q1 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -177,11 +451,9 @@ private okhttp3.Call getAdSetValidateBeforeCall(String adSetId, final ApiCallbac
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource or the resource does not exist. -
- * @deprecated */ - @Deprecated - public ResponseReadAdSet getAdSet(String adSetId) throws ApiException { - ApiResponse localVarResp = getAdSetWithHttpInfo(adSetId); + public ResponseReadAdSetV24Q1 getAdSetV24Q1(String adSetId) throws ApiException { + ApiResponse localVarResp = getAdSetV24Q1WithHttpInfo(adSetId); return localVarResp.getData(); } @@ -189,7 +461,7 @@ public ResponseReadAdSet getAdSet(String adSetId) throws ApiException { * * Get the data for the specified ad set * @param adSetId Id of the ad set (required) - * @return ApiResponse<ResponseReadAdSet> + * @return ApiResponse<ResponseReadAdSetV24Q1> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -198,12 +470,10 @@ public ResponseReadAdSet getAdSet(String adSetId) throws ApiException {
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource or the resource does not exist. -
- * @deprecated */ - @Deprecated - public ApiResponse getAdSetWithHttpInfo(String adSetId) throws ApiException { - okhttp3.Call localVarCall = getAdSetValidateBeforeCall(adSetId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getAdSetV24Q1WithHttpInfo(String adSetId) throws ApiException { + okhttp3.Call localVarCall = getAdSetV24Q1ValidateBeforeCall(adSetId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -221,18 +491,16 @@ public ApiResponse getAdSetWithHttpInfo(String adSetId) throw 401 The API client is not properly authenticated. - 403 The API client is not authorized to access this resource or the resource does not exist. - - * @deprecated */ - @Deprecated - public okhttp3.Call getAdSetAsync(String adSetId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAdSetV24Q1Async(String adSetId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getAdSetValidateBeforeCall(adSetId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getAdSetV24Q1ValidateBeforeCall(adSetId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getCampaign + * Build call for getCampaignV23Q1 * @param campaignId Id of the campaign (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -244,10 +512,8 @@ public okhttp3.Call getAdSetAsync(String adSetId, final ApiCallback 401 The API client is not properly authenticated. - 403 The API client is not authorized to access this resource or the resource does not exist. - - * @deprecated */ - @Deprecated - public okhttp3.Call getCampaignCall(String campaignId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCampaignV23Q1Call(String campaignId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -264,7 +530,7 @@ public okhttp3.Call getCampaignCall(String campaignId, final ApiCallback _callba Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/marketing-solutions/campaigns/{campaign-id}" + String localVarPath = "/2024-07/marketing-solutions/campaigns/{campaign-id}" .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); @@ -294,15 +560,14 @@ public okhttp3.Call getCampaignCall(String campaignId, final ApiCallback _callba return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } - @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getCampaignValidateBeforeCall(String campaignId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCampaignV23Q1ValidateBeforeCall(String campaignId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'campaignId' is set if (campaignId == null) { - throw new ApiException("Missing the required parameter 'campaignId' when calling getCampaign(Async)"); + throw new ApiException("Missing the required parameter 'campaignId' when calling getCampaignV23Q1(Async)"); } - return getCampaignCall(campaignId, _callback); + return getCampaignV23Q1Call(campaignId, _callback); } @@ -310,7 +575,7 @@ private okhttp3.Call getCampaignValidateBeforeCall(String campaignId, final ApiC * * Get the data for the specified campaign * @param campaignId Id of the campaign (required) - * @return CampaignResponse + * @return CampaignV23Q1Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -319,11 +584,9 @@ private okhttp3.Call getCampaignValidateBeforeCall(String campaignId, final ApiC
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource or the resource does not exist. -
- * @deprecated */ - @Deprecated - public CampaignResponse getCampaign(String campaignId) throws ApiException { - ApiResponse localVarResp = getCampaignWithHttpInfo(campaignId); + public CampaignV23Q1Response getCampaignV23Q1(String campaignId) throws ApiException { + ApiResponse localVarResp = getCampaignV23Q1WithHttpInfo(campaignId); return localVarResp.getData(); } @@ -331,7 +594,7 @@ public CampaignResponse getCampaign(String campaignId) throws ApiException { * * Get the data for the specified campaign * @param campaignId Id of the campaign (required) - * @return ApiResponse<CampaignResponse> + * @return ApiResponse<CampaignV23Q1Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -340,12 +603,10 @@ public CampaignResponse getCampaign(String campaignId) throws ApiException {
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource or the resource does not exist. -
- * @deprecated */ - @Deprecated - public ApiResponse getCampaignWithHttpInfo(String campaignId) throws ApiException { - okhttp3.Call localVarCall = getCampaignValidateBeforeCall(campaignId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getCampaignV23Q1WithHttpInfo(String campaignId) throws ApiException { + okhttp3.Call localVarCall = getCampaignV23Q1ValidateBeforeCall(campaignId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -363,13 +624,11 @@ public ApiResponse getCampaignWithHttpInfo(String campaignId) 401 The API client is not properly authenticated. - 403 The API client is not authorized to access this resource or the resource does not exist. - - * @deprecated */ - @Deprecated - public okhttp3.Call getCampaignAsync(String campaignId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCampaignV23Q1Async(String campaignId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getCampaignValidateBeforeCall(campaignId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getCampaignV23Q1ValidateBeforeCall(campaignId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -405,7 +664,7 @@ public okhttp3.Call getCategoryBidListCall(String adSetId, final ApiCallback _ca Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/marketing-solutions/ad-sets/{ad-set-id}/category-bids" + String localVarPath = "/2024-07/marketing-solutions/ad-sets/{ad-set-id}/category-bids" .replace("{" + "ad-set-id" + "}", localVarApiClient.escapeString(adSetId.toString())); List localVarQueryParams = new ArrayList(); @@ -542,7 +801,7 @@ public okhttp3.Call getDisplayMultipliersCall(String adSetId, final ApiCallback Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers" + String localVarPath = "/2024-07/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers" .replace("{" + "ad-set-id" + "}", localVarApiClient.escapeString(adSetId.toString())); List localVarQueryParams = new ArrayList(); @@ -648,8 +907,8 @@ public okhttp3.Call getDisplayMultipliersAsync(String adSetId, final ApiCallback return localVarCall; } /** - * Build call for patchAdSets - * @param requestsPatchAdSet List of adsets to patch. (optional) + * Build call for patchAdSetsV24Q1 + * @param requestsPatchAdSetV24Q1 List of adsets to patch. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -661,7 +920,7 @@ public okhttp3.Call getDisplayMultipliersAsync(String adSetId, final ApiCallback 403 The API client is not authorized to access this resource or the resource does not exist. - */ - public okhttp3.Call patchAdSetsCall(RequestsPatchAdSet requestsPatchAdSet, final ApiCallback _callback) throws ApiException { + public okhttp3.Call patchAdSetsV24Q1Call(RequestsPatchAdSetV24Q1 requestsPatchAdSetV24Q1, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -675,10 +934,10 @@ public okhttp3.Call patchAdSetsCall(RequestsPatchAdSet requestsPatchAdSet, final basePath = null; } - Object localVarPostBody = requestsPatchAdSet; + Object localVarPostBody = requestsPatchAdSetV24Q1; // create path and map variables - String localVarPath = "/2023-04/marketing-solutions/ad-sets"; + String localVarPath = "/2024-07/marketing-solutions/ad-sets"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -712,16 +971,16 @@ public okhttp3.Call patchAdSetsCall(RequestsPatchAdSet requestsPatchAdSet, final } @SuppressWarnings("rawtypes") - private okhttp3.Call patchAdSetsValidateBeforeCall(RequestsPatchAdSet requestsPatchAdSet, final ApiCallback _callback) throws ApiException { - return patchAdSetsCall(requestsPatchAdSet, _callback); + private okhttp3.Call patchAdSetsV24Q1ValidateBeforeCall(RequestsPatchAdSetV24Q1 requestsPatchAdSetV24Q1, final ApiCallback _callback) throws ApiException { + return patchAdSetsV24Q1Call(requestsPatchAdSetV24Q1, _callback); } /** * * Patch a list of AdSets. - * @param requestsPatchAdSet List of adsets to patch. (optional) - * @return ResponsesAdSetId + * @param requestsPatchAdSetV24Q1 List of adsets to patch. (optional) + * @return ResponsesAdSetIdV24Q1 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -731,16 +990,16 @@ private okhttp3.Call patchAdSetsValidateBeforeCall(RequestsPatchAdSet requestsPa
403 The API client is not authorized to access this resource or the resource does not exist. -
*/ - public ResponsesAdSetId patchAdSets(RequestsPatchAdSet requestsPatchAdSet) throws ApiException { - ApiResponse localVarResp = patchAdSetsWithHttpInfo(requestsPatchAdSet); + public ResponsesAdSetIdV24Q1 patchAdSetsV24Q1(RequestsPatchAdSetV24Q1 requestsPatchAdSetV24Q1) throws ApiException { + ApiResponse localVarResp = patchAdSetsV24Q1WithHttpInfo(requestsPatchAdSetV24Q1); return localVarResp.getData(); } /** * * Patch a list of AdSets. - * @param requestsPatchAdSet List of adsets to patch. (optional) - * @return ApiResponse<ResponsesAdSetId> + * @param requestsPatchAdSetV24Q1 List of adsets to patch. (optional) + * @return ApiResponse<ResponsesAdSetIdV24Q1> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -750,16 +1009,16 @@ public ResponsesAdSetId patchAdSets(RequestsPatchAdSet requestsPatchAdSet) throw
403 The API client is not authorized to access this resource or the resource does not exist. -
*/ - public ApiResponse patchAdSetsWithHttpInfo(RequestsPatchAdSet requestsPatchAdSet) throws ApiException { - okhttp3.Call localVarCall = patchAdSetsValidateBeforeCall(requestsPatchAdSet, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse patchAdSetsV24Q1WithHttpInfo(RequestsPatchAdSetV24Q1 requestsPatchAdSetV24Q1) throws ApiException { + okhttp3.Call localVarCall = patchAdSetsV24Q1ValidateBeforeCall(requestsPatchAdSetV24Q1, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Patch a list of AdSets. - * @param requestsPatchAdSet List of adsets to patch. (optional) + * @param requestsPatchAdSetV24Q1 List of adsets to patch. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -771,10 +1030,10 @@ public ApiResponse patchAdSetsWithHttpInfo(RequestsPatchAdSet 403 The API client is not authorized to access this resource or the resource does not exist. - */ - public okhttp3.Call patchAdSetsAsync(RequestsPatchAdSet requestsPatchAdSet, final ApiCallback _callback) throws ApiException { + public okhttp3.Call patchAdSetsV24Q1Async(RequestsPatchAdSetV24Q1 requestsPatchAdSetV24Q1, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = patchAdSetsValidateBeforeCall(requestsPatchAdSet, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = patchAdSetsV24Q1ValidateBeforeCall(requestsPatchAdSetV24Q1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -809,7 +1068,7 @@ public okhttp3.Call patchCampaignsCall(PatchCampaignListRequest patchCampaignLis Object localVarPostBody = patchCampaignListRequest; // create path and map variables - String localVarPath = "/2023-04/marketing-solutions/campaigns"; + String localVarPath = "/2024-07/marketing-solutions/campaigns"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -942,7 +1201,7 @@ public okhttp3.Call patchCategoryBidListCall(String adSetId, PatchAdSetCategoryB Object localVarPostBody = patchAdSetCategoryBidListRequest; // create path and map variables - String localVarPath = "/2023-04/marketing-solutions/ad-sets/{ad-set-id}/category-bids" + String localVarPath = "/2024-07/marketing-solutions/ad-sets/{ad-set-id}/category-bids" .replace("{" + "ad-set-id" + "}", localVarApiClient.escapeString(adSetId.toString())); List localVarQueryParams = new ArrayList(); @@ -1087,7 +1346,7 @@ public okhttp3.Call patchDisplayMultipliersCall(String adSetId, PatchAdSetDispla Object localVarPostBody = patchAdSetDisplayMultiplierListRequest; // create path and map variables - String localVarPath = "/2023-04/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers" + String localVarPath = "/2024-07/marketing-solutions/ad-sets/{ad-set-id}/display-multipliers" .replace("{" + "ad-set-id" + "}", localVarApiClient.escapeString(adSetId.toString())); List localVarQueryParams = new ArrayList(); @@ -1200,8 +1459,8 @@ public okhttp3.Call patchDisplayMultipliersAsync(String adSetId, PatchAdSetDispl return localVarCall; } /** - * Build call for searchAdSets - * @param requestAdSetSearch (optional) + * Build call for searchAdSetsV24Q1 + * @param adSetSearchRequestV24Q1 (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1210,13 +1469,11 @@ public okhttp3.Call patchDisplayMultipliersAsync(String adSetId, PatchAdSetDispl Status Code Description Response Headers 200 data for the ad sets - 400 Bad Request - - 403 Forbidden - + 403 The API client is not authorized to access this resource or the resource does not exist. - 401 The API client is not properly authenticated. - - * @deprecated */ - @Deprecated - public okhttp3.Call searchAdSetsCall(RequestAdSetSearch requestAdSetSearch, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchAdSetsV24Q1Call(AdSetSearchRequestV24Q1 adSetSearchRequestV24Q1, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1230,10 +1487,10 @@ public okhttp3.Call searchAdSetsCall(RequestAdSetSearch requestAdSetSearch, fina basePath = null; } - Object localVarPostBody = requestAdSetSearch; + Object localVarPostBody = adSetSearchRequestV24Q1; // create path and map variables - String localVarPath = "/2023-04/marketing-solutions/ad-sets/search"; + String localVarPath = "/2024-07/marketing-solutions/ad-sets/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1266,62 +1523,57 @@ public okhttp3.Call searchAdSetsCall(RequestAdSetSearch requestAdSetSearch, fina return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } - @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call searchAdSetsValidateBeforeCall(RequestAdSetSearch requestAdSetSearch, final ApiCallback _callback) throws ApiException { - return searchAdSetsCall(requestAdSetSearch, _callback); + private okhttp3.Call searchAdSetsV24Q1ValidateBeforeCall(AdSetSearchRequestV24Q1 adSetSearchRequestV24Q1, final ApiCallback _callback) throws ApiException { + return searchAdSetsV24Q1Call(adSetSearchRequestV24Q1, _callback); } /** * * Search for ad sets - * @param requestAdSetSearch (optional) - * @return ResponsesReadAdSet + * @param adSetSearchRequestV24Q1 (optional) + * @return ResponsesReadAdSetV24Q1 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 data for the ad sets -
400 Bad Request -
403 Forbidden -
403 The API client is not authorized to access this resource or the resource does not exist. -
401 The API client is not properly authenticated. -
- * @deprecated */ - @Deprecated - public ResponsesReadAdSet searchAdSets(RequestAdSetSearch requestAdSetSearch) throws ApiException { - ApiResponse localVarResp = searchAdSetsWithHttpInfo(requestAdSetSearch); + public ResponsesReadAdSetV24Q1 searchAdSetsV24Q1(AdSetSearchRequestV24Q1 adSetSearchRequestV24Q1) throws ApiException { + ApiResponse localVarResp = searchAdSetsV24Q1WithHttpInfo(adSetSearchRequestV24Q1); return localVarResp.getData(); } /** * * Search for ad sets - * @param requestAdSetSearch (optional) - * @return ApiResponse<ResponsesReadAdSet> + * @param adSetSearchRequestV24Q1 (optional) + * @return ApiResponse<ResponsesReadAdSetV24Q1> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 data for the ad sets -
400 Bad Request -
403 Forbidden -
403 The API client is not authorized to access this resource or the resource does not exist. -
401 The API client is not properly authenticated. -
- * @deprecated */ - @Deprecated - public ApiResponse searchAdSetsWithHttpInfo(RequestAdSetSearch requestAdSetSearch) throws ApiException { - okhttp3.Call localVarCall = searchAdSetsValidateBeforeCall(requestAdSetSearch, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse searchAdSetsV24Q1WithHttpInfo(AdSetSearchRequestV24Q1 adSetSearchRequestV24Q1) throws ApiException { + okhttp3.Call localVarCall = searchAdSetsV24Q1ValidateBeforeCall(adSetSearchRequestV24Q1, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Search for ad sets - * @param requestAdSetSearch (optional) + * @param adSetSearchRequestV24Q1 (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -1330,22 +1582,20 @@ public ApiResponse searchAdSetsWithHttpInfo(RequestAdSetSear Status Code Description Response Headers 200 data for the ad sets - 400 Bad Request - - 403 Forbidden - + 403 The API client is not authorized to access this resource or the resource does not exist. - 401 The API client is not properly authenticated. - - * @deprecated */ - @Deprecated - public okhttp3.Call searchAdSetsAsync(RequestAdSetSearch requestAdSetSearch, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchAdSetsV24Q1Async(AdSetSearchRequestV24Q1 adSetSearchRequestV24Q1, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = searchAdSetsValidateBeforeCall(requestAdSetSearch, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = searchAdSetsV24Q1ValidateBeforeCall(adSetSearchRequestV24Q1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for searchCampaigns - * @param campaignSearchRequest filters on campaigns (optional) + * Build call for searchCampaignsV23Q1 + * @param campaignSearchRequestV23Q1 filters on campaigns (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1357,10 +1607,8 @@ public okhttp3.Call searchAdSetsAsync(RequestAdSetSearch requestAdSetSearch, fin 403 Forbidden - 401 The API client is not properly authenticated. - - * @deprecated */ - @Deprecated - public okhttp3.Call searchCampaignsCall(CampaignSearchRequest campaignSearchRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchCampaignsV23Q1Call(CampaignSearchRequestV23Q1 campaignSearchRequestV23Q1, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1374,10 +1622,10 @@ public okhttp3.Call searchCampaignsCall(CampaignSearchRequest campaignSearchRequ basePath = null; } - Object localVarPostBody = campaignSearchRequest; + Object localVarPostBody = campaignSearchRequestV23Q1; // create path and map variables - String localVarPath = "/2023-04/marketing-solutions/campaigns/search"; + String localVarPath = "/2024-07/marketing-solutions/campaigns/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1410,18 +1658,17 @@ public okhttp3.Call searchCampaignsCall(CampaignSearchRequest campaignSearchRequ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } - @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call searchCampaignsValidateBeforeCall(CampaignSearchRequest campaignSearchRequest, final ApiCallback _callback) throws ApiException { - return searchCampaignsCall(campaignSearchRequest, _callback); + private okhttp3.Call searchCampaignsV23Q1ValidateBeforeCall(CampaignSearchRequestV23Q1 campaignSearchRequestV23Q1, final ApiCallback _callback) throws ApiException { + return searchCampaignsV23Q1Call(campaignSearchRequestV23Q1, _callback); } /** * * Search for campaigns - * @param campaignSearchRequest filters on campaigns (optional) - * @return CampaignListResponse + * @param campaignSearchRequestV23Q1 filters on campaigns (optional) + * @return CampaignV23Q1ListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1431,19 +1678,17 @@ private okhttp3.Call searchCampaignsValidateBeforeCall(CampaignSearchRequest cam
403 Forbidden -
401 The API client is not properly authenticated. -
- * @deprecated */ - @Deprecated - public CampaignListResponse searchCampaigns(CampaignSearchRequest campaignSearchRequest) throws ApiException { - ApiResponse localVarResp = searchCampaignsWithHttpInfo(campaignSearchRequest); + public CampaignV23Q1ListResponse searchCampaignsV23Q1(CampaignSearchRequestV23Q1 campaignSearchRequestV23Q1) throws ApiException { + ApiResponse localVarResp = searchCampaignsV23Q1WithHttpInfo(campaignSearchRequestV23Q1); return localVarResp.getData(); } /** * * Search for campaigns - * @param campaignSearchRequest filters on campaigns (optional) - * @return ApiResponse<CampaignListResponse> + * @param campaignSearchRequestV23Q1 filters on campaigns (optional) + * @return ApiResponse<CampaignV23Q1ListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1453,19 +1698,17 @@ public CampaignListResponse searchCampaigns(CampaignSearchRequest campaignSearch
403 Forbidden -
401 The API client is not properly authenticated. -
- * @deprecated */ - @Deprecated - public ApiResponse searchCampaignsWithHttpInfo(CampaignSearchRequest campaignSearchRequest) throws ApiException { - okhttp3.Call localVarCall = searchCampaignsValidateBeforeCall(campaignSearchRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse searchCampaignsV23Q1WithHttpInfo(CampaignSearchRequestV23Q1 campaignSearchRequestV23Q1) throws ApiException { + okhttp3.Call localVarCall = searchCampaignsV23Q1ValidateBeforeCall(campaignSearchRequestV23Q1, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Search for campaigns - * @param campaignSearchRequest filters on campaigns (optional) + * @param campaignSearchRequestV23Q1 filters on campaigns (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -1477,13 +1720,11 @@ public ApiResponse searchCampaignsWithHttpInfo(CampaignSea 403 Forbidden - 401 The API client is not properly authenticated. - - * @deprecated */ - @Deprecated - public okhttp3.Call searchCampaignsAsync(CampaignSearchRequest campaignSearchRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchCampaignsV23Q1Async(CampaignSearchRequestV23Q1 campaignSearchRequestV23Q1, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = searchCampaignsValidateBeforeCall(campaignSearchRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = searchCampaignsV23Q1ValidateBeforeCall(campaignSearchRequestV23Q1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -1518,7 +1759,7 @@ public okhttp3.Call startAdSetsCall(RequestsAdSetId requestsAdSetId, final ApiCa Object localVarPostBody = requestsAdSetId; // create path and map variables - String localVarPath = "/2023-04/marketing-solutions/ad-sets/start"; + String localVarPath = "/2024-07/marketing-solutions/ad-sets/start"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1649,7 +1890,7 @@ public okhttp3.Call stopAdSetsCall(RequestsAdSetId requestsAdSetId, final ApiCal Object localVarPostBody = requestsAdSetId; // create path and map variables - String localVarPath = "/2023-04/marketing-solutions/ad-sets/stop"; + String localVarPath = "/2024-07/marketing-solutions/ad-sets/stop"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1749,4 +1990,154 @@ public okhttp3.Call stopAdSetsAsync(RequestsAdSetId requestsAdSetId, final ApiCa localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for updateAdSetAudience + * @param adSetId The ad set ID. (required) + * @param adSetAudienceLinkInputEntityV1 Ad set-Audience update request. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call updateAdSetAudienceCall(String adSetId, AdSetAudienceLinkInputEntityV1 adSetAudienceLinkInputEntityV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = adSetAudienceLinkInputEntityV1; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/ad-sets/{ad-set-id}/audience" + .replace("{" + "ad-set-id" + "}", localVarApiClient.escapeString(adSetId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateAdSetAudienceValidateBeforeCall(String adSetId, AdSetAudienceLinkInputEntityV1 adSetAudienceLinkInputEntityV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'adSetId' is set + if (adSetId == null) { + throw new ApiException("Missing the required parameter 'adSetId' when calling updateAdSetAudience(Async)"); + } + + // verify the required parameter 'adSetAudienceLinkInputEntityV1' is set + if (adSetAudienceLinkInputEntityV1 == null) { + throw new ApiException("Missing the required parameter 'adSetAudienceLinkInputEntityV1' when calling updateAdSetAudience(Async)"); + } + + return updateAdSetAudienceCall(adSetId, adSetAudienceLinkInputEntityV1, _callback); + + } + + /** + * + * Link or unlink an audience with an ad set + * @param adSetId The ad set ID. (required) + * @param adSetAudienceLinkInputEntityV1 Ad set-Audience update request. (required) + * @return AdSetAudienceLinkEntityV1Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public AdSetAudienceLinkEntityV1Response updateAdSetAudience(String adSetId, AdSetAudienceLinkInputEntityV1 adSetAudienceLinkInputEntityV1) throws ApiException { + ApiResponse localVarResp = updateAdSetAudienceWithHttpInfo(adSetId, adSetAudienceLinkInputEntityV1); + return localVarResp.getData(); + } + + /** + * + * Link or unlink an audience with an ad set + * @param adSetId The ad set ID. (required) + * @param adSetAudienceLinkInputEntityV1 Ad set-Audience update request. (required) + * @return ApiResponse<AdSetAudienceLinkEntityV1Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse updateAdSetAudienceWithHttpInfo(String adSetId, AdSetAudienceLinkInputEntityV1 adSetAudienceLinkInputEntityV1) throws ApiException { + okhttp3.Call localVarCall = updateAdSetAudienceValidateBeforeCall(adSetId, adSetAudienceLinkInputEntityV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Link or unlink an audience with an ad set + * @param adSetId The ad set ID. (required) + * @param adSetAudienceLinkInputEntityV1 Ad set-Audience update request. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call updateAdSetAudienceAsync(String adSetId, AdSetAudienceLinkInputEntityV1 adSetAudienceLinkInputEntityV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateAdSetAudienceValidateBeforeCall(adSetId, adSetAudienceLinkInputEntityV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } } diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/CreativeApi.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/CreativeApi.java new file mode 100644 index 00000000..650c97a4 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/CreativeApi.java @@ -0,0 +1,2551 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.api; + +import com.criteo.api.marketingsolutions.v2024_07.ApiCallback; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.ApiResponse; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.Pair; +import com.criteo.api.marketingsolutions.v2024_07.ProgressRequestBody; +import com.criteo.api.marketingsolutions.v2024_07.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.criteo.api.marketingsolutions.v2024_07.model.AdListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.AdResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.AdWriteRequest; +import com.criteo.api.marketingsolutions.v2024_07.model.CouponListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.CouponResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.CouponSupportedSizesResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateCouponRequest; +import com.criteo.api.marketingsolutions.v2024_07.model.CreativeListResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.CreativeResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.CreativeWriteRequest; +import com.criteo.api.marketingsolutions.v2024_07.model.UpdateCouponRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class CreativeApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public CreativeApi() { + this(Configuration.getDefaultApiClient()); + } + + public CreativeApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createAdvertiserAd + * @param advertiserId The advertiser identifier. (required) + * @param adWriteRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 The created Ad is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call createAdvertiserAdCall(String advertiserId, AdWriteRequest adWriteRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = adWriteRequest; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/advertisers/{advertiser-id}/ads" + .replace("{" + "advertiser-id" + "}", localVarApiClient.escapeString(advertiserId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createAdvertiserAdValidateBeforeCall(String advertiserId, AdWriteRequest adWriteRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'advertiserId' is set + if (advertiserId == null) { + throw new ApiException("Missing the required parameter 'advertiserId' when calling createAdvertiserAd(Async)"); + } + + // verify the required parameter 'adWriteRequest' is set + if (adWriteRequest == null) { + throw new ApiException("Missing the required parameter 'adWriteRequest' when calling createAdvertiserAd(Async)"); + } + + return createAdvertiserAdCall(advertiserId, adWriteRequest, _callback); + + } + + /** + * + * Create an Ad + * @param advertiserId The advertiser identifier. (required) + * @param adWriteRequest (required) + * @return AdResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 The created Ad is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public AdResponse createAdvertiserAd(String advertiserId, AdWriteRequest adWriteRequest) throws ApiException { + ApiResponse localVarResp = createAdvertiserAdWithHttpInfo(advertiserId, adWriteRequest); + return localVarResp.getData(); + } + + /** + * + * Create an Ad + * @param advertiserId The advertiser identifier. (required) + * @param adWriteRequest (required) + * @return ApiResponse<AdResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 The created Ad is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public ApiResponse createAdvertiserAdWithHttpInfo(String advertiserId, AdWriteRequest adWriteRequest) throws ApiException { + okhttp3.Call localVarCall = createAdvertiserAdValidateBeforeCall(advertiserId, adWriteRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create an Ad + * @param advertiserId The advertiser identifier. (required) + * @param adWriteRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 The created Ad is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call createAdvertiserAdAsync(String advertiserId, AdWriteRequest adWriteRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAdvertiserAdValidateBeforeCall(advertiserId, adWriteRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createAdvertiserCoupon + * @param advertiserId The advertiser identifier. (required) + * @param createCouponRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created Coupon is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call createAdvertiserCouponCall(String advertiserId, CreateCouponRequest createCouponRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createCouponRequest; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons" + .replace("{" + "advertiser-id" + "}", localVarApiClient.escapeString(advertiserId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createAdvertiserCouponValidateBeforeCall(String advertiserId, CreateCouponRequest createCouponRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'advertiserId' is set + if (advertiserId == null) { + throw new ApiException("Missing the required parameter 'advertiserId' when calling createAdvertiserCoupon(Async)"); + } + + // verify the required parameter 'createCouponRequest' is set + if (createCouponRequest == null) { + throw new ApiException("Missing the required parameter 'createCouponRequest' when calling createAdvertiserCoupon(Async)"); + } + + return createAdvertiserCouponCall(advertiserId, createCouponRequest, _callback); + + } + + /** + * + * Create a Coupon + * @param advertiserId The advertiser identifier. (required) + * @param createCouponRequest (required) + * @return CouponResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created Coupon is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public CouponResponse createAdvertiserCoupon(String advertiserId, CreateCouponRequest createCouponRequest) throws ApiException { + ApiResponse localVarResp = createAdvertiserCouponWithHttpInfo(advertiserId, createCouponRequest); + return localVarResp.getData(); + } + + /** + * + * Create a Coupon + * @param advertiserId The advertiser identifier. (required) + * @param createCouponRequest (required) + * @return ApiResponse<CouponResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created Coupon is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public ApiResponse createAdvertiserCouponWithHttpInfo(String advertiserId, CreateCouponRequest createCouponRequest) throws ApiException { + okhttp3.Call localVarCall = createAdvertiserCouponValidateBeforeCall(advertiserId, createCouponRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create a Coupon + * @param advertiserId The advertiser identifier. (required) + * @param createCouponRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created Coupon is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call createAdvertiserCouponAsync(String advertiserId, CreateCouponRequest createCouponRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAdvertiserCouponValidateBeforeCall(advertiserId, createCouponRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createAdvertiserCreative + * @param advertiserId The advertiser identifier. (required) + * @param creativeWriteRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 The created creative is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call createAdvertiserCreativeCall(String advertiserId, CreativeWriteRequest creativeWriteRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = creativeWriteRequest; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/advertisers/{advertiser-id}/creatives" + .replace("{" + "advertiser-id" + "}", localVarApiClient.escapeString(advertiserId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createAdvertiserCreativeValidateBeforeCall(String advertiserId, CreativeWriteRequest creativeWriteRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'advertiserId' is set + if (advertiserId == null) { + throw new ApiException("Missing the required parameter 'advertiserId' when calling createAdvertiserCreative(Async)"); + } + + // verify the required parameter 'creativeWriteRequest' is set + if (creativeWriteRequest == null) { + throw new ApiException("Missing the required parameter 'creativeWriteRequest' when calling createAdvertiserCreative(Async)"); + } + + return createAdvertiserCreativeCall(advertiserId, creativeWriteRequest, _callback); + + } + + /** + * + * Create a Creative + * @param advertiserId The advertiser identifier. (required) + * @param creativeWriteRequest (required) + * @return CreativeResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 The created creative is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public CreativeResponse createAdvertiserCreative(String advertiserId, CreativeWriteRequest creativeWriteRequest) throws ApiException { + ApiResponse localVarResp = createAdvertiserCreativeWithHttpInfo(advertiserId, creativeWriteRequest); + return localVarResp.getData(); + } + + /** + * + * Create a Creative + * @param advertiserId The advertiser identifier. (required) + * @param creativeWriteRequest (required) + * @return ApiResponse<CreativeResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 The created creative is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public ApiResponse createAdvertiserCreativeWithHttpInfo(String advertiserId, CreativeWriteRequest creativeWriteRequest) throws ApiException { + okhttp3.Call localVarCall = createAdvertiserCreativeValidateBeforeCall(advertiserId, creativeWriteRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create a Creative + * @param advertiserId The advertiser identifier. (required) + * @param creativeWriteRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 The created creative is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call createAdvertiserCreativeAsync(String advertiserId, CreativeWriteRequest creativeWriteRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAdvertiserCreativeValidateBeforeCall(advertiserId, creativeWriteRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteAd + * @param id The ad identifier to delete. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 The ad was deleted. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call deleteAdCall(Integer id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/ads/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteAdValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteAd(Async)"); + } + + return deleteAdCall(id, _callback); + + } + + /** + * + * Delete an Ad + * @param id The ad identifier to delete. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 The ad was deleted. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public void deleteAd(Integer id) throws ApiException { + deleteAdWithHttpInfo(id); + } + + /** + * + * Delete an Ad + * @param id The ad identifier to delete. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 The ad was deleted. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public ApiResponse deleteAdWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = deleteAdValidateBeforeCall(id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Delete an Ad + * @param id The ad identifier to delete. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 The ad was deleted. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call deleteAdAsync(Integer id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteAdValidateBeforeCall(id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteAdvertiserCoupon + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to delete. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
204 The Coupon was deleted. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call deleteAdvertiserCouponCall(String advertiserId, String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id}" + .replace("{" + "advertiser-id" + "}", localVarApiClient.escapeString(advertiserId.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteAdvertiserCouponValidateBeforeCall(String advertiserId, String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'advertiserId' is set + if (advertiserId == null) { + throw new ApiException("Missing the required parameter 'advertiserId' when calling deleteAdvertiserCoupon(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteAdvertiserCoupon(Async)"); + } + + return deleteAdvertiserCouponCall(advertiserId, id, _callback); + + } + + /** + * + * Delete a Coupon + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to delete. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
204 The Coupon was deleted. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public void deleteAdvertiserCoupon(String advertiserId, String id) throws ApiException { + deleteAdvertiserCouponWithHttpInfo(advertiserId, id); + } + + /** + * + * Delete a Coupon + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to delete. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
204 The Coupon was deleted. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public ApiResponse deleteAdvertiserCouponWithHttpInfo(String advertiserId, String id) throws ApiException { + okhttp3.Call localVarCall = deleteAdvertiserCouponValidateBeforeCall(advertiserId, id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Delete a Coupon + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to delete. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
204 The Coupon was deleted. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call deleteAdvertiserCouponAsync(String advertiserId, String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteAdvertiserCouponValidateBeforeCall(advertiserId, id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteCreative + * @param id The creative identifier to delete. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 The creative was deleted. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call deleteCreativeCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/creatives/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteCreativeValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteCreative(Async)"); + } + + return deleteCreativeCall(id, _callback); + + } + + /** + * + * Delete a Creative if there are no ads binded to it + * @param id The creative identifier to delete. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 The creative was deleted. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public void deleteCreative(String id) throws ApiException { + deleteCreativeWithHttpInfo(id); + } + + /** + * + * Delete a Creative if there are no ads binded to it + * @param id The creative identifier to delete. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 The creative was deleted. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public ApiResponse deleteCreativeWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = deleteCreativeValidateBeforeCall(id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Delete a Creative if there are no ads binded to it + * @param id The creative identifier to delete. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 The creative was deleted. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call deleteCreativeAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteCreativeValidateBeforeCall(id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for editAdvertiserCoupon + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to edit. (required) + * @param updateCouponRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 The edited Coupon is returned. -
400 The request contained invalid parameters. -
+ */ + public okhttp3.Call editAdvertiserCouponCall(String advertiserId, String id, UpdateCouponRequest updateCouponRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateCouponRequest; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id}" + .replace("{" + "advertiser-id" + "}", localVarApiClient.escapeString(advertiserId.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call editAdvertiserCouponValidateBeforeCall(String advertiserId, String id, UpdateCouponRequest updateCouponRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'advertiserId' is set + if (advertiserId == null) { + throw new ApiException("Missing the required parameter 'advertiserId' when calling editAdvertiserCoupon(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling editAdvertiserCoupon(Async)"); + } + + // verify the required parameter 'updateCouponRequest' is set + if (updateCouponRequest == null) { + throw new ApiException("Missing the required parameter 'updateCouponRequest' when calling editAdvertiserCoupon(Async)"); + } + + return editAdvertiserCouponCall(advertiserId, id, updateCouponRequest, _callback); + + } + + /** + * + * Edit a specific Coupon + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to edit. (required) + * @param updateCouponRequest (required) + * @return CouponResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 The edited Coupon is returned. -
400 The request contained invalid parameters. -
+ */ + public CouponResponse editAdvertiserCoupon(String advertiserId, String id, UpdateCouponRequest updateCouponRequest) throws ApiException { + ApiResponse localVarResp = editAdvertiserCouponWithHttpInfo(advertiserId, id, updateCouponRequest); + return localVarResp.getData(); + } + + /** + * + * Edit a specific Coupon + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to edit. (required) + * @param updateCouponRequest (required) + * @return ApiResponse<CouponResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 The edited Coupon is returned. -
400 The request contained invalid parameters. -
+ */ + public ApiResponse editAdvertiserCouponWithHttpInfo(String advertiserId, String id, UpdateCouponRequest updateCouponRequest) throws ApiException { + okhttp3.Call localVarCall = editAdvertiserCouponValidateBeforeCall(advertiserId, id, updateCouponRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Edit a specific Coupon + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to edit. (required) + * @param updateCouponRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 The edited Coupon is returned. -
400 The request contained invalid parameters. -
+ */ + public okhttp3.Call editAdvertiserCouponAsync(String advertiserId, String id, UpdateCouponRequest updateCouponRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = editAdvertiserCouponValidateBeforeCall(advertiserId, id, updateCouponRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for editCreative + * @param id The creative identifier to edit. (required) + * @param creativeWriteRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The edited creative is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call editCreativeCall(String id, CreativeWriteRequest creativeWriteRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = creativeWriteRequest; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/creatives/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call editCreativeValidateBeforeCall(String id, CreativeWriteRequest creativeWriteRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling editCreative(Async)"); + } + + // verify the required parameter 'creativeWriteRequest' is set + if (creativeWriteRequest == null) { + throw new ApiException("Missing the required parameter 'creativeWriteRequest' when calling editCreative(Async)"); + } + + return editCreativeCall(id, creativeWriteRequest, _callback); + + } + + /** + * + * Edit a specific Creative + * @param id The creative identifier to edit. (required) + * @param creativeWriteRequest (required) + * @return CreativeResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The edited creative is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public CreativeResponse editCreative(String id, CreativeWriteRequest creativeWriteRequest) throws ApiException { + ApiResponse localVarResp = editCreativeWithHttpInfo(id, creativeWriteRequest); + return localVarResp.getData(); + } + + /** + * + * Edit a specific Creative + * @param id The creative identifier to edit. (required) + * @param creativeWriteRequest (required) + * @return ApiResponse<CreativeResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The edited creative is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public ApiResponse editCreativeWithHttpInfo(String id, CreativeWriteRequest creativeWriteRequest) throws ApiException { + okhttp3.Call localVarCall = editCreativeValidateBeforeCall(id, creativeWriteRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Edit a specific Creative + * @param id The creative identifier to edit. (required) + * @param creativeWriteRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The edited creative is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call editCreativeAsync(String id, CreativeWriteRequest creativeWriteRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = editCreativeValidateBeforeCall(id, creativeWriteRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for generateCreativePreview + * @param id The Creative identifier to preview. (required) + * @param width The width of the Creative to preview. (optional) + * @param height The height of the Creative to preview. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The preview HTML of a specific Creative is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call generateCreativePreviewCall(String id, Integer width, Integer height, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/creatives/{id}/preview" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (width != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("width", width)); + } + + if (height != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("height", height)); + } + + final String[] localVarAccepts = { + "text/html", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call generateCreativePreviewValidateBeforeCall(String id, Integer width, Integer height, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling generateCreativePreview(Async)"); + } + + return generateCreativePreviewCall(id, width, height, _callback); + + } + + /** + * + * Generate a preview of a specific Creative + * @param id The Creative identifier to preview. (required) + * @param width The width of the Creative to preview. (optional) + * @param height The height of the Creative to preview. (optional) + * @return String + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The preview HTML of a specific Creative is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public String generateCreativePreview(String id, Integer width, Integer height) throws ApiException { + ApiResponse localVarResp = generateCreativePreviewWithHttpInfo(id, width, height); + return localVarResp.getData(); + } + + /** + * + * Generate a preview of a specific Creative + * @param id The Creative identifier to preview. (required) + * @param width The width of the Creative to preview. (optional) + * @param height The height of the Creative to preview. (optional) + * @return ApiResponse<String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The preview HTML of a specific Creative is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public ApiResponse generateCreativePreviewWithHttpInfo(String id, Integer width, Integer height) throws ApiException { + okhttp3.Call localVarCall = generateCreativePreviewValidateBeforeCall(id, width, height, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Generate a preview of a specific Creative + * @param id The Creative identifier to preview. (required) + * @param width The width of the Creative to preview. (optional) + * @param height The height of the Creative to preview. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The preview HTML of a specific Creative is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call generateCreativePreviewAsync(String id, Integer width, Integer height, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = generateCreativePreviewValidateBeforeCall(id, width, height, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAd + * @param id The ad identifier to retrieve. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The found ad is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call getAdCall(Integer id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/ads/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAdValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getAd(Async)"); + } + + return getAdCall(id, _callback); + + } + + /** + * + * Get an Ad from its id + * @param id The ad identifier to retrieve. (required) + * @return AdResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The found ad is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public AdResponse getAd(Integer id) throws ApiException { + ApiResponse localVarResp = getAdWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * + * Get an Ad from its id + * @param id The ad identifier to retrieve. (required) + * @return ApiResponse<AdResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The found ad is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public ApiResponse getAdWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = getAdValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get an Ad from its id + * @param id The ad identifier to retrieve. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The found ad is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call getAdAsync(Integer id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAdValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAdvertiserAds + * @param advertiserId The advertiser identifier. (required) + * @param limit The number of ads to be returned. The default is 50. (optional) + * @param offset The (zero-based) offset into the collection of ads. The default is 0. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The list of self-services Ads is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call getAdvertiserAdsCall(String advertiserId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/advertisers/{advertiser-id}/ads" + .replace("{" + "advertiser-id" + "}", localVarApiClient.escapeString(advertiserId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAdvertiserAdsValidateBeforeCall(String advertiserId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'advertiserId' is set + if (advertiserId == null) { + throw new ApiException("Missing the required parameter 'advertiserId' when calling getAdvertiserAds(Async)"); + } + + return getAdvertiserAdsCall(advertiserId, limit, offset, _callback); + + } + + /** + * + * Get the list of self-services Ads for a given advertiser + * @param advertiserId The advertiser identifier. (required) + * @param limit The number of ads to be returned. The default is 50. (optional) + * @param offset The (zero-based) offset into the collection of ads. The default is 0. (optional) + * @return AdListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The list of self-services Ads is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public AdListResponse getAdvertiserAds(String advertiserId, Integer limit, Integer offset) throws ApiException { + ApiResponse localVarResp = getAdvertiserAdsWithHttpInfo(advertiserId, limit, offset); + return localVarResp.getData(); + } + + /** + * + * Get the list of self-services Ads for a given advertiser + * @param advertiserId The advertiser identifier. (required) + * @param limit The number of ads to be returned. The default is 50. (optional) + * @param offset The (zero-based) offset into the collection of ads. The default is 0. (optional) + * @return ApiResponse<AdListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The list of self-services Ads is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public ApiResponse getAdvertiserAdsWithHttpInfo(String advertiserId, Integer limit, Integer offset) throws ApiException { + okhttp3.Call localVarCall = getAdvertiserAdsValidateBeforeCall(advertiserId, limit, offset, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get the list of self-services Ads for a given advertiser + * @param advertiserId The advertiser identifier. (required) + * @param limit The number of ads to be returned. The default is 50. (optional) + * @param offset The (zero-based) offset into the collection of ads. The default is 0. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The list of self-services Ads is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call getAdvertiserAdsAsync(String advertiserId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAdvertiserAdsValidateBeforeCall(advertiserId, limit, offset, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAdvertiserCoupon + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to retrieve. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The found Coupon is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call getAdvertiserCouponCall(String advertiserId, String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id}" + .replace("{" + "advertiser-id" + "}", localVarApiClient.escapeString(advertiserId.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAdvertiserCouponValidateBeforeCall(String advertiserId, String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'advertiserId' is set + if (advertiserId == null) { + throw new ApiException("Missing the required parameter 'advertiserId' when calling getAdvertiserCoupon(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getAdvertiserCoupon(Async)"); + } + + return getAdvertiserCouponCall(advertiserId, id, _callback); + + } + + /** + * + * Get a Coupon from its id + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to retrieve. (required) + * @return CouponResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The found Coupon is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public CouponResponse getAdvertiserCoupon(String advertiserId, String id) throws ApiException { + ApiResponse localVarResp = getAdvertiserCouponWithHttpInfo(advertiserId, id); + return localVarResp.getData(); + } + + /** + * + * Get a Coupon from its id + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to retrieve. (required) + * @return ApiResponse<CouponResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The found Coupon is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public ApiResponse getAdvertiserCouponWithHttpInfo(String advertiserId, String id) throws ApiException { + okhttp3.Call localVarCall = getAdvertiserCouponValidateBeforeCall(advertiserId, id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get a Coupon from its id + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to retrieve. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The found Coupon is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call getAdvertiserCouponAsync(String advertiserId, String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAdvertiserCouponValidateBeforeCall(advertiserId, id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAdvertiserCouponPreview + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to preview. (required) + * @param width The width of the coupon to preview. (optional) + * @param height The height of the coupon to preview. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The preview HTML of a specific Coupon is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call getAdvertiserCouponPreviewCall(String advertiserId, String id, Integer width, Integer height, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons/{id}/preview" + .replace("{" + "advertiser-id" + "}", localVarApiClient.escapeString(advertiserId.toString())) + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (width != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("width", width)); + } + + if (height != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("height", height)); + } + + final String[] localVarAccepts = { + "text/html", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAdvertiserCouponPreviewValidateBeforeCall(String advertiserId, String id, Integer width, Integer height, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'advertiserId' is set + if (advertiserId == null) { + throw new ApiException("Missing the required parameter 'advertiserId' when calling getAdvertiserCouponPreview(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getAdvertiserCouponPreview(Async)"); + } + + return getAdvertiserCouponPreviewCall(advertiserId, id, width, height, _callback); + + } + + /** + * + * Get the preview of a specific Coupon + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to preview. (required) + * @param width The width of the coupon to preview. (optional) + * @param height The height of the coupon to preview. (optional) + * @return String + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The preview HTML of a specific Coupon is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public String getAdvertiserCouponPreview(String advertiserId, String id, Integer width, Integer height) throws ApiException { + ApiResponse localVarResp = getAdvertiserCouponPreviewWithHttpInfo(advertiserId, id, width, height); + return localVarResp.getData(); + } + + /** + * + * Get the preview of a specific Coupon + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to preview. (required) + * @param width The width of the coupon to preview. (optional) + * @param height The height of the coupon to preview. (optional) + * @return ApiResponse<String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The preview HTML of a specific Coupon is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public ApiResponse getAdvertiserCouponPreviewWithHttpInfo(String advertiserId, String id, Integer width, Integer height) throws ApiException { + okhttp3.Call localVarCall = getAdvertiserCouponPreviewValidateBeforeCall(advertiserId, id, width, height, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get the preview of a specific Coupon + * @param advertiserId The advertiser identifier. (required) + * @param id The Coupon identifier to preview. (required) + * @param width The width of the coupon to preview. (optional) + * @param height The height of the coupon to preview. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The preview HTML of a specific Coupon is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call getAdvertiserCouponPreviewAsync(String advertiserId, String id, Integer width, Integer height, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAdvertiserCouponPreviewValidateBeforeCall(advertiserId, id, width, height, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAdvertiserCouponSupportedSizes + * @param advertiserId The advertiser identifier. (required) + * @param adSetId The ad set id on which you want to check the Coupon supported sizes. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The list of Coupon supported sizes is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call getAdvertiserCouponSupportedSizesCall(String advertiserId, String adSetId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons-supported-sizes" + .replace("{" + "advertiser-id" + "}", localVarApiClient.escapeString(advertiserId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (adSetId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("ad-set-id", adSetId)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAdvertiserCouponSupportedSizesValidateBeforeCall(String advertiserId, String adSetId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'advertiserId' is set + if (advertiserId == null) { + throw new ApiException("Missing the required parameter 'advertiserId' when calling getAdvertiserCouponSupportedSizes(Async)"); + } + + return getAdvertiserCouponSupportedSizesCall(advertiserId, adSetId, _callback); + + } + + /** + * + * Get the list of Coupon supported sizes + * @param advertiserId The advertiser identifier. (required) + * @param adSetId The ad set id on which you want to check the Coupon supported sizes. (optional) + * @return CouponSupportedSizesResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The list of Coupon supported sizes is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public CouponSupportedSizesResponse getAdvertiserCouponSupportedSizes(String advertiserId, String adSetId) throws ApiException { + ApiResponse localVarResp = getAdvertiserCouponSupportedSizesWithHttpInfo(advertiserId, adSetId); + return localVarResp.getData(); + } + + /** + * + * Get the list of Coupon supported sizes + * @param advertiserId The advertiser identifier. (required) + * @param adSetId The ad set id on which you want to check the Coupon supported sizes. (optional) + * @return ApiResponse<CouponSupportedSizesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The list of Coupon supported sizes is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public ApiResponse getAdvertiserCouponSupportedSizesWithHttpInfo(String advertiserId, String adSetId) throws ApiException { + okhttp3.Call localVarCall = getAdvertiserCouponSupportedSizesValidateBeforeCall(advertiserId, adSetId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get the list of Coupon supported sizes + * @param advertiserId The advertiser identifier. (required) + * @param adSetId The ad set id on which you want to check the Coupon supported sizes. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The list of Coupon supported sizes is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call getAdvertiserCouponSupportedSizesAsync(String advertiserId, String adSetId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAdvertiserCouponSupportedSizesValidateBeforeCall(advertiserId, adSetId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAdvertiserCoupons + * @param advertiserId The advertiser identifier. (required) + * @param limit The number of coupons to be returned. The default is 50. (optional) + * @param offset The (zero-based) offset into the collection of coupons. The default is 0. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The list of self-services Coupons is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call getAdvertiserCouponsCall(String advertiserId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/advertisers/{advertiser-id}/coupons" + .replace("{" + "advertiser-id" + "}", localVarApiClient.escapeString(advertiserId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAdvertiserCouponsValidateBeforeCall(String advertiserId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'advertiserId' is set + if (advertiserId == null) { + throw new ApiException("Missing the required parameter 'advertiserId' when calling getAdvertiserCoupons(Async)"); + } + + return getAdvertiserCouponsCall(advertiserId, limit, offset, _callback); + + } + + /** + * + * Get the list of self-services Coupons for a given advertiser + * @param advertiserId The advertiser identifier. (required) + * @param limit The number of coupons to be returned. The default is 50. (optional) + * @param offset The (zero-based) offset into the collection of coupons. The default is 0. (optional) + * @return CouponListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The list of self-services Coupons is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public CouponListResponse getAdvertiserCoupons(String advertiserId, Integer limit, Integer offset) throws ApiException { + ApiResponse localVarResp = getAdvertiserCouponsWithHttpInfo(advertiserId, limit, offset); + return localVarResp.getData(); + } + + /** + * + * Get the list of self-services Coupons for a given advertiser + * @param advertiserId The advertiser identifier. (required) + * @param limit The number of coupons to be returned. The default is 50. (optional) + * @param offset The (zero-based) offset into the collection of coupons. The default is 0. (optional) + * @return ApiResponse<CouponListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The list of self-services Coupons is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public ApiResponse getAdvertiserCouponsWithHttpInfo(String advertiserId, Integer limit, Integer offset) throws ApiException { + okhttp3.Call localVarCall = getAdvertiserCouponsValidateBeforeCall(advertiserId, limit, offset, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get the list of self-services Coupons for a given advertiser + * @param advertiserId The advertiser identifier. (required) + * @param limit The number of coupons to be returned. The default is 50. (optional) + * @param offset The (zero-based) offset into the collection of coupons. The default is 0. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 The list of self-services Coupons is returned. -
400 The request contained invalid parameters. -
403 The request was not properly authorized. -
+ */ + public okhttp3.Call getAdvertiserCouponsAsync(String advertiserId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAdvertiserCouponsValidateBeforeCall(advertiserId, limit, offset, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAdvertiserCreatives + * @param advertiserId The advertiser identifier. (required) + * @param limit The number of creatives to be returned. The default is 50. (optional) + * @param offset The (zero-based) offset into the collection of creatives. The default is 0. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The list of self-services Creatives is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call getAdvertiserCreativesCall(String advertiserId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/advertisers/{advertiser-id}/creatives" + .replace("{" + "advertiser-id" + "}", localVarApiClient.escapeString(advertiserId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAdvertiserCreativesValidateBeforeCall(String advertiserId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'advertiserId' is set + if (advertiserId == null) { + throw new ApiException("Missing the required parameter 'advertiserId' when calling getAdvertiserCreatives(Async)"); + } + + return getAdvertiserCreativesCall(advertiserId, limit, offset, _callback); + + } + + /** + * + * Get the list of self-services Creatives for a given advertiser + * @param advertiserId The advertiser identifier. (required) + * @param limit The number of creatives to be returned. The default is 50. (optional) + * @param offset The (zero-based) offset into the collection of creatives. The default is 0. (optional) + * @return CreativeListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The list of self-services Creatives is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public CreativeListResponse getAdvertiserCreatives(String advertiserId, Integer limit, Integer offset) throws ApiException { + ApiResponse localVarResp = getAdvertiserCreativesWithHttpInfo(advertiserId, limit, offset); + return localVarResp.getData(); + } + + /** + * + * Get the list of self-services Creatives for a given advertiser + * @param advertiserId The advertiser identifier. (required) + * @param limit The number of creatives to be returned. The default is 50. (optional) + * @param offset The (zero-based) offset into the collection of creatives. The default is 0. (optional) + * @return ApiResponse<CreativeListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The list of self-services Creatives is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public ApiResponse getAdvertiserCreativesWithHttpInfo(String advertiserId, Integer limit, Integer offset) throws ApiException { + okhttp3.Call localVarCall = getAdvertiserCreativesValidateBeforeCall(advertiserId, limit, offset, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get the list of self-services Creatives for a given advertiser + * @param advertiserId The advertiser identifier. (required) + * @param limit The number of creatives to be returned. The default is 50. (optional) + * @param offset The (zero-based) offset into the collection of creatives. The default is 0. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The list of self-services Creatives is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call getAdvertiserCreativesAsync(String advertiserId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAdvertiserCreativesValidateBeforeCall(advertiserId, limit, offset, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getCreative + * @param id The creative identifier to retrieve. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The found creative is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call getCreativeCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/marketing-solutions/creatives/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCreativeValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getCreative(Async)"); + } + + return getCreativeCall(id, _callback); + + } + + /** + * + * Get a Creative from its id + * @param id The creative identifier to retrieve. (required) + * @return CreativeResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The found creative is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public CreativeResponse getCreative(String id) throws ApiException { + ApiResponse localVarResp = getCreativeWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * + * Get a Creative from its id + * @param id The creative identifier to retrieve. (required) + * @return ApiResponse<CreativeResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The found creative is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public ApiResponse getCreativeWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getCreativeValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get a Creative from its id + * @param id The creative identifier to retrieve. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The found creative is returned. -
400 The request contained invalid parameters. -
401 The request was not properly authorized. -
500 A non-request based error occurred on the server. -
+ */ + public okhttp3.Call getCreativeAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getCreativeValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/GatewayApi.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/GatewayApi.java similarity index 90% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/GatewayApi.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/GatewayApi.java index e52a4374..e70de3dd 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/api/GatewayApi.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/api/GatewayApi.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,23 +11,23 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.api; +package com.criteo.api.marketingsolutions.v2024_07.api; -import com.criteo.api.marketingsolutions.v2023_04.ApiCallback; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.ApiResponse; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.Pair; -import com.criteo.api.marketingsolutions.v2023_04.ProgressRequestBody; -import com.criteo.api.marketingsolutions.v2023_04.ProgressResponseBody; +import com.criteo.api.marketingsolutions.v2024_07.ApiCallback; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.ApiResponse; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.Pair; +import com.criteo.api.marketingsolutions.v2024_07.ProgressRequestBody; +import com.criteo.api.marketingsolutions.v2024_07.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; -import com.criteo.api.marketingsolutions.v2023_04.model.ApplicationSummaryModelResponse; +import com.criteo.api.marketingsolutions.v2024_07.model.ApplicationSummaryModelResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -102,7 +102,7 @@ public okhttp3.Call getCurrentApplicationCall(final ApiCallback _callback) throw Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/marketing-solutions/me"; + String localVarPath = "/2024-07/marketing-solutions/me"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/ApiKeyAuth.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/ApiKeyAuth.java similarity index 88% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/ApiKeyAuth.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/ApiKeyAuth.java index 19bbf917..df1e2590 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/ApiKeyAuth.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/ApiKeyAuth.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,10 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.auth; +package com.criteo.api.marketingsolutions.v2024_07.auth; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Pair; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Pair; import java.net.URI; import java.util.Map; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/Authentication.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/Authentication.java similarity index 80% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/Authentication.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/Authentication.java index 393583e2..a2212140 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/Authentication.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/Authentication.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,10 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.auth; +package com.criteo.api.marketingsolutions.v2024_07.auth; -import com.criteo.api.marketingsolutions.v2023_04.Pair; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Pair; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; import java.net.URI; import java.util.Map; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/HttpBasicAuth.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/HttpBasicAuth.java similarity index 84% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/HttpBasicAuth.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/HttpBasicAuth.java index bb6d6656..d6fdc762 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/HttpBasicAuth.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/HttpBasicAuth.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,10 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.auth; +package com.criteo.api.marketingsolutions.v2024_07.auth; -import com.criteo.api.marketingsolutions.v2023_04.Pair; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Pair; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; import okhttp3.Credentials; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/HttpBearerAuth.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/HttpBearerAuth.java similarity index 87% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/HttpBearerAuth.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/HttpBearerAuth.java index c7b6e924..13eaf048 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/HttpBearerAuth.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/HttpBearerAuth.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,10 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.auth; +package com.criteo.api.marketingsolutions.v2024_07.auth; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Pair; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Pair; import java.net.URI; import java.util.Map; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/OAuth.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/OAuth.java similarity index 80% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/OAuth.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/OAuth.java index a61b485a..63004ee0 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/OAuth.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/OAuth.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,10 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.auth; +package com.criteo.api.marketingsolutions.v2024_07.auth; -import com.criteo.api.marketingsolutions.v2023_04.Pair; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Pair; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; import java.net.URI; import java.util.Map; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/OAuthFlow.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/OAuthFlow.java similarity index 84% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/OAuthFlow.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/OAuthFlow.java index 59f23620..c87fddae 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/OAuthFlow.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/OAuthFlow.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.auth; +package com.criteo.api.marketingsolutions.v2024_07.auth; /** * OAuth flows that are supported by this client diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/OAuthOkHttpClient.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/OAuthOkHttpClient.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/OAuthOkHttpClient.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/OAuthOkHttpClient.java index 6197bd15..7341bff8 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/OAuthOkHttpClient.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/OAuthOkHttpClient.java @@ -1,4 +1,4 @@ -package com.criteo.api.marketingsolutions.v2023_04.auth; +package com.criteo.api.marketingsolutions.v2024_07.auth; import okhttp3.OkHttpClient; import okhttp3.MediaType; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/RetryingOAuth.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/RetryingOAuth.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/RetryingOAuth.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/RetryingOAuth.java index fdc9a42f..ff35f55e 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/auth/RetryingOAuth.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/auth/RetryingOAuth.java @@ -1,7 +1,7 @@ -package com.criteo.api.marketingsolutions.v2023_04.auth; +package com.criteo.api.marketingsolutions.v2024_07.auth; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Pair; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.Pair; import okhttp3.Interceptor; import okhttp3.OkHttpClient; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AbstractOpenApiSchema.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AbstractOpenApiSchema.java similarity index 95% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AbstractOpenApiSchema.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AbstractOpenApiSchema.java index cedd1b74..d3f40665 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AbstractOpenApiSchema.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AbstractOpenApiSchema.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,9 +11,9 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; import java.util.Objects; import java.lang.reflect.Type; import java.util.Map; diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Ad.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Ad.java new file mode 100644 index 00000000..ad74b4ee --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Ad.java @@ -0,0 +1,533 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * An ad is the binding that connects a creative with an ad set + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Ad { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_CREATIVE_ID = "creativeId"; + @SerializedName(SERIALIZED_NAME_CREATIVE_ID) + private String creativeId; + + public static final String SERIALIZED_NAME_AD_SET_ID = "adSetId"; + @SerializedName(SERIALIZED_NAME_AD_SET_ID) + private String adSetId; + + /** + * The inventory the Ad belongs to. Possible values are \"Display\" and \"Native\". This is optional since this doesn't make sense for every creative type but will throw an error if not set for a dynamic creative. + */ + @JsonAdapter(InventoryTypeEnum.Adapter.class) + public enum InventoryTypeEnum { + NATIVE("Native"), + + DISPLAY("Display"), + + VIDEO("Video"); + + private String value; + + InventoryTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InventoryTypeEnum fromValue(String value) { + for (InventoryTypeEnum b : InventoryTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final InventoryTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InventoryTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return InventoryTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_INVENTORY_TYPE = "inventoryType"; + @SerializedName(SERIALIZED_NAME_INVENTORY_TYPE) + private InventoryTypeEnum inventoryType; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private String endDate; + + public Ad() { + } + + public Ad name(String name) { + + this.name = name; + return this; + } + + /** + * The name of the ad + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public Ad description(String description) { + + this.description = description; + return this; + } + + /** + * The description of the ad + * @return description + **/ + @javax.annotation.Nullable + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public Ad creativeId(String creativeId) { + + this.creativeId = creativeId; + return this; + } + + /** + * The id of the Creative binded to this Ad + * @return creativeId + **/ + @javax.annotation.Nullable + + public String getCreativeId() { + return creativeId; + } + + + public void setCreativeId(String creativeId) { + this.creativeId = creativeId; + } + + + public Ad adSetId(String adSetId) { + + this.adSetId = adSetId; + return this; + } + + /** + * The id of the Ad Set binded to this Ad + * @return adSetId + **/ + @javax.annotation.Nullable + + public String getAdSetId() { + return adSetId; + } + + + public void setAdSetId(String adSetId) { + this.adSetId = adSetId; + } + + + public Ad inventoryType(InventoryTypeEnum inventoryType) { + + this.inventoryType = inventoryType; + return this; + } + + /** + * The inventory the Ad belongs to. Possible values are \"Display\" and \"Native\". This is optional since this doesn't make sense for every creative type but will throw an error if not set for a dynamic creative. + * @return inventoryType + **/ + @javax.annotation.Nullable + + public InventoryTypeEnum getInventoryType() { + return inventoryType; + } + + + public void setInventoryType(InventoryTypeEnum inventoryType) { + this.inventoryType = inventoryType; + } + + + public Ad startDate(String startDate) { + + this.startDate = startDate; + return this; + } + + /** + * The date when the ad will be launched String must be in ISO8601 format + * @return startDate + **/ + @javax.annotation.Nullable + + public String getStartDate() { + return startDate; + } + + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + + public Ad endDate(String endDate) { + + this.endDate = endDate; + return this; + } + + /** + * The date when when we will stop to show this ad. If the end date is not specified (i.e. null) then the ad will go on forever String must be in ISO8601 format + * @return endDate + **/ + @javax.annotation.Nullable + + public String getEndDate() { + return endDate; + } + + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Ad instance itself + */ + public Ad putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Ad ad = (Ad) o; + return Objects.equals(this.name, ad.name) && + Objects.equals(this.description, ad.description) && + Objects.equals(this.creativeId, ad.creativeId) && + Objects.equals(this.adSetId, ad.adSetId) && + Objects.equals(this.inventoryType, ad.inventoryType) && + Objects.equals(this.startDate, ad.startDate) && + Objects.equals(this.endDate, ad.endDate)&& + Objects.equals(this.additionalProperties, ad.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, creativeId, adSetId, inventoryType, startDate, endDate, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Ad {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" creativeId: ").append(toIndentedString(creativeId)).append("\n"); + sb.append(" adSetId: ").append(toIndentedString(adSetId)).append("\n"); + sb.append(" inventoryType: ").append(toIndentedString(inventoryType)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("creativeId"); + openapiFields.add("adSetId"); + openapiFields.add("inventoryType"); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to Ad + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!Ad.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Ad is not found in the empty JSON string", Ad.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("creativeId") != null && !jsonObj.get("creativeId").isJsonNull()) && !jsonObj.get("creativeId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `creativeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creativeId").toString())); + } + if ((jsonObj.get("adSetId") != null && !jsonObj.get("adSetId").isJsonNull()) && !jsonObj.get("adSetId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `adSetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("adSetId").toString())); + } + if ((jsonObj.get("inventoryType") != null && !jsonObj.get("inventoryType").isJsonNull()) && !jsonObj.get("inventoryType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `inventoryType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inventoryType").toString())); + } + if ((jsonObj.get("startDate") != null && !jsonObj.get("startDate").isJsonNull()) && !jsonObj.get("startDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `startDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("startDate").toString())); + } + if ((jsonObj.get("endDate") != null && !jsonObj.get("endDate").isJsonNull()) && !jsonObj.get("endDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Ad.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Ad' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Ad.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Ad value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Ad read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + Ad instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Ad given an JSON string + * + * @param jsonString JSON string + * @return An instance of Ad + * @throws IOException if the JSON string is invalid with respect to Ad + */ + public static Ad fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Ad.class); + } + + /** + * Convert an instance of Ad to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdListResponse.java new file mode 100644 index 00000000..04830d22 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdListResponse.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AdResource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for a list of response resources + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public AdListResponse() { + } + + + public AdListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public AdListResponse data(List data) { + + this.data = data; + return this; + } + + public AdListResponse addDataItem(AdResource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AdListResponse instance itself + */ + public AdListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdListResponse adListResponse = (AdListResponse) o; + return Objects.equals(this.data, adListResponse.data) && + Objects.equals(this.warnings, adListResponse.warnings) && + Objects.equals(this.errors, adListResponse.errors)&& + Objects.equals(this.additionalProperties, adListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AdListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AdListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdListResponse is not found in the empty JSON string", AdListResponse.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AdResource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AdListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AdListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AdListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdListResponse + * @throws IOException if the JSON string is invalid with respect to AdListResponse + */ + public static AdListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdListResponse.class); + } + + /** + * Convert an instance of AdListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdResource.java new file mode 100644 index 00000000..a3f64093 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdResource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.Ad; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdResource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private Ad attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AdResource() { + } + + public AdResource attributes(Ad attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public Ad getAttributes() { + return attributes; + } + + + public void setAttributes(Ad attributes) { + this.attributes = attributes; + } + + + public AdResource id(String id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AdResource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AdResource instance itself + */ + public AdResource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdResource adResource = (AdResource) o; + return Objects.equals(this.attributes, adResource.attributes) && + Objects.equals(this.id, adResource.id) && + Objects.equals(this.type, adResource.type)&& + Objects.equals(this.additionalProperties, adResource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AdResource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AdResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdResource is not found in the empty JSON string", AdResource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + Ad.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdResource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdResource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdResource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdResource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AdResource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AdResource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AdResource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdResource + * @throws IOException if the JSON string is invalid with respect to AdResource + */ + public static AdResource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdResource.class); + } + + /** + * Convert an instance of AdResource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdResponse.java new file mode 100644 index 00000000..c35106e8 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdResponse.java @@ -0,0 +1,375 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AdResource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for response resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private AdResource data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public AdResponse() { + } + + + public AdResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public AdResponse data(AdResource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public AdResource getData() { + return data; + } + + + public void setData(AdResource data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AdResponse instance itself + */ + public AdResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdResponse adResponse = (AdResponse) o; + return Objects.equals(this.data, adResponse.data) && + Objects.equals(this.warnings, adResponse.warnings) && + Objects.equals(this.errors, adResponse.errors)&& + Objects.equals(this.additionalProperties, adResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AdResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AdResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdResponse is not found in the empty JSON string", AdResponse.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + AdResource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AdResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AdResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AdResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdResponse + * @throws IOException if the JSON string is invalid with respect to AdResponse + */ + public static AdResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdResponse.class); + } + + /** + * Convert an instance of AdResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1.java new file mode 100644 index 00000000..7ee8dd77 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1.java @@ -0,0 +1,292 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Link Audience with an ad set + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdSetAudienceLinkEntityV1 { + public static final String SERIALIZED_NAME_AUDIENCE_ID = "audienceId"; + @SerializedName(SERIALIZED_NAME_AUDIENCE_ID) + private String audienceId; + + public AdSetAudienceLinkEntityV1() { + } + + public AdSetAudienceLinkEntityV1 audienceId(String audienceId) { + + this.audienceId = audienceId; + return this; + } + + /** + * Get audienceId + * @return audienceId + **/ + @javax.annotation.Nullable + + public String getAudienceId() { + return audienceId; + } + + + public void setAudienceId(String audienceId) { + this.audienceId = audienceId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AdSetAudienceLinkEntityV1 instance itself + */ + public AdSetAudienceLinkEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdSetAudienceLinkEntityV1 adSetAudienceLinkEntityV1 = (AdSetAudienceLinkEntityV1) o; + return Objects.equals(this.audienceId, adSetAudienceLinkEntityV1.audienceId)&& + Objects.equals(this.additionalProperties, adSetAudienceLinkEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(audienceId, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdSetAudienceLinkEntityV1 {\n"); + sb.append(" audienceId: ").append(toIndentedString(audienceId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("audienceId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AdSetAudienceLinkEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AdSetAudienceLinkEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetAudienceLinkEntityV1 is not found in the empty JSON string", AdSetAudienceLinkEntityV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("audienceId") != null && !jsonObj.get("audienceId").isJsonNull()) && !jsonObj.get("audienceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `audienceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("audienceId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdSetAudienceLinkEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdSetAudienceLinkEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdSetAudienceLinkEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdSetAudienceLinkEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AdSetAudienceLinkEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AdSetAudienceLinkEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AdSetAudienceLinkEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdSetAudienceLinkEntityV1 + * @throws IOException if the JSON string is invalid with respect to AdSetAudienceLinkEntityV1 + */ + public static AdSetAudienceLinkEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdSetAudienceLinkEntityV1.class); + } + + /** + * Convert an instance of AdSetAudienceLinkEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1Resource.java new file mode 100644 index 00000000..4732a31c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetAudienceLinkEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdSetAudienceLinkEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AdSetAudienceLinkEntityV1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AdSetAudienceLinkEntityV1Resource() { + } + + public AdSetAudienceLinkEntityV1Resource attributes(AdSetAudienceLinkEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AdSetAudienceLinkEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AdSetAudienceLinkEntityV1 attributes) { + this.attributes = attributes; + } + + + public AdSetAudienceLinkEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AdSetAudienceLinkEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AdSetAudienceLinkEntityV1Resource instance itself + */ + public AdSetAudienceLinkEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdSetAudienceLinkEntityV1Resource adSetAudienceLinkEntityV1Resource = (AdSetAudienceLinkEntityV1Resource) o; + return Objects.equals(this.attributes, adSetAudienceLinkEntityV1Resource.attributes) && + Objects.equals(this.id, adSetAudienceLinkEntityV1Resource.id) && + Objects.equals(this.type, adSetAudienceLinkEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, adSetAudienceLinkEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdSetAudienceLinkEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AdSetAudienceLinkEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AdSetAudienceLinkEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetAudienceLinkEntityV1Resource is not found in the empty JSON string", AdSetAudienceLinkEntityV1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AdSetAudienceLinkEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdSetAudienceLinkEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdSetAudienceLinkEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdSetAudienceLinkEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdSetAudienceLinkEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AdSetAudienceLinkEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AdSetAudienceLinkEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AdSetAudienceLinkEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdSetAudienceLinkEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AdSetAudienceLinkEntityV1Resource + */ + public static AdSetAudienceLinkEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdSetAudienceLinkEntityV1Resource.class); + } + + /** + * Convert an instance of AdSetAudienceLinkEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1Response.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1Response.java new file mode 100644 index 00000000..0719ab32 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkEntityV1Response.java @@ -0,0 +1,375 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetAudienceLinkEntityV1Resource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single entity + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdSetAudienceLinkEntityV1Response { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private AdSetAudienceLinkEntityV1Resource data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public AdSetAudienceLinkEntityV1Response() { + } + + + public AdSetAudienceLinkEntityV1Response( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public AdSetAudienceLinkEntityV1Response data(AdSetAudienceLinkEntityV1Resource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public AdSetAudienceLinkEntityV1Resource getData() { + return data; + } + + + public void setData(AdSetAudienceLinkEntityV1Resource data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AdSetAudienceLinkEntityV1Response instance itself + */ + public AdSetAudienceLinkEntityV1Response putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdSetAudienceLinkEntityV1Response adSetAudienceLinkEntityV1Response = (AdSetAudienceLinkEntityV1Response) o; + return Objects.equals(this.data, adSetAudienceLinkEntityV1Response.data) && + Objects.equals(this.warnings, adSetAudienceLinkEntityV1Response.warnings) && + Objects.equals(this.errors, adSetAudienceLinkEntityV1Response.errors)&& + Objects.equals(this.additionalProperties, adSetAudienceLinkEntityV1Response.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdSetAudienceLinkEntityV1Response {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AdSetAudienceLinkEntityV1Response + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AdSetAudienceLinkEntityV1Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetAudienceLinkEntityV1Response is not found in the empty JSON string", AdSetAudienceLinkEntityV1Response.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + AdSetAudienceLinkEntityV1Resource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdSetAudienceLinkEntityV1Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdSetAudienceLinkEntityV1Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdSetAudienceLinkEntityV1Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdSetAudienceLinkEntityV1Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AdSetAudienceLinkEntityV1Response read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AdSetAudienceLinkEntityV1Response instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AdSetAudienceLinkEntityV1Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdSetAudienceLinkEntityV1Response + * @throws IOException if the JSON string is invalid with respect to AdSetAudienceLinkEntityV1Response + */ + public static AdSetAudienceLinkEntityV1Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdSetAudienceLinkEntityV1Response.class); + } + + /** + * Convert an instance of AdSetAudienceLinkEntityV1Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkInputEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkInputEntityV1.java new file mode 100644 index 00000000..fd793d86 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetAudienceLinkInputEntityV1.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetAudienceLinkEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Input to set audience ad set link. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdSetAudienceLinkInputEntityV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private AdSetAudienceLinkEntityV1Resource data; + + public AdSetAudienceLinkInputEntityV1() { + } + + public AdSetAudienceLinkInputEntityV1 data(AdSetAudienceLinkEntityV1Resource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public AdSetAudienceLinkEntityV1Resource getData() { + return data; + } + + + public void setData(AdSetAudienceLinkEntityV1Resource data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AdSetAudienceLinkInputEntityV1 instance itself + */ + public AdSetAudienceLinkInputEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdSetAudienceLinkInputEntityV1 adSetAudienceLinkInputEntityV1 = (AdSetAudienceLinkInputEntityV1) o; + return Objects.equals(this.data, adSetAudienceLinkInputEntityV1.data)&& + Objects.equals(this.additionalProperties, adSetAudienceLinkInputEntityV1.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdSetAudienceLinkInputEntityV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AdSetAudienceLinkInputEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AdSetAudienceLinkInputEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetAudienceLinkInputEntityV1 is not found in the empty JSON string", AdSetAudienceLinkInputEntityV1.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + AdSetAudienceLinkEntityV1Resource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdSetAudienceLinkInputEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdSetAudienceLinkInputEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdSetAudienceLinkInputEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdSetAudienceLinkInputEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AdSetAudienceLinkInputEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AdSetAudienceLinkInputEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AdSetAudienceLinkInputEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdSetAudienceLinkInputEntityV1 + * @throws IOException if the JSON string is invalid with respect to AdSetAudienceLinkInputEntityV1 + */ + public static AdSetAudienceLinkInputEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdSetAudienceLinkInputEntityV1.class); + } + + /** + * Convert an instance of AdSetAudienceLinkInputEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetCategoryBid.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetCategoryBid.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetCategoryBid.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetCategoryBid.java index b8ca4829..48765d12 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetCategoryBid.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetCategoryBid.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Category Bid information about a Category for a given Ad Set. diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetCategoryBidListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetCategoryBidListResponse.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetCategoryBidListResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetCategoryBidListResponse.java index 37aba980..693edfd8 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetCategoryBidListResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetCategoryBidListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AdSetCategoryBidResource; -import com.criteo.api.marketingsolutions.v2023_04.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetCategoryBidResource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Data model for a list of response resources diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetCategoryBidResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetCategoryBidResource.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetCategoryBidResource.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetCategoryBidResource.java index af07d0de..78dd0b2c 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetCategoryBidResource.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetCategoryBidResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AdSetCategoryBid; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetCategoryBid; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDeliveryLimitations.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDeliveryLimitationsV24Q1.java similarity index 86% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDeliveryLimitations.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDeliveryLimitationsV24Q1.java index 33bb69af..996d14f7 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDeliveryLimitations.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDeliveryLimitationsV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,13 +44,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * ad set delivery limitations model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdSetDeliveryLimitations { +public class AdSetDeliveryLimitationsV24Q1 { /** * Gets or Sets environments */ @@ -210,16 +210,16 @@ public OperatingSystemsEnum read(final JsonReader jsonReader) throws IOException @SerializedName(SERIALIZED_NAME_OPERATING_SYSTEMS) private List operatingSystems = null; - public AdSetDeliveryLimitations() { + public AdSetDeliveryLimitationsV24Q1() { } - public AdSetDeliveryLimitations environments(List environments) { + public AdSetDeliveryLimitationsV24Q1 environments(List environments) { this.environments = environments; return this; } - public AdSetDeliveryLimitations addEnvironmentsItem(EnvironmentsEnum environmentsItem) { + public AdSetDeliveryLimitationsV24Q1 addEnvironmentsItem(EnvironmentsEnum environmentsItem) { if (this.environments == null) { this.environments = null; } @@ -243,13 +243,13 @@ public void setEnvironments(List environments) { } - public AdSetDeliveryLimitations devices(List devices) { + public AdSetDeliveryLimitationsV24Q1 devices(List devices) { this.devices = devices; return this; } - public AdSetDeliveryLimitations addDevicesItem(DevicesEnum devicesItem) { + public AdSetDeliveryLimitationsV24Q1 addDevicesItem(DevicesEnum devicesItem) { if (this.devices == null) { this.devices = null; } @@ -273,13 +273,13 @@ public void setDevices(List devices) { } - public AdSetDeliveryLimitations operatingSystems(List operatingSystems) { + public AdSetDeliveryLimitationsV24Q1 operatingSystems(List operatingSystems) { this.operatingSystems = operatingSystems; return this; } - public AdSetDeliveryLimitations addOperatingSystemsItem(OperatingSystemsEnum operatingSystemsItem) { + public AdSetDeliveryLimitationsV24Q1 addOperatingSystemsItem(OperatingSystemsEnum operatingSystemsItem) { if (this.operatingSystems == null) { this.operatingSystems = null; } @@ -315,9 +315,9 @@ public void setOperatingSystems(List operatingSystems) { * * @param key name of the property * @param value value of the property - * @return the AdSetDeliveryLimitations instance itself + * @return the AdSetDeliveryLimitationsV24Q1 instance itself */ - public AdSetDeliveryLimitations putAdditionalProperty(String key, Object value) { + public AdSetDeliveryLimitationsV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -356,11 +356,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdSetDeliveryLimitations adSetDeliveryLimitations = (AdSetDeliveryLimitations) o; - return Objects.equals(this.environments, adSetDeliveryLimitations.environments) && - Objects.equals(this.devices, adSetDeliveryLimitations.devices) && - Objects.equals(this.operatingSystems, adSetDeliveryLimitations.operatingSystems)&& - Objects.equals(this.additionalProperties, adSetDeliveryLimitations.additionalProperties); + AdSetDeliveryLimitationsV24Q1 adSetDeliveryLimitationsV24Q1 = (AdSetDeliveryLimitationsV24Q1) o; + return Objects.equals(this.environments, adSetDeliveryLimitationsV24Q1.environments) && + Objects.equals(this.devices, adSetDeliveryLimitationsV24Q1.devices) && + Objects.equals(this.operatingSystems, adSetDeliveryLimitationsV24Q1.operatingSystems)&& + Objects.equals(this.additionalProperties, adSetDeliveryLimitationsV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -382,7 +382,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AdSetDeliveryLimitations {\n"); + sb.append("class AdSetDeliveryLimitationsV24Q1 {\n"); sb.append(" environments: ").append(toIndentedString(environments)).append("\n"); sb.append(" devices: ").append(toIndentedString(devices)).append("\n"); sb.append(" operatingSystems: ").append(toIndentedString(operatingSystems)).append("\n"); @@ -421,12 +421,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AdSetDeliveryLimitations + * @throws IOException if the JSON Object is invalid with respect to AdSetDeliveryLimitationsV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!AdSetDeliveryLimitations.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetDeliveryLimitations is not found in the empty JSON string", AdSetDeliveryLimitations.openapiRequiredFields.toString())); + if (!AdSetDeliveryLimitationsV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetDeliveryLimitationsV24Q1 is not found in the empty JSON string", AdSetDeliveryLimitationsV24Q1.openapiRequiredFields.toString())); } } // ensure the optional json data is an array if present @@ -447,16 +447,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AdSetDeliveryLimitations.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AdSetDeliveryLimitations' and its subtypes + if (!AdSetDeliveryLimitationsV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdSetDeliveryLimitationsV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AdSetDeliveryLimitations.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdSetDeliveryLimitationsV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AdSetDeliveryLimitations value) throws IOException { + public void write(JsonWriter out, AdSetDeliveryLimitationsV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -479,11 +479,11 @@ else if (entry.getValue() instanceof Character) } @Override - public AdSetDeliveryLimitations read(JsonReader in) throws IOException { + public AdSetDeliveryLimitationsV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - AdSetDeliveryLimitations instance = thisAdapter.fromJsonTree(jsonObj); + AdSetDeliveryLimitationsV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -510,18 +510,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AdSetDeliveryLimitations given an JSON string + * Create an instance of AdSetDeliveryLimitationsV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of AdSetDeliveryLimitations - * @throws IOException if the JSON string is invalid with respect to AdSetDeliveryLimitations + * @return An instance of AdSetDeliveryLimitationsV24Q1 + * @throws IOException if the JSON string is invalid with respect to AdSetDeliveryLimitationsV24Q1 */ - public static AdSetDeliveryLimitations fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AdSetDeliveryLimitations.class); + public static AdSetDeliveryLimitationsV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdSetDeliveryLimitationsV24Q1.class); } /** - * Convert an instance of AdSetDeliveryLimitations to an JSON string + * Convert an instance of AdSetDeliveryLimitationsV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDisplayMultiplier.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDisplayMultiplier.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDisplayMultiplier.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDisplayMultiplier.java index a9ac43a1..dfadf133 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDisplayMultiplier.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDisplayMultiplier.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Display Multiplier information about a Category for a given Ad Set. diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDisplayMultiplierListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDisplayMultiplierListResponse.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDisplayMultiplierListResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDisplayMultiplierListResponse.java index dd30f483..ff9db0e8 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDisplayMultiplierListResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDisplayMultiplierListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AdSetDisplayMultiplierResource; -import com.criteo.api.marketingsolutions.v2023_04.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetDisplayMultiplierResource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Data model for a list of response resources diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDisplayMultiplierResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDisplayMultiplierResource.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDisplayMultiplierResource.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDisplayMultiplierResource.java index 8ca62be4..2d925814 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetDisplayMultiplierResource.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetDisplayMultiplierResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AdSetDisplayMultiplier; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetDisplayMultiplier; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetFrequencyCapping.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetFrequencyCappingV24Q1.java similarity index 84% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetFrequencyCapping.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetFrequencyCappingV24Q1.java index c56e9509..32f44465 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetFrequencyCapping.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetFrequencyCappingV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,13 +42,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * ad set frequency capping model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdSetFrequencyCapping { +public class AdSetFrequencyCappingV24Q1 { /** * Gets or Sets frequency */ @@ -108,10 +108,10 @@ public FrequencyEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_MAXIMUM_IMPRESSIONS) private Integer maximumImpressions; - public AdSetFrequencyCapping() { + public AdSetFrequencyCappingV24Q1() { } - public AdSetFrequencyCapping frequency(FrequencyEnum frequency) { + public AdSetFrequencyCappingV24Q1 frequency(FrequencyEnum frequency) { this.frequency = frequency; return this; @@ -133,7 +133,7 @@ public void setFrequency(FrequencyEnum frequency) { } - public AdSetFrequencyCapping maximumImpressions(Integer maximumImpressions) { + public AdSetFrequencyCappingV24Q1 maximumImpressions(Integer maximumImpressions) { this.maximumImpressions = maximumImpressions; return this; @@ -167,9 +167,9 @@ public void setMaximumImpressions(Integer maximumImpressions) { * * @param key name of the property * @param value value of the property - * @return the AdSetFrequencyCapping instance itself + * @return the AdSetFrequencyCappingV24Q1 instance itself */ - public AdSetFrequencyCapping putAdditionalProperty(String key, Object value) { + public AdSetFrequencyCappingV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -208,10 +208,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdSetFrequencyCapping adSetFrequencyCapping = (AdSetFrequencyCapping) o; - return Objects.equals(this.frequency, adSetFrequencyCapping.frequency) && - Objects.equals(this.maximumImpressions, adSetFrequencyCapping.maximumImpressions)&& - Objects.equals(this.additionalProperties, adSetFrequencyCapping.additionalProperties); + AdSetFrequencyCappingV24Q1 adSetFrequencyCappingV24Q1 = (AdSetFrequencyCappingV24Q1) o; + return Objects.equals(this.frequency, adSetFrequencyCappingV24Q1.frequency) && + Objects.equals(this.maximumImpressions, adSetFrequencyCappingV24Q1.maximumImpressions)&& + Objects.equals(this.additionalProperties, adSetFrequencyCappingV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -233,7 +233,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AdSetFrequencyCapping {\n"); + sb.append("class AdSetFrequencyCappingV24Q1 {\n"); sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); sb.append(" maximumImpressions: ").append(toIndentedString(maximumImpressions)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -270,12 +270,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AdSetFrequencyCapping + * @throws IOException if the JSON Object is invalid with respect to AdSetFrequencyCappingV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!AdSetFrequencyCapping.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetFrequencyCapping is not found in the empty JSON string", AdSetFrequencyCapping.openapiRequiredFields.toString())); + if (!AdSetFrequencyCappingV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetFrequencyCappingV24Q1 is not found in the empty JSON string", AdSetFrequencyCappingV24Q1.openapiRequiredFields.toString())); } } if ((jsonObj.get("frequency") != null && !jsonObj.get("frequency").isJsonNull()) && !jsonObj.get("frequency").isJsonPrimitive()) { @@ -287,16 +287,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AdSetFrequencyCapping.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AdSetFrequencyCapping' and its subtypes + if (!AdSetFrequencyCappingV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdSetFrequencyCappingV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AdSetFrequencyCapping.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdSetFrequencyCappingV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AdSetFrequencyCapping value) throws IOException { + public void write(JsonWriter out, AdSetFrequencyCappingV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -319,11 +319,11 @@ else if (entry.getValue() instanceof Character) } @Override - public AdSetFrequencyCapping read(JsonReader in) throws IOException { + public AdSetFrequencyCappingV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - AdSetFrequencyCapping instance = thisAdapter.fromJsonTree(jsonObj); + AdSetFrequencyCappingV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -350,18 +350,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AdSetFrequencyCapping given an JSON string + * Create an instance of AdSetFrequencyCappingV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of AdSetFrequencyCapping - * @throws IOException if the JSON string is invalid with respect to AdSetFrequencyCapping + * @return An instance of AdSetFrequencyCappingV24Q1 + * @throws IOException if the JSON string is invalid with respect to AdSetFrequencyCappingV24Q1 */ - public static AdSetFrequencyCapping fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AdSetFrequencyCapping.class); + public static AdSetFrequencyCappingV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdSetFrequencyCappingV24Q1.class); } /** - * Convert an instance of AdSetFrequencyCapping to an JSON string + * Convert an instance of AdSetFrequencyCappingV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetGeoLocation.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetGeoLocationV24Q1.java similarity index 74% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetGeoLocation.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetGeoLocationV24Q1.java index 0a25743f..294ca6fd 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetGeoLocation.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetGeoLocationV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.NillableAdSetTargetingRule; +import com.criteo.api.marketingsolutions.v2024_07.model.NillableAdSetTargetingRuleV24Q1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,29 +42,29 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * ad set geolocation model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdSetGeoLocation { +public class AdSetGeoLocationV24Q1 { public static final String SERIALIZED_NAME_COUNTRIES = "countries"; @SerializedName(SERIALIZED_NAME_COUNTRIES) - private NillableAdSetTargetingRule countries; + private NillableAdSetTargetingRuleV24Q1 countries; public static final String SERIALIZED_NAME_SUBDIVISIONS = "subdivisions"; @SerializedName(SERIALIZED_NAME_SUBDIVISIONS) - private NillableAdSetTargetingRule subdivisions; + private NillableAdSetTargetingRuleV24Q1 subdivisions; public static final String SERIALIZED_NAME_ZIP_CODES = "zipCodes"; @SerializedName(SERIALIZED_NAME_ZIP_CODES) - private NillableAdSetTargetingRule zipCodes; + private NillableAdSetTargetingRuleV24Q1 zipCodes; - public AdSetGeoLocation() { + public AdSetGeoLocationV24Q1() { } - public AdSetGeoLocation countries(NillableAdSetTargetingRule countries) { + public AdSetGeoLocationV24Q1 countries(NillableAdSetTargetingRuleV24Q1 countries) { this.countries = countries; return this; @@ -76,17 +76,17 @@ public AdSetGeoLocation countries(NillableAdSetTargetingRule countries) { **/ @javax.annotation.Nullable - public NillableAdSetTargetingRule getCountries() { + public NillableAdSetTargetingRuleV24Q1 getCountries() { return countries; } - public void setCountries(NillableAdSetTargetingRule countries) { + public void setCountries(NillableAdSetTargetingRuleV24Q1 countries) { this.countries = countries; } - public AdSetGeoLocation subdivisions(NillableAdSetTargetingRule subdivisions) { + public AdSetGeoLocationV24Q1 subdivisions(NillableAdSetTargetingRuleV24Q1 subdivisions) { this.subdivisions = subdivisions; return this; @@ -98,17 +98,17 @@ public AdSetGeoLocation subdivisions(NillableAdSetTargetingRule subdivisions) { **/ @javax.annotation.Nullable - public NillableAdSetTargetingRule getSubdivisions() { + public NillableAdSetTargetingRuleV24Q1 getSubdivisions() { return subdivisions; } - public void setSubdivisions(NillableAdSetTargetingRule subdivisions) { + public void setSubdivisions(NillableAdSetTargetingRuleV24Q1 subdivisions) { this.subdivisions = subdivisions; } - public AdSetGeoLocation zipCodes(NillableAdSetTargetingRule zipCodes) { + public AdSetGeoLocationV24Q1 zipCodes(NillableAdSetTargetingRuleV24Q1 zipCodes) { this.zipCodes = zipCodes; return this; @@ -120,12 +120,12 @@ public AdSetGeoLocation zipCodes(NillableAdSetTargetingRule zipCodes) { **/ @javax.annotation.Nullable - public NillableAdSetTargetingRule getZipCodes() { + public NillableAdSetTargetingRuleV24Q1 getZipCodes() { return zipCodes; } - public void setZipCodes(NillableAdSetTargetingRule zipCodes) { + public void setZipCodes(NillableAdSetTargetingRuleV24Q1 zipCodes) { this.zipCodes = zipCodes; } @@ -142,9 +142,9 @@ public void setZipCodes(NillableAdSetTargetingRule zipCodes) { * * @param key name of the property * @param value value of the property - * @return the AdSetGeoLocation instance itself + * @return the AdSetGeoLocationV24Q1 instance itself */ - public AdSetGeoLocation putAdditionalProperty(String key, Object value) { + public AdSetGeoLocationV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -183,11 +183,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdSetGeoLocation adSetGeoLocation = (AdSetGeoLocation) o; - return Objects.equals(this.countries, adSetGeoLocation.countries) && - Objects.equals(this.subdivisions, adSetGeoLocation.subdivisions) && - Objects.equals(this.zipCodes, adSetGeoLocation.zipCodes)&& - Objects.equals(this.additionalProperties, adSetGeoLocation.additionalProperties); + AdSetGeoLocationV24Q1 adSetGeoLocationV24Q1 = (AdSetGeoLocationV24Q1) o; + return Objects.equals(this.countries, adSetGeoLocationV24Q1.countries) && + Objects.equals(this.subdivisions, adSetGeoLocationV24Q1.subdivisions) && + Objects.equals(this.zipCodes, adSetGeoLocationV24Q1.zipCodes)&& + Objects.equals(this.additionalProperties, adSetGeoLocationV24Q1.additionalProperties); } @Override @@ -198,7 +198,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AdSetGeoLocation {\n"); + sb.append("class AdSetGeoLocationV24Q1 {\n"); sb.append(" countries: ").append(toIndentedString(countries)).append("\n"); sb.append(" subdivisions: ").append(toIndentedString(subdivisions)).append("\n"); sb.append(" zipCodes: ").append(toIndentedString(zipCodes)).append("\n"); @@ -237,25 +237,25 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AdSetGeoLocation + * @throws IOException if the JSON Object is invalid with respect to AdSetGeoLocationV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!AdSetGeoLocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetGeoLocation is not found in the empty JSON string", AdSetGeoLocation.openapiRequiredFields.toString())); + if (!AdSetGeoLocationV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetGeoLocationV24Q1 is not found in the empty JSON string", AdSetGeoLocationV24Q1.openapiRequiredFields.toString())); } } // validate the optional field `countries` if (jsonObj.get("countries") != null && !jsonObj.get("countries").isJsonNull()) { - NillableAdSetTargetingRule.validateJsonObject(jsonObj.getAsJsonObject("countries")); + NillableAdSetTargetingRuleV24Q1.validateJsonObject(jsonObj.getAsJsonObject("countries")); } // validate the optional field `subdivisions` if (jsonObj.get("subdivisions") != null && !jsonObj.get("subdivisions").isJsonNull()) { - NillableAdSetTargetingRule.validateJsonObject(jsonObj.getAsJsonObject("subdivisions")); + NillableAdSetTargetingRuleV24Q1.validateJsonObject(jsonObj.getAsJsonObject("subdivisions")); } // validate the optional field `zipCodes` if (jsonObj.get("zipCodes") != null && !jsonObj.get("zipCodes").isJsonNull()) { - NillableAdSetTargetingRule.validateJsonObject(jsonObj.getAsJsonObject("zipCodes")); + NillableAdSetTargetingRuleV24Q1.validateJsonObject(jsonObj.getAsJsonObject("zipCodes")); } } @@ -263,16 +263,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AdSetGeoLocation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AdSetGeoLocation' and its subtypes + if (!AdSetGeoLocationV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdSetGeoLocationV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AdSetGeoLocation.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdSetGeoLocationV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AdSetGeoLocation value) throws IOException { + public void write(JsonWriter out, AdSetGeoLocationV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -295,11 +295,11 @@ else if (entry.getValue() instanceof Character) } @Override - public AdSetGeoLocation read(JsonReader in) throws IOException { + public AdSetGeoLocationV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - AdSetGeoLocation instance = thisAdapter.fromJsonTree(jsonObj); + AdSetGeoLocationV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -326,18 +326,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AdSetGeoLocation given an JSON string + * Create an instance of AdSetGeoLocationV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of AdSetGeoLocation - * @throws IOException if the JSON string is invalid with respect to AdSetGeoLocation + * @return An instance of AdSetGeoLocationV24Q1 + * @throws IOException if the JSON string is invalid with respect to AdSetGeoLocationV24Q1 */ - public static AdSetGeoLocation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AdSetGeoLocation.class); + public static AdSetGeoLocationV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdSetGeoLocationV24Q1.class); } /** - * Convert an instance of AdSetGeoLocation to an JSON string + * Convert an instance of AdSetGeoLocationV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetSearchFilter.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetSearchFilterV24Q1.java similarity index 83% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetSearchFilter.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetSearchFilterV24Q1.java index d3ae5001..f42a5b7a 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetSearchFilter.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetSearchFilterV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,13 +44,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * filter on ad set ids */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdSetSearchFilter { +public class AdSetSearchFilterV24Q1 { public static final String SERIALIZED_NAME_AD_SET_IDS = "adSetIds"; @SerializedName(SERIALIZED_NAME_AD_SET_IDS) private List adSetIds = null; @@ -63,16 +63,16 @@ public class AdSetSearchFilter { @SerializedName(SERIALIZED_NAME_CAMPAIGN_IDS) private List campaignIds = null; - public AdSetSearchFilter() { + public AdSetSearchFilterV24Q1() { } - public AdSetSearchFilter adSetIds(List adSetIds) { + public AdSetSearchFilterV24Q1 adSetIds(List adSetIds) { this.adSetIds = adSetIds; return this; } - public AdSetSearchFilter addAdSetIdsItem(String adSetIdsItem) { + public AdSetSearchFilterV24Q1 addAdSetIdsItem(String adSetIdsItem) { if (this.adSetIds == null) { this.adSetIds = null; } @@ -96,13 +96,13 @@ public void setAdSetIds(List adSetIds) { } - public AdSetSearchFilter advertiserIds(List advertiserIds) { + public AdSetSearchFilterV24Q1 advertiserIds(List advertiserIds) { this.advertiserIds = advertiserIds; return this; } - public AdSetSearchFilter addAdvertiserIdsItem(String advertiserIdsItem) { + public AdSetSearchFilterV24Q1 addAdvertiserIdsItem(String advertiserIdsItem) { if (this.advertiserIds == null) { this.advertiserIds = null; } @@ -126,13 +126,13 @@ public void setAdvertiserIds(List advertiserIds) { } - public AdSetSearchFilter campaignIds(List campaignIds) { + public AdSetSearchFilterV24Q1 campaignIds(List campaignIds) { this.campaignIds = campaignIds; return this; } - public AdSetSearchFilter addCampaignIdsItem(String campaignIdsItem) { + public AdSetSearchFilterV24Q1 addCampaignIdsItem(String campaignIdsItem) { if (this.campaignIds == null) { this.campaignIds = null; } @@ -168,9 +168,9 @@ public void setCampaignIds(List campaignIds) { * * @param key name of the property * @param value value of the property - * @return the AdSetSearchFilter instance itself + * @return the AdSetSearchFilterV24Q1 instance itself */ - public AdSetSearchFilter putAdditionalProperty(String key, Object value) { + public AdSetSearchFilterV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -209,11 +209,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdSetSearchFilter adSetSearchFilter = (AdSetSearchFilter) o; - return Objects.equals(this.adSetIds, adSetSearchFilter.adSetIds) && - Objects.equals(this.advertiserIds, adSetSearchFilter.advertiserIds) && - Objects.equals(this.campaignIds, adSetSearchFilter.campaignIds)&& - Objects.equals(this.additionalProperties, adSetSearchFilter.additionalProperties); + AdSetSearchFilterV24Q1 adSetSearchFilterV24Q1 = (AdSetSearchFilterV24Q1) o; + return Objects.equals(this.adSetIds, adSetSearchFilterV24Q1.adSetIds) && + Objects.equals(this.advertiserIds, adSetSearchFilterV24Q1.advertiserIds) && + Objects.equals(this.campaignIds, adSetSearchFilterV24Q1.campaignIds)&& + Objects.equals(this.additionalProperties, adSetSearchFilterV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -235,7 +235,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AdSetSearchFilter {\n"); + sb.append("class AdSetSearchFilterV24Q1 {\n"); sb.append(" adSetIds: ").append(toIndentedString(adSetIds)).append("\n"); sb.append(" advertiserIds: ").append(toIndentedString(advertiserIds)).append("\n"); sb.append(" campaignIds: ").append(toIndentedString(campaignIds)).append("\n"); @@ -274,12 +274,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AdSetSearchFilter + * @throws IOException if the JSON Object is invalid with respect to AdSetSearchFilterV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!AdSetSearchFilter.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetSearchFilter is not found in the empty JSON string", AdSetSearchFilter.openapiRequiredFields.toString())); + if (!AdSetSearchFilterV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetSearchFilterV24Q1 is not found in the empty JSON string", AdSetSearchFilterV24Q1.openapiRequiredFields.toString())); } } // ensure the optional json data is an array if present @@ -300,16 +300,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AdSetSearchFilter.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AdSetSearchFilter' and its subtypes + if (!AdSetSearchFilterV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdSetSearchFilterV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AdSetSearchFilter.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdSetSearchFilterV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AdSetSearchFilter value) throws IOException { + public void write(JsonWriter out, AdSetSearchFilterV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -332,11 +332,11 @@ else if (entry.getValue() instanceof Character) } @Override - public AdSetSearchFilter read(JsonReader in) throws IOException { + public AdSetSearchFilterV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - AdSetSearchFilter instance = thisAdapter.fromJsonTree(jsonObj); + AdSetSearchFilterV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -363,18 +363,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AdSetSearchFilter given an JSON string + * Create an instance of AdSetSearchFilterV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of AdSetSearchFilter - * @throws IOException if the JSON string is invalid with respect to AdSetSearchFilter + * @return An instance of AdSetSearchFilterV24Q1 + * @throws IOException if the JSON string is invalid with respect to AdSetSearchFilterV24Q1 */ - public static AdSetSearchFilter fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AdSetSearchFilter.class); + public static AdSetSearchFilterV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdSetSearchFilterV24Q1.class); } /** - * Convert an instance of AdSetSearchFilter to an JSON string + * Convert an instance of AdSetSearchFilterV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestAdSetSearch.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetSearchRequestV24Q1.java similarity index 76% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestAdSetSearch.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetSearchRequestV24Q1.java index e91e998d..96b80266 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestAdSetSearch.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetSearchRequestV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AdSetSearchFilter; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetSearchFilterV24Q1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,21 +42,21 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * request payload of the search endpoint */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RequestAdSetSearch { +public class AdSetSearchRequestV24Q1 { public static final String SERIALIZED_NAME_FILTERS = "filters"; @SerializedName(SERIALIZED_NAME_FILTERS) - private AdSetSearchFilter filters; + private AdSetSearchFilterV24Q1 filters; - public RequestAdSetSearch() { + public AdSetSearchRequestV24Q1() { } - public RequestAdSetSearch filters(AdSetSearchFilter filters) { + public AdSetSearchRequestV24Q1 filters(AdSetSearchFilterV24Q1 filters) { this.filters = filters; return this; @@ -68,12 +68,12 @@ public RequestAdSetSearch filters(AdSetSearchFilter filters) { **/ @javax.annotation.Nullable - public AdSetSearchFilter getFilters() { + public AdSetSearchFilterV24Q1 getFilters() { return filters; } - public void setFilters(AdSetSearchFilter filters) { + public void setFilters(AdSetSearchFilterV24Q1 filters) { this.filters = filters; } @@ -90,9 +90,9 @@ public void setFilters(AdSetSearchFilter filters) { * * @param key name of the property * @param value value of the property - * @return the RequestAdSetSearch instance itself + * @return the AdSetSearchRequestV24Q1 instance itself */ - public RequestAdSetSearch putAdditionalProperty(String key, Object value) { + public AdSetSearchRequestV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -131,9 +131,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RequestAdSetSearch requestAdSetSearch = (RequestAdSetSearch) o; - return Objects.equals(this.filters, requestAdSetSearch.filters)&& - Objects.equals(this.additionalProperties, requestAdSetSearch.additionalProperties); + AdSetSearchRequestV24Q1 adSetSearchRequestV24Q1 = (AdSetSearchRequestV24Q1) o; + return Objects.equals(this.filters, adSetSearchRequestV24Q1.filters)&& + Objects.equals(this.additionalProperties, adSetSearchRequestV24Q1.additionalProperties); } @Override @@ -144,7 +144,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class RequestAdSetSearch {\n"); + sb.append("class AdSetSearchRequestV24Q1 {\n"); sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -179,17 +179,17 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RequestAdSetSearch + * @throws IOException if the JSON Object is invalid with respect to AdSetSearchRequestV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!RequestAdSetSearch.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RequestAdSetSearch is not found in the empty JSON string", RequestAdSetSearch.openapiRequiredFields.toString())); + if (!AdSetSearchRequestV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetSearchRequestV24Q1 is not found in the empty JSON string", AdSetSearchRequestV24Q1.openapiRequiredFields.toString())); } } // validate the optional field `filters` if (jsonObj.get("filters") != null && !jsonObj.get("filters").isJsonNull()) { - AdSetSearchFilter.validateJsonObject(jsonObj.getAsJsonObject("filters")); + AdSetSearchFilterV24Q1.validateJsonObject(jsonObj.getAsJsonObject("filters")); } } @@ -197,16 +197,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!RequestAdSetSearch.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RequestAdSetSearch' and its subtypes + if (!AdSetSearchRequestV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdSetSearchRequestV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RequestAdSetSearch.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdSetSearchRequestV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, RequestAdSetSearch value) throws IOException { + public void write(JsonWriter out, AdSetSearchRequestV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -229,11 +229,11 @@ else if (entry.getValue() instanceof Character) } @Override - public RequestAdSetSearch read(JsonReader in) throws IOException { + public AdSetSearchRequestV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - RequestAdSetSearch instance = thisAdapter.fromJsonTree(jsonObj); + AdSetSearchRequestV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -260,18 +260,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of RequestAdSetSearch given an JSON string + * Create an instance of AdSetSearchRequestV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of RequestAdSetSearch - * @throws IOException if the JSON string is invalid with respect to RequestAdSetSearch + * @return An instance of AdSetSearchRequestV24Q1 + * @throws IOException if the JSON string is invalid with respect to AdSetSearchRequestV24Q1 */ - public static RequestAdSetSearch fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RequestAdSetSearch.class); + public static AdSetSearchRequestV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdSetSearchRequestV24Q1.class); } /** - * Convert an instance of RequestAdSetSearch to an JSON string + * Convert an instance of AdSetSearchRequestV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetTargetingRule.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetTargetingRuleV24Q1.java similarity index 84% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetTargetingRule.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetTargetingRuleV24Q1.java index b4477c95..3ac821db 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetTargetingRule.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetTargetingRuleV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,13 +44,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * ad set targeting rule model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdSetTargetingRule { +public class AdSetTargetingRuleV24Q1 { /** * Gets or Sets operand */ @@ -108,10 +108,10 @@ public OperandEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_VALUES) private List values = null; - public AdSetTargetingRule() { + public AdSetTargetingRuleV24Q1() { } - public AdSetTargetingRule operand(OperandEnum operand) { + public AdSetTargetingRuleV24Q1 operand(OperandEnum operand) { this.operand = operand; return this; @@ -133,13 +133,13 @@ public void setOperand(OperandEnum operand) { } - public AdSetTargetingRule values(List values) { + public AdSetTargetingRuleV24Q1 values(List values) { this.values = values; return this; } - public AdSetTargetingRule addValuesItem(String valuesItem) { + public AdSetTargetingRuleV24Q1 addValuesItem(String valuesItem) { if (this.values == null) { this.values = null; } @@ -175,9 +175,9 @@ public void setValues(List values) { * * @param key name of the property * @param value value of the property - * @return the AdSetTargetingRule instance itself + * @return the AdSetTargetingRuleV24Q1 instance itself */ - public AdSetTargetingRule putAdditionalProperty(String key, Object value) { + public AdSetTargetingRuleV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -216,10 +216,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdSetTargetingRule adSetTargetingRule = (AdSetTargetingRule) o; - return Objects.equals(this.operand, adSetTargetingRule.operand) && - Objects.equals(this.values, adSetTargetingRule.values)&& - Objects.equals(this.additionalProperties, adSetTargetingRule.additionalProperties); + AdSetTargetingRuleV24Q1 adSetTargetingRuleV24Q1 = (AdSetTargetingRuleV24Q1) o; + return Objects.equals(this.operand, adSetTargetingRuleV24Q1.operand) && + Objects.equals(this.values, adSetTargetingRuleV24Q1.values)&& + Objects.equals(this.additionalProperties, adSetTargetingRuleV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -241,7 +241,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AdSetTargetingRule {\n"); + sb.append("class AdSetTargetingRuleV24Q1 {\n"); sb.append(" operand: ").append(toIndentedString(operand)).append("\n"); sb.append(" values: ").append(toIndentedString(values)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -278,12 +278,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AdSetTargetingRule + * @throws IOException if the JSON Object is invalid with respect to AdSetTargetingRuleV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!AdSetTargetingRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetTargetingRule is not found in the empty JSON string", AdSetTargetingRule.openapiRequiredFields.toString())); + if (!AdSetTargetingRuleV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetTargetingRuleV24Q1 is not found in the empty JSON string", AdSetTargetingRuleV24Q1.openapiRequiredFields.toString())); } } if ((jsonObj.get("operand") != null && !jsonObj.get("operand").isJsonNull()) && !jsonObj.get("operand").isJsonPrimitive()) { @@ -299,16 +299,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AdSetTargetingRule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AdSetTargetingRule' and its subtypes + if (!AdSetTargetingRuleV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdSetTargetingRuleV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AdSetTargetingRule.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdSetTargetingRuleV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AdSetTargetingRule value) throws IOException { + public void write(JsonWriter out, AdSetTargetingRuleV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -331,11 +331,11 @@ else if (entry.getValue() instanceof Character) } @Override - public AdSetTargetingRule read(JsonReader in) throws IOException { + public AdSetTargetingRuleV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - AdSetTargetingRule instance = thisAdapter.fromJsonTree(jsonObj); + AdSetTargetingRuleV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -362,18 +362,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AdSetTargetingRule given an JSON string + * Create an instance of AdSetTargetingRuleV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of AdSetTargetingRule - * @throws IOException if the JSON string is invalid with respect to AdSetTargetingRule + * @return An instance of AdSetTargetingRuleV24Q1 + * @throws IOException if the JSON string is invalid with respect to AdSetTargetingRuleV24Q1 */ - public static AdSetTargetingRule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AdSetTargetingRule.class); + public static AdSetTargetingRuleV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdSetTargetingRuleV24Q1.class); } /** - * Convert an instance of AdSetTargetingRule to an JSON string + * Convert an instance of AdSetTargetingRuleV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetTargeting.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetTargetingV24Q1.java similarity index 74% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetTargeting.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetTargetingV24Q1.java index ff4d3383..7a36fe9c 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AdSetTargeting.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdSetTargetingV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AdSetDeliveryLimitations; -import com.criteo.api.marketingsolutions.v2023_04.model.AdSetFrequencyCapping; -import com.criteo.api.marketingsolutions.v2023_04.model.AdSetGeoLocation; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetDeliveryLimitationsV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetFrequencyCappingV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetGeoLocationV24Q1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,29 +44,29 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * ad set targeting model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdSetTargeting { +public class AdSetTargetingV24Q1 { public static final String SERIALIZED_NAME_DELIVERY_LIMITATIONS = "deliveryLimitations"; @SerializedName(SERIALIZED_NAME_DELIVERY_LIMITATIONS) - private AdSetDeliveryLimitations deliveryLimitations; + private AdSetDeliveryLimitationsV24Q1 deliveryLimitations; public static final String SERIALIZED_NAME_GEO_LOCATION = "geoLocation"; @SerializedName(SERIALIZED_NAME_GEO_LOCATION) - private AdSetGeoLocation geoLocation; + private AdSetGeoLocationV24Q1 geoLocation; public static final String SERIALIZED_NAME_FREQUENCY_CAPPING = "frequencyCapping"; @SerializedName(SERIALIZED_NAME_FREQUENCY_CAPPING) - private AdSetFrequencyCapping frequencyCapping; + private AdSetFrequencyCappingV24Q1 frequencyCapping; - public AdSetTargeting() { + public AdSetTargetingV24Q1() { } - public AdSetTargeting deliveryLimitations(AdSetDeliveryLimitations deliveryLimitations) { + public AdSetTargetingV24Q1 deliveryLimitations(AdSetDeliveryLimitationsV24Q1 deliveryLimitations) { this.deliveryLimitations = deliveryLimitations; return this; @@ -78,17 +78,17 @@ public AdSetTargeting deliveryLimitations(AdSetDeliveryLimitations deliveryLimit **/ @javax.annotation.Nullable - public AdSetDeliveryLimitations getDeliveryLimitations() { + public AdSetDeliveryLimitationsV24Q1 getDeliveryLimitations() { return deliveryLimitations; } - public void setDeliveryLimitations(AdSetDeliveryLimitations deliveryLimitations) { + public void setDeliveryLimitations(AdSetDeliveryLimitationsV24Q1 deliveryLimitations) { this.deliveryLimitations = deliveryLimitations; } - public AdSetTargeting geoLocation(AdSetGeoLocation geoLocation) { + public AdSetTargetingV24Q1 geoLocation(AdSetGeoLocationV24Q1 geoLocation) { this.geoLocation = geoLocation; return this; @@ -100,17 +100,17 @@ public AdSetTargeting geoLocation(AdSetGeoLocation geoLocation) { **/ @javax.annotation.Nullable - public AdSetGeoLocation getGeoLocation() { + public AdSetGeoLocationV24Q1 getGeoLocation() { return geoLocation; } - public void setGeoLocation(AdSetGeoLocation geoLocation) { + public void setGeoLocation(AdSetGeoLocationV24Q1 geoLocation) { this.geoLocation = geoLocation; } - public AdSetTargeting frequencyCapping(AdSetFrequencyCapping frequencyCapping) { + public AdSetTargetingV24Q1 frequencyCapping(AdSetFrequencyCappingV24Q1 frequencyCapping) { this.frequencyCapping = frequencyCapping; return this; @@ -122,12 +122,12 @@ public AdSetTargeting frequencyCapping(AdSetFrequencyCapping frequencyCapping) { **/ @javax.annotation.Nullable - public AdSetFrequencyCapping getFrequencyCapping() { + public AdSetFrequencyCappingV24Q1 getFrequencyCapping() { return frequencyCapping; } - public void setFrequencyCapping(AdSetFrequencyCapping frequencyCapping) { + public void setFrequencyCapping(AdSetFrequencyCappingV24Q1 frequencyCapping) { this.frequencyCapping = frequencyCapping; } @@ -144,9 +144,9 @@ public void setFrequencyCapping(AdSetFrequencyCapping frequencyCapping) { * * @param key name of the property * @param value value of the property - * @return the AdSetTargeting instance itself + * @return the AdSetTargetingV24Q1 instance itself */ - public AdSetTargeting putAdditionalProperty(String key, Object value) { + public AdSetTargetingV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -185,11 +185,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdSetTargeting adSetTargeting = (AdSetTargeting) o; - return Objects.equals(this.deliveryLimitations, adSetTargeting.deliveryLimitations) && - Objects.equals(this.geoLocation, adSetTargeting.geoLocation) && - Objects.equals(this.frequencyCapping, adSetTargeting.frequencyCapping)&& - Objects.equals(this.additionalProperties, adSetTargeting.additionalProperties); + AdSetTargetingV24Q1 adSetTargetingV24Q1 = (AdSetTargetingV24Q1) o; + return Objects.equals(this.deliveryLimitations, adSetTargetingV24Q1.deliveryLimitations) && + Objects.equals(this.geoLocation, adSetTargetingV24Q1.geoLocation) && + Objects.equals(this.frequencyCapping, adSetTargetingV24Q1.frequencyCapping)&& + Objects.equals(this.additionalProperties, adSetTargetingV24Q1.additionalProperties); } @Override @@ -200,7 +200,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AdSetTargeting {\n"); + sb.append("class AdSetTargetingV24Q1 {\n"); sb.append(" deliveryLimitations: ").append(toIndentedString(deliveryLimitations)).append("\n"); sb.append(" geoLocation: ").append(toIndentedString(geoLocation)).append("\n"); sb.append(" frequencyCapping: ").append(toIndentedString(frequencyCapping)).append("\n"); @@ -239,25 +239,25 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AdSetTargeting + * @throws IOException if the JSON Object is invalid with respect to AdSetTargetingV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!AdSetTargeting.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetTargeting is not found in the empty JSON string", AdSetTargeting.openapiRequiredFields.toString())); + if (!AdSetTargetingV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdSetTargetingV24Q1 is not found in the empty JSON string", AdSetTargetingV24Q1.openapiRequiredFields.toString())); } } // validate the optional field `deliveryLimitations` if (jsonObj.get("deliveryLimitations") != null && !jsonObj.get("deliveryLimitations").isJsonNull()) { - AdSetDeliveryLimitations.validateJsonObject(jsonObj.getAsJsonObject("deliveryLimitations")); + AdSetDeliveryLimitationsV24Q1.validateJsonObject(jsonObj.getAsJsonObject("deliveryLimitations")); } // validate the optional field `geoLocation` if (jsonObj.get("geoLocation") != null && !jsonObj.get("geoLocation").isJsonNull()) { - AdSetGeoLocation.validateJsonObject(jsonObj.getAsJsonObject("geoLocation")); + AdSetGeoLocationV24Q1.validateJsonObject(jsonObj.getAsJsonObject("geoLocation")); } // validate the optional field `frequencyCapping` if (jsonObj.get("frequencyCapping") != null && !jsonObj.get("frequencyCapping").isJsonNull()) { - AdSetFrequencyCapping.validateJsonObject(jsonObj.getAsJsonObject("frequencyCapping")); + AdSetFrequencyCappingV24Q1.validateJsonObject(jsonObj.getAsJsonObject("frequencyCapping")); } } @@ -265,16 +265,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AdSetTargeting.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AdSetTargeting' and its subtypes + if (!AdSetTargetingV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdSetTargetingV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AdSetTargeting.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdSetTargetingV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AdSetTargeting value) throws IOException { + public void write(JsonWriter out, AdSetTargetingV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -297,11 +297,11 @@ else if (entry.getValue() instanceof Character) } @Override - public AdSetTargeting read(JsonReader in) throws IOException { + public AdSetTargetingV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - AdSetTargeting instance = thisAdapter.fromJsonTree(jsonObj); + AdSetTargetingV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -328,18 +328,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AdSetTargeting given an JSON string + * Create an instance of AdSetTargetingV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of AdSetTargeting - * @throws IOException if the JSON string is invalid with respect to AdSetTargeting + * @return An instance of AdSetTargetingV24Q1 + * @throws IOException if the JSON string is invalid with respect to AdSetTargetingV24Q1 */ - public static AdSetTargeting fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AdSetTargeting.class); + public static AdSetTargetingV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdSetTargetingV24Q1.class); } /** - * Convert an instance of AdSetTargeting to an JSON string + * Convert an instance of AdSetTargetingV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWrite.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWrite.java new file mode 100644 index 00000000..e31bf91b --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWrite.java @@ -0,0 +1,542 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Entity to create or update an ad + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdWrite { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_CREATIVE_ID = "creativeId"; + @SerializedName(SERIALIZED_NAME_CREATIVE_ID) + private String creativeId; + + public static final String SERIALIZED_NAME_AD_SET_ID = "adSetId"; + @SerializedName(SERIALIZED_NAME_AD_SET_ID) + private String adSetId; + + /** + * The inventory the Ad to be created or updated belongs to. Possible values are \"Display\" and \"Native\". This is optional since this doesn't make sense for every creative type but will throw an error if not set for a dynamic creative. + */ + @JsonAdapter(InventoryTypeEnum.Adapter.class) + public enum InventoryTypeEnum { + DISPLAY("Display"), + + NATIVE("Native"); + + private String value; + + InventoryTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InventoryTypeEnum fromValue(String value) { + for (InventoryTypeEnum b : InventoryTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final InventoryTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InventoryTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return InventoryTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_INVENTORY_TYPE = "inventoryType"; + @SerializedName(SERIALIZED_NAME_INVENTORY_TYPE) + private InventoryTypeEnum inventoryType; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private String endDate; + + public AdWrite() { + } + + public AdWrite name(String name) { + + this.name = name; + return this; + } + + /** + * The name of the ad + * @return name + **/ + @javax.annotation.Nonnull + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public AdWrite description(String description) { + + this.description = description; + return this; + } + + /** + * The description of the ad + * @return description + **/ + @javax.annotation.Nullable + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public AdWrite creativeId(String creativeId) { + + this.creativeId = creativeId; + return this; + } + + /** + * The id of the Creative bound to this Ad + * @return creativeId + **/ + @javax.annotation.Nonnull + + public String getCreativeId() { + return creativeId; + } + + + public void setCreativeId(String creativeId) { + this.creativeId = creativeId; + } + + + public AdWrite adSetId(String adSetId) { + + this.adSetId = adSetId; + return this; + } + + /** + * The id of the Ad Set bound to this Ad + * @return adSetId + **/ + @javax.annotation.Nonnull + + public String getAdSetId() { + return adSetId; + } + + + public void setAdSetId(String adSetId) { + this.adSetId = adSetId; + } + + + public AdWrite inventoryType(InventoryTypeEnum inventoryType) { + + this.inventoryType = inventoryType; + return this; + } + + /** + * The inventory the Ad to be created or updated belongs to. Possible values are \"Display\" and \"Native\". This is optional since this doesn't make sense for every creative type but will throw an error if not set for a dynamic creative. + * @return inventoryType + **/ + @javax.annotation.Nullable + + public InventoryTypeEnum getInventoryType() { + return inventoryType; + } + + + public void setInventoryType(InventoryTypeEnum inventoryType) { + this.inventoryType = inventoryType; + } + + + public AdWrite startDate(String startDate) { + + this.startDate = startDate; + return this; + } + + /** + * The date when the ad will be launched String must be in ISO8601 format + * @return startDate + **/ + @javax.annotation.Nonnull + + public String getStartDate() { + return startDate; + } + + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + + public AdWrite endDate(String endDate) { + + this.endDate = endDate; + return this; + } + + /** + * The date when when we will stop to show this ad. If the end date is not specified (i.e. null) then the ad will go on forever String must be in ISO8601 format + * @return endDate + **/ + @javax.annotation.Nullable + + public String getEndDate() { + return endDate; + } + + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AdWrite instance itself + */ + public AdWrite putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdWrite adWrite = (AdWrite) o; + return Objects.equals(this.name, adWrite.name) && + Objects.equals(this.description, adWrite.description) && + Objects.equals(this.creativeId, adWrite.creativeId) && + Objects.equals(this.adSetId, adWrite.adSetId) && + Objects.equals(this.inventoryType, adWrite.inventoryType) && + Objects.equals(this.startDate, adWrite.startDate) && + Objects.equals(this.endDate, adWrite.endDate)&& + Objects.equals(this.additionalProperties, adWrite.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, creativeId, adSetId, inventoryType, startDate, endDate, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdWrite {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" creativeId: ").append(toIndentedString(creativeId)).append("\n"); + sb.append(" adSetId: ").append(toIndentedString(adSetId)).append("\n"); + sb.append(" inventoryType: ").append(toIndentedString(inventoryType)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("creativeId"); + openapiFields.add("adSetId"); + openapiFields.add("inventoryType"); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("creativeId"); + openapiRequiredFields.add("adSetId"); + openapiRequiredFields.add("startDate"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AdWrite + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AdWrite.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdWrite is not found in the empty JSON string", AdWrite.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AdWrite.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("creativeId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `creativeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creativeId").toString())); + } + if (!jsonObj.get("adSetId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `adSetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("adSetId").toString())); + } + if ((jsonObj.get("inventoryType") != null && !jsonObj.get("inventoryType").isJsonNull()) && !jsonObj.get("inventoryType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `inventoryType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("inventoryType").toString())); + } + if (!jsonObj.get("startDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `startDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("startDate").toString())); + } + if ((jsonObj.get("endDate") != null && !jsonObj.get("endDate").isJsonNull()) && !jsonObj.get("endDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdWrite.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdWrite' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdWrite.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdWrite value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AdWrite read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AdWrite instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AdWrite given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdWrite + * @throws IOException if the JSON string is invalid with respect to AdWrite + */ + public static AdWrite fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdWrite.class); + } + + /** + * Convert an instance of AdWrite to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceRequest.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWriteRequest.java similarity index 78% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceRequest.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWriteRequest.java index 7b138f29..a7d9b596 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceRequest.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWriteRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.NewAudience; +import com.criteo.api.marketingsolutions.v2024_07.model.AdWriteResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,21 +42,21 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** - * Body of creation of a new audience + * Data model for input resource */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NewAudienceRequest { +public class AdWriteRequest { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private NewAudience data; + private AdWriteResource data; - public NewAudienceRequest() { + public AdWriteRequest() { } - public NewAudienceRequest data(NewAudience data) { + public AdWriteRequest data(AdWriteResource data) { this.data = data; return this; @@ -68,12 +68,12 @@ public NewAudienceRequest data(NewAudience data) { **/ @javax.annotation.Nullable - public NewAudience getData() { + public AdWriteResource getData() { return data; } - public void setData(NewAudience data) { + public void setData(AdWriteResource data) { this.data = data; } @@ -90,9 +90,9 @@ public void setData(NewAudience data) { * * @param key name of the property * @param value value of the property - * @return the NewAudienceRequest instance itself + * @return the AdWriteRequest instance itself */ - public NewAudienceRequest putAdditionalProperty(String key, Object value) { + public AdWriteRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -131,9 +131,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NewAudienceRequest newAudienceRequest = (NewAudienceRequest) o; - return Objects.equals(this.data, newAudienceRequest.data)&& - Objects.equals(this.additionalProperties, newAudienceRequest.additionalProperties); + AdWriteRequest adWriteRequest = (AdWriteRequest) o; + return Objects.equals(this.data, adWriteRequest.data)&& + Objects.equals(this.additionalProperties, adWriteRequest.additionalProperties); } @Override @@ -144,7 +144,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NewAudienceRequest {\n"); + sb.append("class AdWriteRequest {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -179,17 +179,17 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NewAudienceRequest + * @throws IOException if the JSON Object is invalid with respect to AdWriteRequest */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!NewAudienceRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NewAudienceRequest is not found in the empty JSON string", NewAudienceRequest.openapiRequiredFields.toString())); + if (!AdWriteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdWriteRequest is not found in the empty JSON string", AdWriteRequest.openapiRequiredFields.toString())); } } // validate the optional field `data` if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - NewAudience.validateJsonObject(jsonObj.getAsJsonObject("data")); + AdWriteResource.validateJsonObject(jsonObj.getAsJsonObject("data")); } } @@ -197,16 +197,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!NewAudienceRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NewAudienceRequest' and its subtypes + if (!AdWriteRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdWriteRequest' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NewAudienceRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdWriteRequest.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, NewAudienceRequest value) throws IOException { + public void write(JsonWriter out, AdWriteRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -229,11 +229,11 @@ else if (entry.getValue() instanceof Character) } @Override - public NewAudienceRequest read(JsonReader in) throws IOException { + public AdWriteRequest read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - NewAudienceRequest instance = thisAdapter.fromJsonTree(jsonObj); + AdWriteRequest instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -260,18 +260,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of NewAudienceRequest given an JSON string + * Create an instance of AdWriteRequest given an JSON string * * @param jsonString JSON string - * @return An instance of NewAudienceRequest - * @throws IOException if the JSON string is invalid with respect to NewAudienceRequest + * @return An instance of AdWriteRequest + * @throws IOException if the JSON string is invalid with respect to AdWriteRequest */ - public static NewAudienceRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NewAudienceRequest.class); + public static AdWriteRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdWriteRequest.class); } /** - * Convert an instance of NewAudienceRequest to an JSON string + * Convert an instance of AdWriteRequest to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWriteResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWriteResource.java new file mode 100644 index 00000000..b7bcc4ee --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdWriteResource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AdWrite; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdWriteResource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AdWrite attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AdWriteResource() { + } + + public AdWriteResource attributes(AdWrite attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AdWrite getAttributes() { + return attributes; + } + + + public void setAttributes(AdWrite attributes) { + this.attributes = attributes; + } + + + public AdWriteResource id(String id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AdWriteResource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AdWriteResource instance itself + */ + public AdWriteResource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdWriteResource adWriteResource = (AdWriteResource) o; + return Objects.equals(this.attributes, adWriteResource.attributes) && + Objects.equals(this.id, adWriteResource.id) && + Objects.equals(this.type, adWriteResource.type)&& + Objects.equals(this.additionalProperties, adWriteResource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdWriteResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AdWriteResource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AdWriteResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdWriteResource is not found in the empty JSON string", AdWriteResource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AdWrite.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdWriteResource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdWriteResource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdWriteResource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdWriteResource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AdWriteResource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AdWriteResource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AdWriteResource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdWriteResource + * @throws IOException if the JSON string is invalid with respect to AdWriteResource + */ + public static AdWriteResource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdWriteResource.class); + } + + /** + * Convert an instance of AdWriteResource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveAttributes.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveAttributes.java new file mode 100644 index 00000000..41ef928d --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveAttributes.java @@ -0,0 +1,828 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AdaptiveColors; +import com.criteo.api.marketingsolutions.v2024_07.model.ImageSet; +import com.criteo.api.marketingsolutions.v2024_07.model.ImageShape; +import com.criteo.api.marketingsolutions.v2024_07.model.VideoDetail; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * The attributes specific to Adaptive creatives + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdaptiveAttributes { + /** + * Gets or Sets layouts + */ + @JsonAdapter(LayoutsEnum.Adapter.class) + public enum LayoutsEnum { + EDITORIAL("Editorial"), + + MONTAGE("Montage"), + + INBANNERVIDEO("InBannerVideo"); + + private String value; + + LayoutsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LayoutsEnum fromValue(String value) { + for (LayoutsEnum b : LayoutsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LayoutsEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LayoutsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LayoutsEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_LAYOUTS = "layouts"; + @SerializedName(SERIALIZED_NAME_LAYOUTS) + private List layouts = new ArrayList<>(); + + public static final String SERIALIZED_NAME_LOGOS = "logos"; + @SerializedName(SERIALIZED_NAME_LOGOS) + private List logos = new ArrayList<>(); + + public static final String SERIALIZED_NAME_HEADLINE_TEXT = "headlineText"; + @SerializedName(SERIALIZED_NAME_HEADLINE_TEXT) + private String headlineText; + + public static final String SERIALIZED_NAME_HEADLINE_FONT = "headlineFont"; + @SerializedName(SERIALIZED_NAME_HEADLINE_FONT) + private String headlineFont; + + public static final String SERIALIZED_NAME_DESCRIPTION_TEXT = "descriptionText"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION_TEXT) + private String descriptionText; + + public static final String SERIALIZED_NAME_DESCRIPTION_FONT = "descriptionFont"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION_FONT) + private String descriptionFont; + + public static final String SERIALIZED_NAME_CALLS_TO_ACTION = "callsToAction"; + @SerializedName(SERIALIZED_NAME_CALLS_TO_ACTION) + private List callsToAction = new ArrayList<>(); + + public static final String SERIALIZED_NAME_COLORS = "colors"; + @SerializedName(SERIALIZED_NAME_COLORS) + private AdaptiveColors colors; + + public static final String SERIALIZED_NAME_IMAGE_SETS = "imageSets"; + @SerializedName(SERIALIZED_NAME_IMAGE_SETS) + private List imageSets = null; + + /** + * Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your image set should fit inside the allocated space (\"ShowFullImage\") or whether it should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping. + */ + @JsonAdapter(ImageDisplayEnum.Adapter.class) + public enum ImageDisplayEnum { + SHOWFULLIMAGE("ShowFullImage"), + + ZOOMONIMAGE("ZoomOnImage"); + + private String value; + + ImageDisplayEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ImageDisplayEnum fromValue(String value) { + for (ImageDisplayEnum b : ImageDisplayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ImageDisplayEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ImageDisplayEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ImageDisplayEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_IMAGE_DISPLAY = "imageDisplay"; + @SerializedName(SERIALIZED_NAME_IMAGE_DISPLAY) + private ImageDisplayEnum imageDisplay; + + public static final String SERIALIZED_NAME_VIDEOS = "videos"; + @SerializedName(SERIALIZED_NAME_VIDEOS) + private List videos = null; + + public static final String SERIALIZED_NAME_LANDING_PAGE_URL = "landingPageUrl"; + @SerializedName(SERIALIZED_NAME_LANDING_PAGE_URL) + private URI landingPageUrl; + + public AdaptiveAttributes() { + } + + public AdaptiveAttributes layouts(List layouts) { + + this.layouts = layouts; + return this; + } + + public AdaptiveAttributes addLayoutsItem(LayoutsEnum layoutsItem) { + this.layouts.add(layoutsItem); + return this; + } + + /** + * The Adaptive layouts that are enabled. It can contain any of the following values: \"Editorial\", “Montage“, \"InBannerVideo\". + * @return layouts + **/ + @javax.annotation.Nonnull + + public List getLayouts() { + return layouts; + } + + + public void setLayouts(List layouts) { + this.layouts = layouts; + } + + + public AdaptiveAttributes logos(List logos) { + + this.logos = logos; + return this; + } + + public AdaptiveAttributes addLogosItem(ImageShape logosItem) { + this.logos.add(logosItem); + return this; + } + + /** + * Logo images uploaded on demostatic.criteo.com when deploying and then static.criteo.net + * @return logos + **/ + @javax.annotation.Nonnull + + public List getLogos() { + return logos; + } + + + public void setLogos(List logos) { + this.logos = logos; + } + + + public AdaptiveAttributes headlineText(String headlineText) { + + this.headlineText = headlineText; + return this; + } + + /** + * The headline text of the banner + * @return headlineText + **/ + @javax.annotation.Nonnull + + public String getHeadlineText() { + return headlineText; + } + + + public void setHeadlineText(String headlineText) { + this.headlineText = headlineText; + } + + + public AdaptiveAttributes headlineFont(String headlineFont) { + + this.headlineFont = headlineFont; + return this; + } + + /** + * Font of the headline Valid supported font like \"Arial\" + * @return headlineFont + **/ + @javax.annotation.Nonnull + + public String getHeadlineFont() { + return headlineFont; + } + + + public void setHeadlineFont(String headlineFont) { + this.headlineFont = headlineFont; + } + + + public AdaptiveAttributes descriptionText(String descriptionText) { + + this.descriptionText = descriptionText; + return this; + } + + /** + * The description text of the banner + * @return descriptionText + **/ + @javax.annotation.Nonnull + + public String getDescriptionText() { + return descriptionText; + } + + + public void setDescriptionText(String descriptionText) { + this.descriptionText = descriptionText; + } + + + public AdaptiveAttributes descriptionFont(String descriptionFont) { + + this.descriptionFont = descriptionFont; + return this; + } + + /** + * Font of the description Valid supported font like \"Arial\" + * @return descriptionFont + **/ + @javax.annotation.Nonnull + + public String getDescriptionFont() { + return descriptionFont; + } + + + public void setDescriptionFont(String descriptionFont) { + this.descriptionFont = descriptionFont; + } + + + public AdaptiveAttributes callsToAction(List callsToAction) { + + this.callsToAction = callsToAction; + return this; + } + + public AdaptiveAttributes addCallsToActionItem(String callsToActionItem) { + this.callsToAction.add(callsToActionItem); + return this; + } + + /** + * A Call-to-Action (CTA) is an action-driven instruction to your audience intended to provoke an immediate response, such as “Buy now” or “Go!”. + * @return callsToAction + **/ + @javax.annotation.Nonnull + + public List getCallsToAction() { + return callsToAction; + } + + + public void setCallsToAction(List callsToAction) { + this.callsToAction = callsToAction; + } + + + public AdaptiveAttributes colors(AdaptiveColors colors) { + + this.colors = colors; + return this; + } + + /** + * Get colors + * @return colors + **/ + @javax.annotation.Nonnull + + public AdaptiveColors getColors() { + return colors; + } + + + public void setColors(AdaptiveColors colors) { + this.colors = colors; + } + + + public AdaptiveAttributes imageSets(List imageSets) { + + this.imageSets = imageSets; + return this; + } + + public AdaptiveAttributes addImageSetsItem(ImageSet imageSetsItem) { + if (this.imageSets == null) { + this.imageSets = null; + } + this.imageSets.add(imageSetsItem); + return this; + } + + /** + * Multiple image sets, each image set consists of multiple images and a headline text. + * @return imageSets + **/ + @javax.annotation.Nullable + + public List getImageSets() { + return imageSets; + } + + + public void setImageSets(List imageSets) { + this.imageSets = imageSets; + } + + + public AdaptiveAttributes imageDisplay(ImageDisplayEnum imageDisplay) { + + this.imageDisplay = imageDisplay; + return this; + } + + /** + * Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your image set should fit inside the allocated space (\"ShowFullImage\") or whether it should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping. + * @return imageDisplay + **/ + @javax.annotation.Nullable + + public ImageDisplayEnum getImageDisplay() { + return imageDisplay; + } + + + public void setImageDisplay(ImageDisplayEnum imageDisplay) { + this.imageDisplay = imageDisplay; + } + + + public AdaptiveAttributes videos(List videos) { + + this.videos = videos; + return this; + } + + public AdaptiveAttributes addVideosItem(VideoDetail videosItem) { + if (this.videos == null) { + this.videos = null; + } + this.videos.add(videosItem); + return this; + } + + /** + * Multiple videos potentially in different shapes. + * @return videos + **/ + @javax.annotation.Nullable + + public List getVideos() { + return videos; + } + + + public void setVideos(List videos) { + this.videos = videos; + } + + + public AdaptiveAttributes landingPageUrl(URI landingPageUrl) { + + this.landingPageUrl = landingPageUrl; + return this; + } + + /** + * Web redirection of the landing page url + * @return landingPageUrl + **/ + @javax.annotation.Nonnull + + public URI getLandingPageUrl() { + return landingPageUrl; + } + + + public void setLandingPageUrl(URI landingPageUrl) { + this.landingPageUrl = landingPageUrl; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AdaptiveAttributes instance itself + */ + public AdaptiveAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdaptiveAttributes adaptiveAttributes = (AdaptiveAttributes) o; + return Objects.equals(this.layouts, adaptiveAttributes.layouts) && + Objects.equals(this.logos, adaptiveAttributes.logos) && + Objects.equals(this.headlineText, adaptiveAttributes.headlineText) && + Objects.equals(this.headlineFont, adaptiveAttributes.headlineFont) && + Objects.equals(this.descriptionText, adaptiveAttributes.descriptionText) && + Objects.equals(this.descriptionFont, adaptiveAttributes.descriptionFont) && + Objects.equals(this.callsToAction, adaptiveAttributes.callsToAction) && + Objects.equals(this.colors, adaptiveAttributes.colors) && + Objects.equals(this.imageSets, adaptiveAttributes.imageSets) && + Objects.equals(this.imageDisplay, adaptiveAttributes.imageDisplay) && + Objects.equals(this.videos, adaptiveAttributes.videos) && + Objects.equals(this.landingPageUrl, adaptiveAttributes.landingPageUrl)&& + Objects.equals(this.additionalProperties, adaptiveAttributes.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(layouts, logos, headlineText, headlineFont, descriptionText, descriptionFont, callsToAction, colors, imageSets, imageDisplay, videos, landingPageUrl, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdaptiveAttributes {\n"); + sb.append(" layouts: ").append(toIndentedString(layouts)).append("\n"); + sb.append(" logos: ").append(toIndentedString(logos)).append("\n"); + sb.append(" headlineText: ").append(toIndentedString(headlineText)).append("\n"); + sb.append(" headlineFont: ").append(toIndentedString(headlineFont)).append("\n"); + sb.append(" descriptionText: ").append(toIndentedString(descriptionText)).append("\n"); + sb.append(" descriptionFont: ").append(toIndentedString(descriptionFont)).append("\n"); + sb.append(" callsToAction: ").append(toIndentedString(callsToAction)).append("\n"); + sb.append(" colors: ").append(toIndentedString(colors)).append("\n"); + sb.append(" imageSets: ").append(toIndentedString(imageSets)).append("\n"); + sb.append(" imageDisplay: ").append(toIndentedString(imageDisplay)).append("\n"); + sb.append(" videos: ").append(toIndentedString(videos)).append("\n"); + sb.append(" landingPageUrl: ").append(toIndentedString(landingPageUrl)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("layouts"); + openapiFields.add("logos"); + openapiFields.add("headlineText"); + openapiFields.add("headlineFont"); + openapiFields.add("descriptionText"); + openapiFields.add("descriptionFont"); + openapiFields.add("callsToAction"); + openapiFields.add("colors"); + openapiFields.add("imageSets"); + openapiFields.add("imageDisplay"); + openapiFields.add("videos"); + openapiFields.add("landingPageUrl"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("layouts"); + openapiRequiredFields.add("logos"); + openapiRequiredFields.add("headlineText"); + openapiRequiredFields.add("headlineFont"); + openapiRequiredFields.add("descriptionText"); + openapiRequiredFields.add("descriptionFont"); + openapiRequiredFields.add("callsToAction"); + openapiRequiredFields.add("colors"); + openapiRequiredFields.add("landingPageUrl"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AdaptiveAttributes + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AdaptiveAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdaptiveAttributes is not found in the empty JSON string", AdaptiveAttributes.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AdaptiveAttributes.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the required json array is present + if (jsonObj.get("layouts") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("layouts").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `layouts` to be an array in the JSON string but got `%s`", jsonObj.get("layouts").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("logos").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `logos` to be an array in the JSON string but got `%s`", jsonObj.get("logos").toString())); + } + + JsonArray jsonArraylogos = jsonObj.getAsJsonArray("logos"); + // validate the required field `logos` (array) + for (int i = 0; i < jsonArraylogos.size(); i++) { + ImageShape.validateJsonObject(jsonArraylogos.get(i).getAsJsonObject()); + }; + if (!jsonObj.get("headlineText").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `headlineText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("headlineText").toString())); + } + if (!jsonObj.get("headlineFont").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `headlineFont` to be a primitive type in the JSON string but got `%s`", jsonObj.get("headlineFont").toString())); + } + if (!jsonObj.get("descriptionText").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `descriptionText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("descriptionText").toString())); + } + if (!jsonObj.get("descriptionFont").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `descriptionFont` to be a primitive type in the JSON string but got `%s`", jsonObj.get("descriptionFont").toString())); + } + // ensure the required json array is present + if (jsonObj.get("callsToAction") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("callsToAction").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `callsToAction` to be an array in the JSON string but got `%s`", jsonObj.get("callsToAction").toString())); + } + // validate the required field `colors` + AdaptiveColors.validateJsonObject(jsonObj.getAsJsonObject("colors")); + if (jsonObj.get("imageSets") != null && !jsonObj.get("imageSets").isJsonNull()) { + JsonArray jsonArrayimageSets = jsonObj.getAsJsonArray("imageSets"); + if (jsonArrayimageSets != null) { + // ensure the json data is an array + if (!jsonObj.get("imageSets").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `imageSets` to be an array in the JSON string but got `%s`", jsonObj.get("imageSets").toString())); + } + + // validate the optional field `imageSets` (array) + for (int i = 0; i < jsonArrayimageSets.size(); i++) { + ImageSet.validateJsonObject(jsonArrayimageSets.get(i).getAsJsonObject()); + }; + } + } + if ((jsonObj.get("imageDisplay") != null && !jsonObj.get("imageDisplay").isJsonNull()) && !jsonObj.get("imageDisplay").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `imageDisplay` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageDisplay").toString())); + } + if (jsonObj.get("videos") != null && !jsonObj.get("videos").isJsonNull()) { + JsonArray jsonArrayvideos = jsonObj.getAsJsonArray("videos"); + if (jsonArrayvideos != null) { + // ensure the json data is an array + if (!jsonObj.get("videos").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `videos` to be an array in the JSON string but got `%s`", jsonObj.get("videos").toString())); + } + + // validate the optional field `videos` (array) + for (int i = 0; i < jsonArrayvideos.size(); i++) { + VideoDetail.validateJsonObject(jsonArrayvideos.get(i).getAsJsonObject()); + }; + } + } + if (!jsonObj.get("landingPageUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `landingPageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("landingPageUrl").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdaptiveAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdaptiveAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdaptiveAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdaptiveAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AdaptiveAttributes read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AdaptiveAttributes instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AdaptiveAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdaptiveAttributes + * @throws IOException if the JSON string is invalid with respect to AdaptiveAttributes + */ + public static AdaptiveAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdaptiveAttributes.class); + } + + /** + * Convert an instance of AdaptiveAttributes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveColors.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveColors.java new file mode 100644 index 00000000..fbe63e02 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveColors.java @@ -0,0 +1,453 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Entity consists of the color aliases of the creative's elements + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdaptiveColors { + public static final String SERIALIZED_NAME_LOGO_AREA_AND_TITLE_COLOR = "logoAreaAndTitleColor"; + @SerializedName(SERIALIZED_NAME_LOGO_AREA_AND_TITLE_COLOR) + private String logoAreaAndTitleColor; + + public static final String SERIALIZED_NAME_BACKGROUND_COLOR = "backgroundColor"; + @SerializedName(SERIALIZED_NAME_BACKGROUND_COLOR) + private String backgroundColor; + + public static final String SERIALIZED_NAME_TEXT1_COLOR = "text1Color"; + @SerializedName(SERIALIZED_NAME_TEXT1_COLOR) + private String text1Color; + + public static final String SERIALIZED_NAME_TEXT2_COLOR = "text2Color"; + @SerializedName(SERIALIZED_NAME_TEXT2_COLOR) + private String text2Color; + + public static final String SERIALIZED_NAME_CTA_BACKGROUND_COLOR = "ctaBackgroundColor"; + @SerializedName(SERIALIZED_NAME_CTA_BACKGROUND_COLOR) + private String ctaBackgroundColor; + + public static final String SERIALIZED_NAME_CTA_TEXT_COLOR = "ctaTextColor"; + @SerializedName(SERIALIZED_NAME_CTA_TEXT_COLOR) + private String ctaTextColor; + + public AdaptiveColors() { + } + + public AdaptiveColors logoAreaAndTitleColor(String logoAreaAndTitleColor) { + + this.logoAreaAndTitleColor = logoAreaAndTitleColor; + return this; + } + + /** + * Color of the creative's logo area. A valid RGB24 color in hexadecimal (e.g. \"AB00FF\"). + * @return logoAreaAndTitleColor + **/ + @javax.annotation.Nonnull + + public String getLogoAreaAndTitleColor() { + return logoAreaAndTitleColor; + } + + + public void setLogoAreaAndTitleColor(String logoAreaAndTitleColor) { + this.logoAreaAndTitleColor = logoAreaAndTitleColor; + } + + + public AdaptiveColors backgroundColor(String backgroundColor) { + + this.backgroundColor = backgroundColor; + return this; + } + + /** + * Color of the creative's background. A valid RGB24 color in hexadecimal (e.g. \"AB00FF\") + * @return backgroundColor + **/ + @javax.annotation.Nonnull + + public String getBackgroundColor() { + return backgroundColor; + } + + + public void setBackgroundColor(String backgroundColor) { + this.backgroundColor = backgroundColor; + } + + + public AdaptiveColors text1Color(String text1Color) { + + this.text1Color = text1Color; + return this; + } + + /** + * Color of the headline and the description texts. A valid RGB24 color in hexadecimal (e.g. \"AB00FF\") + * @return text1Color + **/ + @javax.annotation.Nonnull + + public String getText1Color() { + return text1Color; + } + + + public void setText1Color(String text1Color) { + this.text1Color = text1Color; + } + + + public AdaptiveColors text2Color(String text2Color) { + + this.text2Color = text2Color; + return this; + } + + /** + * Color of the image set's headline text. A valid RGB24 color in hexadecimal (e.g. \"AB00FF\") + * @return text2Color + **/ + @javax.annotation.Nonnull + + public String getText2Color() { + return text2Color; + } + + + public void setText2Color(String text2Color) { + this.text2Color = text2Color; + } + + + public AdaptiveColors ctaBackgroundColor(String ctaBackgroundColor) { + + this.ctaBackgroundColor = ctaBackgroundColor; + return this; + } + + /** + * Color of the background of the CTA. A valid RGB24 color in hexadecimal (e.g. \"AB00FF\"). + * @return ctaBackgroundColor + **/ + @javax.annotation.Nonnull + + public String getCtaBackgroundColor() { + return ctaBackgroundColor; + } + + + public void setCtaBackgroundColor(String ctaBackgroundColor) { + this.ctaBackgroundColor = ctaBackgroundColor; + } + + + public AdaptiveColors ctaTextColor(String ctaTextColor) { + + this.ctaTextColor = ctaTextColor; + return this; + } + + /** + * Color of the text of the CTA. A valid RGB24 color in hexadecimal (e.g. \"AB00FF\"). + * @return ctaTextColor + **/ + @javax.annotation.Nonnull + + public String getCtaTextColor() { + return ctaTextColor; + } + + + public void setCtaTextColor(String ctaTextColor) { + this.ctaTextColor = ctaTextColor; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AdaptiveColors instance itself + */ + public AdaptiveColors putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdaptiveColors adaptiveColors = (AdaptiveColors) o; + return Objects.equals(this.logoAreaAndTitleColor, adaptiveColors.logoAreaAndTitleColor) && + Objects.equals(this.backgroundColor, adaptiveColors.backgroundColor) && + Objects.equals(this.text1Color, adaptiveColors.text1Color) && + Objects.equals(this.text2Color, adaptiveColors.text2Color) && + Objects.equals(this.ctaBackgroundColor, adaptiveColors.ctaBackgroundColor) && + Objects.equals(this.ctaTextColor, adaptiveColors.ctaTextColor)&& + Objects.equals(this.additionalProperties, adaptiveColors.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(logoAreaAndTitleColor, backgroundColor, text1Color, text2Color, ctaBackgroundColor, ctaTextColor, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdaptiveColors {\n"); + sb.append(" logoAreaAndTitleColor: ").append(toIndentedString(logoAreaAndTitleColor)).append("\n"); + sb.append(" backgroundColor: ").append(toIndentedString(backgroundColor)).append("\n"); + sb.append(" text1Color: ").append(toIndentedString(text1Color)).append("\n"); + sb.append(" text2Color: ").append(toIndentedString(text2Color)).append("\n"); + sb.append(" ctaBackgroundColor: ").append(toIndentedString(ctaBackgroundColor)).append("\n"); + sb.append(" ctaTextColor: ").append(toIndentedString(ctaTextColor)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("logoAreaAndTitleColor"); + openapiFields.add("backgroundColor"); + openapiFields.add("text1Color"); + openapiFields.add("text2Color"); + openapiFields.add("ctaBackgroundColor"); + openapiFields.add("ctaTextColor"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("logoAreaAndTitleColor"); + openapiRequiredFields.add("backgroundColor"); + openapiRequiredFields.add("text1Color"); + openapiRequiredFields.add("text2Color"); + openapiRequiredFields.add("ctaBackgroundColor"); + openapiRequiredFields.add("ctaTextColor"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AdaptiveColors + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AdaptiveColors.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdaptiveColors is not found in the empty JSON string", AdaptiveColors.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AdaptiveColors.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("logoAreaAndTitleColor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logoAreaAndTitleColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logoAreaAndTitleColor").toString())); + } + if (!jsonObj.get("backgroundColor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `backgroundColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("backgroundColor").toString())); + } + if (!jsonObj.get("text1Color").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `text1Color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text1Color").toString())); + } + if (!jsonObj.get("text2Color").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `text2Color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text2Color").toString())); + } + if (!jsonObj.get("ctaBackgroundColor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ctaBackgroundColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ctaBackgroundColor").toString())); + } + if (!jsonObj.get("ctaTextColor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ctaTextColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ctaTextColor").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdaptiveColors.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdaptiveColors' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdaptiveColors.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdaptiveColors value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AdaptiveColors read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AdaptiveColors instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AdaptiveColors given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdaptiveColors + * @throws IOException if the JSON string is invalid with respect to AdaptiveColors + */ + public static AdaptiveColors fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdaptiveColors.class); + } + + /** + * Convert an instance of AdaptiveColors to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveWriteAttributes.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveWriteAttributes.java new file mode 100644 index 00000000..573e2a1f --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AdaptiveWriteAttributes.java @@ -0,0 +1,804 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AdaptiveColors; +import com.criteo.api.marketingsolutions.v2024_07.model.ImageSetBase64; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * The attributes specific to create or update an Adaptive creative + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AdaptiveWriteAttributes { + /** + * Gets or Sets layouts + */ + @JsonAdapter(LayoutsEnum.Adapter.class) + public enum LayoutsEnum { + EDITORIAL("Editorial"), + + MONTAGE("Montage"), + + INBANNERVIDEO("InBannerVideo"); + + private String value; + + LayoutsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LayoutsEnum fromValue(String value) { + for (LayoutsEnum b : LayoutsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LayoutsEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LayoutsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LayoutsEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_LAYOUTS = "layouts"; + @SerializedName(SERIALIZED_NAME_LAYOUTS) + private List layouts = new ArrayList<>(); + + public static final String SERIALIZED_NAME_LOGO_BASE64_STRING = "logoBase64String"; + @SerializedName(SERIALIZED_NAME_LOGO_BASE64_STRING) + private String logoBase64String; + + public static final String SERIALIZED_NAME_HEADLINE_TEXT = "headlineText"; + @SerializedName(SERIALIZED_NAME_HEADLINE_TEXT) + private String headlineText; + + public static final String SERIALIZED_NAME_HEADLINE_FONT = "headlineFont"; + @SerializedName(SERIALIZED_NAME_HEADLINE_FONT) + private String headlineFont; + + public static final String SERIALIZED_NAME_DESCRIPTION_TEXT = "descriptionText"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION_TEXT) + private String descriptionText; + + public static final String SERIALIZED_NAME_DESCRIPTION_FONT = "descriptionFont"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION_FONT) + private String descriptionFont; + + public static final String SERIALIZED_NAME_CALLS_TO_ACTION = "callsToAction"; + @SerializedName(SERIALIZED_NAME_CALLS_TO_ACTION) + private List callsToAction = new ArrayList<>(); + + public static final String SERIALIZED_NAME_COLORS = "colors"; + @SerializedName(SERIALIZED_NAME_COLORS) + private AdaptiveColors colors; + + public static final String SERIALIZED_NAME_IMAGE_SETS_BASE64 = "imageSetsBase64"; + @SerializedName(SERIALIZED_NAME_IMAGE_SETS_BASE64) + private List imageSetsBase64 = null; + + /** + * Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your image set should fit inside the allocated space (\"ShowFullImage\") or whether it should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping. + */ + @JsonAdapter(ImageDisplayEnum.Adapter.class) + public enum ImageDisplayEnum { + SHOWFULLIMAGE("ShowFullImage"), + + ZOOMONIMAGE("ZoomOnImage"); + + private String value; + + ImageDisplayEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ImageDisplayEnum fromValue(String value) { + for (ImageDisplayEnum b : ImageDisplayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ImageDisplayEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ImageDisplayEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ImageDisplayEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_IMAGE_DISPLAY = "imageDisplay"; + @SerializedName(SERIALIZED_NAME_IMAGE_DISPLAY) + private ImageDisplayEnum imageDisplay; + + public static final String SERIALIZED_NAME_VIDEO_BASE64_STRINGS = "videoBase64Strings"; + @SerializedName(SERIALIZED_NAME_VIDEO_BASE64_STRINGS) + private List videoBase64Strings = null; + + public static final String SERIALIZED_NAME_LANDING_PAGE_URL = "landingPageUrl"; + @SerializedName(SERIALIZED_NAME_LANDING_PAGE_URL) + private URI landingPageUrl; + + public AdaptiveWriteAttributes() { + } + + public AdaptiveWriteAttributes layouts(List layouts) { + + this.layouts = layouts; + return this; + } + + public AdaptiveWriteAttributes addLayoutsItem(LayoutsEnum layoutsItem) { + this.layouts.add(layoutsItem); + return this; + } + + /** + * The Adaptive layouts that are enabled. It can contain any of the following values: \"Editorial\", “Montage“, \"InBannerVideo\". + * @return layouts + **/ + @javax.annotation.Nonnull + + public List getLayouts() { + return layouts; + } + + + public void setLayouts(List layouts) { + this.layouts = layouts; + } + + + public AdaptiveWriteAttributes logoBase64String(String logoBase64String) { + + this.logoBase64String = logoBase64String; + return this; + } + + /** + * Logo image as a base-64 encoded string + * @return logoBase64String + **/ + @javax.annotation.Nonnull + + public String getLogoBase64String() { + return logoBase64String; + } + + + public void setLogoBase64String(String logoBase64String) { + this.logoBase64String = logoBase64String; + } + + + public AdaptiveWriteAttributes headlineText(String headlineText) { + + this.headlineText = headlineText; + return this; + } + + /** + * The headline text of the banner + * @return headlineText + **/ + @javax.annotation.Nonnull + + public String getHeadlineText() { + return headlineText; + } + + + public void setHeadlineText(String headlineText) { + this.headlineText = headlineText; + } + + + public AdaptiveWriteAttributes headlineFont(String headlineFont) { + + this.headlineFont = headlineFont; + return this; + } + + /** + * Font of the headline Valid supported font like \"Arial\" + * @return headlineFont + **/ + @javax.annotation.Nonnull + + public String getHeadlineFont() { + return headlineFont; + } + + + public void setHeadlineFont(String headlineFont) { + this.headlineFont = headlineFont; + } + + + public AdaptiveWriteAttributes descriptionText(String descriptionText) { + + this.descriptionText = descriptionText; + return this; + } + + /** + * The description text of the banner + * @return descriptionText + **/ + @javax.annotation.Nonnull + + public String getDescriptionText() { + return descriptionText; + } + + + public void setDescriptionText(String descriptionText) { + this.descriptionText = descriptionText; + } + + + public AdaptiveWriteAttributes descriptionFont(String descriptionFont) { + + this.descriptionFont = descriptionFont; + return this; + } + + /** + * Font of the description Valid supported font like \"Arial\" + * @return descriptionFont + **/ + @javax.annotation.Nonnull + + public String getDescriptionFont() { + return descriptionFont; + } + + + public void setDescriptionFont(String descriptionFont) { + this.descriptionFont = descriptionFont; + } + + + public AdaptiveWriteAttributes callsToAction(List callsToAction) { + + this.callsToAction = callsToAction; + return this; + } + + public AdaptiveWriteAttributes addCallsToActionItem(String callsToActionItem) { + this.callsToAction.add(callsToActionItem); + return this; + } + + /** + * A Call-to-Action (CTA) is an action-driven instruction to your audience intended to provoke an immediate response, such as “Buy now” or “Go!”. + * @return callsToAction + **/ + @javax.annotation.Nonnull + + public List getCallsToAction() { + return callsToAction; + } + + + public void setCallsToAction(List callsToAction) { + this.callsToAction = callsToAction; + } + + + public AdaptiveWriteAttributes colors(AdaptiveColors colors) { + + this.colors = colors; + return this; + } + + /** + * Get colors + * @return colors + **/ + @javax.annotation.Nonnull + + public AdaptiveColors getColors() { + return colors; + } + + + public void setColors(AdaptiveColors colors) { + this.colors = colors; + } + + + public AdaptiveWriteAttributes imageSetsBase64(List imageSetsBase64) { + + this.imageSetsBase64 = imageSetsBase64; + return this; + } + + public AdaptiveWriteAttributes addImageSetsBase64Item(ImageSetBase64 imageSetsBase64Item) { + if (this.imageSetsBase64 == null) { + this.imageSetsBase64 = null; + } + this.imageSetsBase64.add(imageSetsBase64Item); + return this; + } + + /** + * Multiple image sets, each image set consists of multiple images as a base-64 encoded string and a headline text. + * @return imageSetsBase64 + **/ + @javax.annotation.Nullable + + public List getImageSetsBase64() { + return imageSetsBase64; + } + + + public void setImageSetsBase64(List imageSetsBase64) { + this.imageSetsBase64 = imageSetsBase64; + } + + + public AdaptiveWriteAttributes imageDisplay(ImageDisplayEnum imageDisplay) { + + this.imageDisplay = imageDisplay; + return this; + } + + /** + * Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your image set should fit inside the allocated space (\"ShowFullImage\") or whether it should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping. + * @return imageDisplay + **/ + @javax.annotation.Nullable + + public ImageDisplayEnum getImageDisplay() { + return imageDisplay; + } + + + public void setImageDisplay(ImageDisplayEnum imageDisplay) { + this.imageDisplay = imageDisplay; + } + + + public AdaptiveWriteAttributes videoBase64Strings(List videoBase64Strings) { + + this.videoBase64Strings = videoBase64Strings; + return this; + } + + public AdaptiveWriteAttributes addVideoBase64StringsItem(String videoBase64StringsItem) { + if (this.videoBase64Strings == null) { + this.videoBase64Strings = null; + } + this.videoBase64Strings.add(videoBase64StringsItem); + return this; + } + + /** + * Multiple videos potentially in different shapes, each video is a base-64 encoded string. + * @return videoBase64Strings + **/ + @javax.annotation.Nullable + + public List getVideoBase64Strings() { + return videoBase64Strings; + } + + + public void setVideoBase64Strings(List videoBase64Strings) { + this.videoBase64Strings = videoBase64Strings; + } + + + public AdaptiveWriteAttributes landingPageUrl(URI landingPageUrl) { + + this.landingPageUrl = landingPageUrl; + return this; + } + + /** + * Web redirection of the landing page url. + * @return landingPageUrl + **/ + @javax.annotation.Nonnull + + public URI getLandingPageUrl() { + return landingPageUrl; + } + + + public void setLandingPageUrl(URI landingPageUrl) { + this.landingPageUrl = landingPageUrl; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AdaptiveWriteAttributes instance itself + */ + public AdaptiveWriteAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdaptiveWriteAttributes adaptiveWriteAttributes = (AdaptiveWriteAttributes) o; + return Objects.equals(this.layouts, adaptiveWriteAttributes.layouts) && + Objects.equals(this.logoBase64String, adaptiveWriteAttributes.logoBase64String) && + Objects.equals(this.headlineText, adaptiveWriteAttributes.headlineText) && + Objects.equals(this.headlineFont, adaptiveWriteAttributes.headlineFont) && + Objects.equals(this.descriptionText, adaptiveWriteAttributes.descriptionText) && + Objects.equals(this.descriptionFont, adaptiveWriteAttributes.descriptionFont) && + Objects.equals(this.callsToAction, adaptiveWriteAttributes.callsToAction) && + Objects.equals(this.colors, adaptiveWriteAttributes.colors) && + Objects.equals(this.imageSetsBase64, adaptiveWriteAttributes.imageSetsBase64) && + Objects.equals(this.imageDisplay, adaptiveWriteAttributes.imageDisplay) && + Objects.equals(this.videoBase64Strings, adaptiveWriteAttributes.videoBase64Strings) && + Objects.equals(this.landingPageUrl, adaptiveWriteAttributes.landingPageUrl)&& + Objects.equals(this.additionalProperties, adaptiveWriteAttributes.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(layouts, logoBase64String, headlineText, headlineFont, descriptionText, descriptionFont, callsToAction, colors, imageSetsBase64, imageDisplay, videoBase64Strings, landingPageUrl, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdaptiveWriteAttributes {\n"); + sb.append(" layouts: ").append(toIndentedString(layouts)).append("\n"); + sb.append(" logoBase64String: ").append(toIndentedString(logoBase64String)).append("\n"); + sb.append(" headlineText: ").append(toIndentedString(headlineText)).append("\n"); + sb.append(" headlineFont: ").append(toIndentedString(headlineFont)).append("\n"); + sb.append(" descriptionText: ").append(toIndentedString(descriptionText)).append("\n"); + sb.append(" descriptionFont: ").append(toIndentedString(descriptionFont)).append("\n"); + sb.append(" callsToAction: ").append(toIndentedString(callsToAction)).append("\n"); + sb.append(" colors: ").append(toIndentedString(colors)).append("\n"); + sb.append(" imageSetsBase64: ").append(toIndentedString(imageSetsBase64)).append("\n"); + sb.append(" imageDisplay: ").append(toIndentedString(imageDisplay)).append("\n"); + sb.append(" videoBase64Strings: ").append(toIndentedString(videoBase64Strings)).append("\n"); + sb.append(" landingPageUrl: ").append(toIndentedString(landingPageUrl)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("layouts"); + openapiFields.add("logoBase64String"); + openapiFields.add("headlineText"); + openapiFields.add("headlineFont"); + openapiFields.add("descriptionText"); + openapiFields.add("descriptionFont"); + openapiFields.add("callsToAction"); + openapiFields.add("colors"); + openapiFields.add("imageSetsBase64"); + openapiFields.add("imageDisplay"); + openapiFields.add("videoBase64Strings"); + openapiFields.add("landingPageUrl"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("layouts"); + openapiRequiredFields.add("logoBase64String"); + openapiRequiredFields.add("headlineText"); + openapiRequiredFields.add("headlineFont"); + openapiRequiredFields.add("descriptionText"); + openapiRequiredFields.add("descriptionFont"); + openapiRequiredFields.add("callsToAction"); + openapiRequiredFields.add("colors"); + openapiRequiredFields.add("landingPageUrl"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AdaptiveWriteAttributes + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AdaptiveWriteAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AdaptiveWriteAttributes is not found in the empty JSON string", AdaptiveWriteAttributes.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AdaptiveWriteAttributes.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the required json array is present + if (jsonObj.get("layouts") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("layouts").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `layouts` to be an array in the JSON string but got `%s`", jsonObj.get("layouts").toString())); + } + if (!jsonObj.get("logoBase64String").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logoBase64String` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logoBase64String").toString())); + } + if (!jsonObj.get("headlineText").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `headlineText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("headlineText").toString())); + } + if (!jsonObj.get("headlineFont").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `headlineFont` to be a primitive type in the JSON string but got `%s`", jsonObj.get("headlineFont").toString())); + } + if (!jsonObj.get("descriptionText").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `descriptionText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("descriptionText").toString())); + } + if (!jsonObj.get("descriptionFont").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `descriptionFont` to be a primitive type in the JSON string but got `%s`", jsonObj.get("descriptionFont").toString())); + } + // ensure the required json array is present + if (jsonObj.get("callsToAction") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("callsToAction").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `callsToAction` to be an array in the JSON string but got `%s`", jsonObj.get("callsToAction").toString())); + } + // validate the required field `colors` + AdaptiveColors.validateJsonObject(jsonObj.getAsJsonObject("colors")); + if (jsonObj.get("imageSetsBase64") != null && !jsonObj.get("imageSetsBase64").isJsonNull()) { + JsonArray jsonArrayimageSetsBase64 = jsonObj.getAsJsonArray("imageSetsBase64"); + if (jsonArrayimageSetsBase64 != null) { + // ensure the json data is an array + if (!jsonObj.get("imageSetsBase64").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `imageSetsBase64` to be an array in the JSON string but got `%s`", jsonObj.get("imageSetsBase64").toString())); + } + + // validate the optional field `imageSetsBase64` (array) + for (int i = 0; i < jsonArrayimageSetsBase64.size(); i++) { + ImageSetBase64.validateJsonObject(jsonArrayimageSetsBase64.get(i).getAsJsonObject()); + }; + } + } + if ((jsonObj.get("imageDisplay") != null && !jsonObj.get("imageDisplay").isJsonNull()) && !jsonObj.get("imageDisplay").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `imageDisplay` to be a primitive type in the JSON string but got `%s`", jsonObj.get("imageDisplay").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("videoBase64Strings") != null && !jsonObj.get("videoBase64Strings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `videoBase64Strings` to be an array in the JSON string but got `%s`", jsonObj.get("videoBase64Strings").toString())); + } + if (!jsonObj.get("landingPageUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `landingPageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("landingPageUrl").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AdaptiveWriteAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AdaptiveWriteAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AdaptiveWriteAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AdaptiveWriteAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AdaptiveWriteAttributes read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AdaptiveWriteAttributes instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AdaptiveWriteAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of AdaptiveWriteAttributes + * @throws IOException if the JSON string is invalid with respect to AdaptiveWriteAttributes + */ + public static AdaptiveWriteAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AdaptiveWriteAttributes.class); + } + + /** + * Convert an instance of AdaptiveWriteAttributes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AlgebraNodeV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AlgebraNodeV1.java new file mode 100644 index 00000000..c0dbdefa --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AlgebraNodeV1.java @@ -0,0 +1,429 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Node in the audience algebra definition. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AlgebraNodeV1 { + public static final String SERIALIZED_NAME_AND = "and"; + @SerializedName(SERIALIZED_NAME_AND) + private List and = null; + + public static final String SERIALIZED_NAME_OR = "or"; + @SerializedName(SERIALIZED_NAME_OR) + private List or = null; + + public static final String SERIALIZED_NAME_NOT = "not"; + @SerializedName(SERIALIZED_NAME_NOT) + private AlgebraNodeV1 not; + + public static final String SERIALIZED_NAME_AUDIENCE_SEGMENT_ID = "audienceSegmentId"; + @SerializedName(SERIALIZED_NAME_AUDIENCE_SEGMENT_ID) + private String audienceSegmentId; + + public AlgebraNodeV1() { + } + + public AlgebraNodeV1 and(List and) { + + this.and = and; + return this; + } + + public AlgebraNodeV1 addAndItem(AlgebraNodeV1 andItem) { + if (this.and == null) { + this.and = null; + } + this.and.add(andItem); + return this; + } + + /** + * Get and + * @return and + **/ + @javax.annotation.Nullable + + public List getAnd() { + return and; + } + + + public void setAnd(List and) { + this.and = and; + } + + + public AlgebraNodeV1 or(List or) { + + this.or = or; + return this; + } + + public AlgebraNodeV1 addOrItem(AlgebraNodeV1 orItem) { + if (this.or == null) { + this.or = null; + } + this.or.add(orItem); + return this; + } + + /** + * Get or + * @return or + **/ + @javax.annotation.Nullable + + public List getOr() { + return or; + } + + + public void setOr(List or) { + this.or = or; + } + + + public AlgebraNodeV1 not(AlgebraNodeV1 not) { + + this.not = not; + return this; + } + + /** + * Get not + * @return not + **/ + @javax.annotation.Nullable + + public AlgebraNodeV1 getNot() { + return not; + } + + + public void setNot(AlgebraNodeV1 not) { + this.not = not; + } + + + public AlgebraNodeV1 audienceSegmentId(String audienceSegmentId) { + + this.audienceSegmentId = audienceSegmentId; + return this; + } + + /** + * Get audienceSegmentId + * @return audienceSegmentId + **/ + @javax.annotation.Nullable + + public String getAudienceSegmentId() { + return audienceSegmentId; + } + + + public void setAudienceSegmentId(String audienceSegmentId) { + this.audienceSegmentId = audienceSegmentId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AlgebraNodeV1 instance itself + */ + public AlgebraNodeV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AlgebraNodeV1 algebraNodeV1 = (AlgebraNodeV1) o; + return Objects.equals(this.and, algebraNodeV1.and) && + Objects.equals(this.or, algebraNodeV1.or) && + Objects.equals(this.not, algebraNodeV1.not) && + Objects.equals(this.audienceSegmentId, algebraNodeV1.audienceSegmentId)&& + Objects.equals(this.additionalProperties, algebraNodeV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(and, or, not, audienceSegmentId, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AlgebraNodeV1 {\n"); + sb.append(" and: ").append(toIndentedString(and)).append("\n"); + sb.append(" or: ").append(toIndentedString(or)).append("\n"); + sb.append(" not: ").append(toIndentedString(not)).append("\n"); + sb.append(" audienceSegmentId: ").append(toIndentedString(audienceSegmentId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("and"); + openapiFields.add("or"); + openapiFields.add("not"); + openapiFields.add("audienceSegmentId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AlgebraNodeV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AlgebraNodeV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AlgebraNodeV1 is not found in the empty JSON string", AlgebraNodeV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("and") != null && !jsonObj.get("and").isJsonNull()) { + JsonArray jsonArrayand = jsonObj.getAsJsonArray("and"); + if (jsonArrayand != null) { + // ensure the json data is an array + if (!jsonObj.get("and").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `and` to be an array in the JSON string but got `%s`", jsonObj.get("and").toString())); + } + + // validate the optional field `and` (array) + for (int i = 0; i < jsonArrayand.size(); i++) { + AlgebraNodeV1.validateJsonObject(jsonArrayand.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("or") != null && !jsonObj.get("or").isJsonNull()) { + JsonArray jsonArrayor = jsonObj.getAsJsonArray("or"); + if (jsonArrayor != null) { + // ensure the json data is an array + if (!jsonObj.get("or").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `or` to be an array in the JSON string but got `%s`", jsonObj.get("or").toString())); + } + + // validate the optional field `or` (array) + for (int i = 0; i < jsonArrayor.size(); i++) { + AlgebraNodeV1.validateJsonObject(jsonArrayor.get(i).getAsJsonObject()); + }; + } + } + // validate the optional field `not` + if (jsonObj.get("not") != null && !jsonObj.get("not").isJsonNull()) { + AlgebraNodeV1.validateJsonObject(jsonObj.getAsJsonObject("not")); + } + if ((jsonObj.get("audienceSegmentId") != null && !jsonObj.get("audienceSegmentId").isJsonNull()) && !jsonObj.get("audienceSegmentId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `audienceSegmentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("audienceSegmentId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AlgebraNodeV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AlgebraNodeV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AlgebraNodeV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AlgebraNodeV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AlgebraNodeV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AlgebraNodeV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AlgebraNodeV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AlgebraNodeV1 + * @throws IOException if the JSON string is invalid with respect to AlgebraNodeV1 + */ + public static AlgebraNodeV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AlgebraNodeV1.class); + } + + /** + * Convert an instance of AlgebraNodeV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ApplicationSummaryModel.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ApplicationSummaryModel.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ApplicationSummaryModel.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ApplicationSummaryModel.java index a0774610..609c1d43 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ApplicationSummaryModel.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ApplicationSummaryModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,10 +42,10 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** - * Model of ApplicationSummary + * Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModel { diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ApplicationSummaryModelResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ApplicationSummaryModelResource.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ApplicationSummaryModelResource.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ApplicationSummaryModelResource.java index 25ad854d..6a050141 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ApplicationSummaryModelResource.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ApplicationSummaryModelResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.ApplicationSummaryModel; +import com.criteo.api.marketingsolutions.v2024_07.model.ApplicationSummaryModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,10 +43,10 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** - * A class that represents a ValueType in a guild compliant way + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResource { diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ApplicationSummaryModelResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ApplicationSummaryModelResponse.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ApplicationSummaryModelResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ApplicationSummaryModelResponse.java index e406d1f5..59430e7f 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ApplicationSummaryModelResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ApplicationSummaryModelResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.ApplicationSummaryModelResource; -import com.criteo.api.marketingsolutions.v2023_04.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.ApplicationSummaryModelResource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,10 +46,10 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** - * Response of ApplicationSummaryModel + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResponse { diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkCreateInputV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkCreateInputV1.java new file mode 100644 index 00000000..07c19a1e --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkCreateInputV1.java @@ -0,0 +1,314 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceCreateEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Input to create one or more audiences. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceBulkCreateInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public AudienceBulkCreateInputV1() { + } + + public AudienceBulkCreateInputV1 data(List data) { + + this.data = data; + return this; + } + + public AudienceBulkCreateInputV1 addDataItem(AudienceCreateEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceBulkCreateInputV1 instance itself + */ + public AudienceBulkCreateInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceBulkCreateInputV1 audienceBulkCreateInputV1 = (AudienceBulkCreateInputV1) o; + return Objects.equals(this.data, audienceBulkCreateInputV1.data)&& + Objects.equals(this.additionalProperties, audienceBulkCreateInputV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceBulkCreateInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceBulkCreateInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceBulkCreateInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceBulkCreateInputV1 is not found in the empty JSON string", AudienceBulkCreateInputV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceCreateEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceBulkCreateInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceBulkCreateInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceBulkCreateInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceBulkCreateInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceBulkCreateInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceBulkCreateInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceBulkCreateInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceBulkCreateInputV1 + * @throws IOException if the JSON string is invalid with respect to AudienceBulkCreateInputV1 + */ + public static AudienceBulkCreateInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceBulkCreateInputV1.class); + } + + /** + * Convert an instance of AudienceBulkCreateInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkDeleteInputV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkDeleteInputV1.java new file mode 100644 index 00000000..83c11cd1 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkDeleteInputV1.java @@ -0,0 +1,314 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceDeleteEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Input to delete one or more audiences. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceBulkDeleteInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public AudienceBulkDeleteInputV1() { + } + + public AudienceBulkDeleteInputV1 data(List data) { + + this.data = data; + return this; + } + + public AudienceBulkDeleteInputV1 addDataItem(AudienceDeleteEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceBulkDeleteInputV1 instance itself + */ + public AudienceBulkDeleteInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceBulkDeleteInputV1 audienceBulkDeleteInputV1 = (AudienceBulkDeleteInputV1) o; + return Objects.equals(this.data, audienceBulkDeleteInputV1.data)&& + Objects.equals(this.additionalProperties, audienceBulkDeleteInputV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceBulkDeleteInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceBulkDeleteInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceBulkDeleteInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceBulkDeleteInputV1 is not found in the empty JSON string", AudienceBulkDeleteInputV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceDeleteEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceBulkDeleteInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceBulkDeleteInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceBulkDeleteInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceBulkDeleteInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceBulkDeleteInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceBulkDeleteInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceBulkDeleteInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceBulkDeleteInputV1 + * @throws IOException if the JSON string is invalid with respect to AudienceBulkDeleteInputV1 + */ + public static AudienceBulkDeleteInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceBulkDeleteInputV1.class); + } + + /** + * Convert an instance of AudienceBulkDeleteInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkUpdateInputV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkUpdateInputV1.java new file mode 100644 index 00000000..3e22b96b --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceBulkUpdateInputV1.java @@ -0,0 +1,314 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceUpdateEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Input to update one or more audiences. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceBulkUpdateInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public AudienceBulkUpdateInputV1() { + } + + public AudienceBulkUpdateInputV1 data(List data) { + + this.data = data; + return this; + } + + public AudienceBulkUpdateInputV1 addDataItem(AudienceUpdateEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceBulkUpdateInputV1 instance itself + */ + public AudienceBulkUpdateInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceBulkUpdateInputV1 audienceBulkUpdateInputV1 = (AudienceBulkUpdateInputV1) o; + return Objects.equals(this.data, audienceBulkUpdateInputV1.data)&& + Objects.equals(this.additionalProperties, audienceBulkUpdateInputV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceBulkUpdateInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceBulkUpdateInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceBulkUpdateInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceBulkUpdateInputV1 is not found in the empty JSON string", AudienceBulkUpdateInputV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceUpdateEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceBulkUpdateInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceBulkUpdateInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceBulkUpdateInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceBulkUpdateInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceBulkUpdateInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceBulkUpdateInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceBulkUpdateInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceBulkUpdateInputV1 + * @throws IOException if the JSON string is invalid with respect to AudienceBulkUpdateInputV1 + */ + public static AudienceBulkUpdateInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceBulkUpdateInputV1.class); + } + + /** + * Convert an instance of AudienceBulkUpdateInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceComputeSizeEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceComputeSizeEntityV1Resource.java new file mode 100644 index 00000000..73c54447 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceComputeSizeEntityV1Resource.java @@ -0,0 +1,353 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceComputeSizeEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private Object attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AudienceComputeSizeEntityV1Resource() { + } + + public AudienceComputeSizeEntityV1Resource attributes(Object attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Audience of people of interest for a marketer. + * @return attributes + **/ + @javax.annotation.Nullable + + public Object getAttributes() { + return attributes; + } + + + public void setAttributes(Object attributes) { + this.attributes = attributes; + } + + + public AudienceComputeSizeEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AudienceComputeSizeEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceComputeSizeEntityV1Resource instance itself + */ + public AudienceComputeSizeEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceComputeSizeEntityV1Resource audienceComputeSizeEntityV1Resource = (AudienceComputeSizeEntityV1Resource) o; + return Objects.equals(this.attributes, audienceComputeSizeEntityV1Resource.attributes) && + Objects.equals(this.id, audienceComputeSizeEntityV1Resource.id) && + Objects.equals(this.type, audienceComputeSizeEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, audienceComputeSizeEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceComputeSizeEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceComputeSizeEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceComputeSizeEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceComputeSizeEntityV1Resource is not found in the empty JSON string", AudienceComputeSizeEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceComputeSizeEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceComputeSizeEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceComputeSizeEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceComputeSizeEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceComputeSizeEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceComputeSizeEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceComputeSizeEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceComputeSizeEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceComputeSizeEntityV1Resource + */ + public static AudienceComputeSizeEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceComputeSizeEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceComputeSizeEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceComputeSizesInputV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceComputeSizesInputV1.java new file mode 100644 index 00000000..70b88520 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceComputeSizesInputV1.java @@ -0,0 +1,314 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceComputeSizeEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Input to retrieve the size of one or more audiences. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceComputeSizesInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public AudienceComputeSizesInputV1() { + } + + public AudienceComputeSizesInputV1 data(List data) { + + this.data = data; + return this; + } + + public AudienceComputeSizesInputV1 addDataItem(AudienceComputeSizeEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceComputeSizesInputV1 instance itself + */ + public AudienceComputeSizesInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceComputeSizesInputV1 audienceComputeSizesInputV1 = (AudienceComputeSizesInputV1) o; + return Objects.equals(this.data, audienceComputeSizesInputV1.data)&& + Objects.equals(this.additionalProperties, audienceComputeSizesInputV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceComputeSizesInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceComputeSizesInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceComputeSizesInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceComputeSizesInputV1 is not found in the empty JSON string", AudienceComputeSizesInputV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceComputeSizeEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceComputeSizesInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceComputeSizesInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceComputeSizesInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceComputeSizesInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceComputeSizesInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceComputeSizesInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceComputeSizesInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceComputeSizesInputV1 + * @throws IOException if the JSON string is invalid with respect to AudienceComputeSizesInputV1 + */ + public static AudienceComputeSizesInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceComputeSizesInputV1.class); + } + + /** + * Convert an instance of AudienceComputeSizesInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceAttributes.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceCreateEntityV1.java similarity index 73% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceAttributes.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceCreateEntityV1.java index 5ec7e145..944578cf 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceAttributes.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceCreateEntityV1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AlgebraNodeV1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,17 +43,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** - * NewAudienceAttributes + * Audience of people of interest for a marketer. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NewAudienceAttributes { - public static final String SERIALIZED_NAME_ADVERTISER_ID = "advertiserId"; - @SerializedName(SERIALIZED_NAME_ADVERTISER_ID) - private String advertiserId; - +public class AudienceCreateEntityV1 { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -61,39 +58,25 @@ public class NewAudienceAttributes { @SerializedName(SERIALIZED_NAME_DESCRIPTION) private String description; - public NewAudienceAttributes() { - } - - public NewAudienceAttributes advertiserId(String advertiserId) { - - this.advertiserId = advertiserId; - return this; - } - - /** - * The advertiser id to create the audience for - * @return advertiserId - **/ - @javax.annotation.Nullable - - public String getAdvertiserId() { - return advertiserId; - } + public static final String SERIALIZED_NAME_ADVERTISER_ID = "advertiserId"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_ID) + private String advertiserId; + public static final String SERIALIZED_NAME_ALGEBRA = "algebra"; + @SerializedName(SERIALIZED_NAME_ALGEBRA) + private AlgebraNodeV1 algebra; - public void setAdvertiserId(String advertiserId) { - this.advertiserId = advertiserId; + public AudienceCreateEntityV1() { } - - public NewAudienceAttributes name(String name) { + public AudienceCreateEntityV1 name(String name) { this.name = name; return this; } /** - * The name of the new audience + * Name of the audience * @return name **/ @javax.annotation.Nonnull @@ -108,14 +91,14 @@ public void setName(String name) { } - public NewAudienceAttributes description(String description) { + public AudienceCreateEntityV1 description(String description) { this.description = description; return this; } /** - * The description of the audience + * Description of the audience * @return description **/ @javax.annotation.Nullable @@ -129,6 +112,50 @@ public void setDescription(String description) { this.description = description; } + + public AudienceCreateEntityV1 advertiserId(String advertiserId) { + + this.advertiserId = advertiserId; + return this; + } + + /** + * Advertiser associated to the audience + * @return advertiserId + **/ + @javax.annotation.Nonnull + + public String getAdvertiserId() { + return advertiserId; + } + + + public void setAdvertiserId(String advertiserId) { + this.advertiserId = advertiserId; + } + + + public AudienceCreateEntityV1 algebra(AlgebraNodeV1 algebra) { + + this.algebra = algebra; + return this; + } + + /** + * Get algebra + * @return algebra + **/ + @javax.annotation.Nonnull + + public AlgebraNodeV1 getAlgebra() { + return algebra; + } + + + public void setAlgebra(AlgebraNodeV1 algebra) { + this.algebra = algebra; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -142,9 +169,9 @@ public void setDescription(String description) { * * @param key name of the property * @param value value of the property - * @return the NewAudienceAttributes instance itself + * @return the AudienceCreateEntityV1 instance itself */ - public NewAudienceAttributes putAdditionalProperty(String key, Object value) { + public AudienceCreateEntityV1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -183,11 +210,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NewAudienceAttributes newAudienceAttributes = (NewAudienceAttributes) o; - return Objects.equals(this.advertiserId, newAudienceAttributes.advertiserId) && - Objects.equals(this.name, newAudienceAttributes.name) && - Objects.equals(this.description, newAudienceAttributes.description)&& - Objects.equals(this.additionalProperties, newAudienceAttributes.additionalProperties); + AudienceCreateEntityV1 audienceCreateEntityV1 = (AudienceCreateEntityV1) o; + return Objects.equals(this.name, audienceCreateEntityV1.name) && + Objects.equals(this.description, audienceCreateEntityV1.description) && + Objects.equals(this.advertiserId, audienceCreateEntityV1.advertiserId) && + Objects.equals(this.algebra, audienceCreateEntityV1.algebra)&& + Objects.equals(this.additionalProperties, audienceCreateEntityV1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -196,7 +224,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(advertiserId, name, description, additionalProperties); + return Objects.hash(name, description, advertiserId, algebra, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -209,10 +237,11 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NewAudienceAttributes {\n"); - sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n"); + sb.append("class AudienceCreateEntityV1 {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n"); + sb.append(" algebra: ").append(toIndentedString(algebra)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -236,59 +265,64 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("advertiserId"); openapiFields.add("name"); openapiFields.add("description"); + openapiFields.add("advertiserId"); + openapiFields.add("algebra"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("name"); + openapiRequiredFields.add("advertiserId"); + openapiRequiredFields.add("algebra"); } /** * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NewAudienceAttributes + * @throws IOException if the JSON Object is invalid with respect to AudienceCreateEntityV1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!NewAudienceAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NewAudienceAttributes is not found in the empty JSON string", NewAudienceAttributes.openapiRequiredFields.toString())); + if (!AudienceCreateEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceCreateEntityV1 is not found in the empty JSON string", AudienceCreateEntityV1.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : NewAudienceAttributes.openapiRequiredFields) { + for (String requiredField : AudienceCreateEntityV1.openapiRequiredFields) { if (jsonObj.get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if ((jsonObj.get("advertiserId") != null && !jsonObj.get("advertiserId").isJsonNull()) && !jsonObj.get("advertiserId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `advertiserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("advertiserId").toString())); - } if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } + if (!jsonObj.get("advertiserId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("advertiserId").toString())); + } + // validate the required field `algebra` + AlgebraNodeV1.validateJsonObject(jsonObj.getAsJsonObject("algebra")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!NewAudienceAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NewAudienceAttributes' and its subtypes + if (!AudienceCreateEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceCreateEntityV1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NewAudienceAttributes.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceCreateEntityV1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, NewAudienceAttributes value) throws IOException { + public void write(JsonWriter out, AudienceCreateEntityV1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -311,11 +345,11 @@ else if (entry.getValue() instanceof Character) } @Override - public NewAudienceAttributes read(JsonReader in) throws IOException { + public AudienceCreateEntityV1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - NewAudienceAttributes instance = thisAdapter.fromJsonTree(jsonObj); + AudienceCreateEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -342,18 +376,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of NewAudienceAttributes given an JSON string + * Create an instance of AudienceCreateEntityV1 given an JSON string * * @param jsonString JSON string - * @return An instance of NewAudienceAttributes - * @throws IOException if the JSON string is invalid with respect to NewAudienceAttributes + * @return An instance of AudienceCreateEntityV1 + * @throws IOException if the JSON string is invalid with respect to AudienceCreateEntityV1 */ - public static NewAudienceAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NewAudienceAttributes.class); + public static AudienceCreateEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceCreateEntityV1.class); } /** - * Convert an instance of NewAudienceAttributes to an JSON string + * Convert an instance of AudienceCreateEntityV1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceCreateEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceCreateEntityV1Resource.java new file mode 100644 index 00000000..15c0c5dd --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceCreateEntityV1Resource.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceCreateEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceCreateEntityV1Resource { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceCreateEntityV1 attributes; + + public AudienceCreateEntityV1Resource() { + } + + public AudienceCreateEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public AudienceCreateEntityV1Resource attributes(AudienceCreateEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceCreateEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceCreateEntityV1 attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceCreateEntityV1Resource instance itself + */ + public AudienceCreateEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceCreateEntityV1Resource audienceCreateEntityV1Resource = (AudienceCreateEntityV1Resource) o; + return Objects.equals(this.type, audienceCreateEntityV1Resource.type) && + Objects.equals(this.attributes, audienceCreateEntityV1Resource.attributes)&& + Objects.equals(this.additionalProperties, audienceCreateEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceCreateEntityV1Resource {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceCreateEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceCreateEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceCreateEntityV1Resource is not found in the empty JSON string", AudienceCreateEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceCreateEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceCreateEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceCreateEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceCreateEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceCreateEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceCreateEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceCreateEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceCreateEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceCreateEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceCreateEntityV1Resource + */ + public static AudienceCreateEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceCreateEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceCreateEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceDeleteEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceDeleteEntityV1Resource.java new file mode 100644 index 00000000..236dddec --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceDeleteEntityV1Resource.java @@ -0,0 +1,353 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceDeleteEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private Object attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AudienceDeleteEntityV1Resource() { + } + + public AudienceDeleteEntityV1Resource attributes(Object attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Audience to delete + * @return attributes + **/ + @javax.annotation.Nullable + + public Object getAttributes() { + return attributes; + } + + + public void setAttributes(Object attributes) { + this.attributes = attributes; + } + + + public AudienceDeleteEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AudienceDeleteEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceDeleteEntityV1Resource instance itself + */ + public AudienceDeleteEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceDeleteEntityV1Resource audienceDeleteEntityV1Resource = (AudienceDeleteEntityV1Resource) o; + return Objects.equals(this.attributes, audienceDeleteEntityV1Resource.attributes) && + Objects.equals(this.id, audienceDeleteEntityV1Resource.id) && + Objects.equals(this.type, audienceDeleteEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, audienceDeleteEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceDeleteEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceDeleteEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceDeleteEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceDeleteEntityV1Resource is not found in the empty JSON string", AudienceDeleteEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceDeleteEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceDeleteEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceDeleteEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceDeleteEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceDeleteEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceDeleteEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceDeleteEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceDeleteEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceDeleteEntityV1Resource + */ + public static AudienceDeleteEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceDeleteEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceDeleteEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceAttributes.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1.java similarity index 61% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceAttributes.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1.java index e8fe4a31..bdc2cab1 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceAttributes.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AlgebraNodeV1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,6 +23,8 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.LinkedHashSet; +import java.util.Set; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -43,17 +46,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** - * AudienceAttributes + * Audience of people of interest for a marketer. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AudienceAttributes { - public static final String SERIALIZED_NAME_ADVERTISER_ID = "advertiserId"; - @SerializedName(SERIALIZED_NAME_ADVERTISER_ID) - private String advertiserId; - +public class AudienceEntityV1 { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -62,62 +61,40 @@ public class AudienceAttributes { @SerializedName(SERIALIZED_NAME_DESCRIPTION) private String description; - public static final String SERIALIZED_NAME_CREATED = "created"; - @SerializedName(SERIALIZED_NAME_CREATED) - private OffsetDateTime created; + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; - public static final String SERIALIZED_NAME_UPDATED = "updated"; - @SerializedName(SERIALIZED_NAME_UPDATED) - private OffsetDateTime updated; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_NB_LINES = "nbLines"; - @SerializedName(SERIALIZED_NAME_NB_LINES) - private Integer nbLines; + public static final String SERIALIZED_NAME_ADVERTISER_ID = "advertiserId"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_ID) + private String advertiserId; - public static final String SERIALIZED_NAME_NB_LINES_EMAIL = "nbLinesEmail"; - @SerializedName(SERIALIZED_NAME_NB_LINES_EMAIL) - private Integer nbLinesEmail; + public static final String SERIALIZED_NAME_AD_SET_IDS = "adSetIds"; + @SerializedName(SERIALIZED_NAME_AD_SET_IDS) + private Set adSetIds = null; - public static final String SERIALIZED_NAME_NB_MATCHES_EMAIL = "nbMatchesEmail"; - @SerializedName(SERIALIZED_NAME_NB_MATCHES_EMAIL) - private Integer nbMatchesEmail; + public static final String SERIALIZED_NAME_ALGEBRA = "algebra"; + @SerializedName(SERIALIZED_NAME_ALGEBRA) + private AlgebraNodeV1 algebra; - public AudienceAttributes() { + public AudienceEntityV1() { } - public AudienceAttributes advertiserId(String advertiserId) { - - this.advertiserId = advertiserId; - return this; - } - - /** - * The advertiser id that owns this Audience - * @return advertiserId - **/ - @javax.annotation.Nullable - - public String getAdvertiserId() { - return advertiserId; - } - - - public void setAdvertiserId(String advertiserId) { - this.advertiserId = advertiserId; - } - - - public AudienceAttributes name(String name) { + public AudienceEntityV1 name(String name) { this.name = name; return this; } /** - * The name of the Audience + * Name of the audience * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; @@ -129,17 +106,17 @@ public void setName(String name) { } - public AudienceAttributes description(String description) { + public AudienceEntityV1 description(String description) { this.description = description; return this; } /** - * The string description of the Audience + * Description of the audience * @return description **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDescription() { return description; @@ -151,113 +128,121 @@ public void setDescription(String description) { } - public AudienceAttributes created(OffsetDateTime created) { + public AudienceEntityV1 createdAt(OffsetDateTime createdAt) { - this.created = created; + this.createdAt = createdAt; return this; } /** - * Date and time ISO 8601 formatted string - * @return created + * ISO-8601 timestamp in UTC of audience creation (read-only) + * @return createdAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable - public OffsetDateTime getCreated() { - return created; + public OffsetDateTime getCreatedAt() { + return createdAt; } - public void setCreated(OffsetDateTime created) { - this.created = created; + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; } - public AudienceAttributes updated(OffsetDateTime updated) { + public AudienceEntityV1 updatedAt(OffsetDateTime updatedAt) { - this.updated = updated; + this.updatedAt = updatedAt; return this; } /** - * Date and time ISO 8601 formatted string - * @return updated + * ISO-8601 timestamp in UTC of audience update (read-only) + * @return updatedAt **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable - public OffsetDateTime getUpdated() { - return updated; + public OffsetDateTime getUpdatedAt() { + return updatedAt; } - public void setUpdated(OffsetDateTime updated) { - this.updated = updated; + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; } - public AudienceAttributes nbLines(Integer nbLines) { + public AudienceEntityV1 advertiserId(String advertiserId) { - this.nbLines = nbLines; + this.advertiserId = advertiserId; return this; } /** - * The number of line in the audience available once processed - * @return nbLines + * Advertiser associated to the audience + * @return advertiserId **/ @javax.annotation.Nullable - public Integer getNbLines() { - return nbLines; + public String getAdvertiserId() { + return advertiserId; } - public void setNbLines(Integer nbLines) { - this.nbLines = nbLines; + public void setAdvertiserId(String advertiserId) { + this.advertiserId = advertiserId; } - public AudienceAttributes nbLinesEmail(Integer nbLinesEmail) { + public AudienceEntityV1 adSetIds(Set adSetIds) { - this.nbLinesEmail = nbLinesEmail; + this.adSetIds = adSetIds; + return this; + } + + public AudienceEntityV1 addAdSetIdsItem(String adSetIdsItem) { + if (this.adSetIds == null) { + this.adSetIds = null; + } + this.adSetIds.add(adSetIdsItem); return this; } /** - * The number of email line in the audience available once processed - * @return nbLinesEmail + * Ad sets associated to the audience + * @return adSetIds **/ @javax.annotation.Nullable - public Integer getNbLinesEmail() { - return nbLinesEmail; + public Set getAdSetIds() { + return adSetIds; } - public void setNbLinesEmail(Integer nbLinesEmail) { - this.nbLinesEmail = nbLinesEmail; + public void setAdSetIds(Set adSetIds) { + this.adSetIds = adSetIds; } - public AudienceAttributes nbMatchesEmail(Integer nbMatchesEmail) { + public AudienceEntityV1 algebra(AlgebraNodeV1 algebra) { - this.nbMatchesEmail = nbMatchesEmail; + this.algebra = algebra; return this; } /** - * The number of email matches in the audience available once processed - * @return nbMatchesEmail + * Get algebra + * @return algebra **/ @javax.annotation.Nullable - public Integer getNbMatchesEmail() { - return nbMatchesEmail; + public AlgebraNodeV1 getAlgebra() { + return algebra; } - public void setNbMatchesEmail(Integer nbMatchesEmail) { - this.nbMatchesEmail = nbMatchesEmail; + public void setAlgebra(AlgebraNodeV1 algebra) { + this.algebra = algebra; } /** @@ -273,9 +258,9 @@ public void setNbMatchesEmail(Integer nbMatchesEmail) { * * @param key name of the property * @param value value of the property - * @return the AudienceAttributes instance itself + * @return the AudienceEntityV1 instance itself */ - public AudienceAttributes putAdditionalProperty(String key, Object value) { + public AudienceEntityV1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -314,16 +299,15 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AudienceAttributes audienceAttributes = (AudienceAttributes) o; - return Objects.equals(this.advertiserId, audienceAttributes.advertiserId) && - Objects.equals(this.name, audienceAttributes.name) && - Objects.equals(this.description, audienceAttributes.description) && - Objects.equals(this.created, audienceAttributes.created) && - Objects.equals(this.updated, audienceAttributes.updated) && - Objects.equals(this.nbLines, audienceAttributes.nbLines) && - Objects.equals(this.nbLinesEmail, audienceAttributes.nbLinesEmail) && - Objects.equals(this.nbMatchesEmail, audienceAttributes.nbMatchesEmail)&& - Objects.equals(this.additionalProperties, audienceAttributes.additionalProperties); + AudienceEntityV1 audienceEntityV1 = (AudienceEntityV1) o; + return Objects.equals(this.name, audienceEntityV1.name) && + Objects.equals(this.description, audienceEntityV1.description) && + Objects.equals(this.createdAt, audienceEntityV1.createdAt) && + Objects.equals(this.updatedAt, audienceEntityV1.updatedAt) && + Objects.equals(this.advertiserId, audienceEntityV1.advertiserId) && + Objects.equals(this.adSetIds, audienceEntityV1.adSetIds) && + Objects.equals(this.algebra, audienceEntityV1.algebra)&& + Objects.equals(this.additionalProperties, audienceEntityV1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -332,7 +316,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(advertiserId, name, description, created, updated, nbLines, nbLinesEmail, nbMatchesEmail, additionalProperties); + return Objects.hash(name, description, createdAt, updatedAt, advertiserId, adSetIds, algebra, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -345,15 +329,14 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AudienceAttributes {\n"); - sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n"); + sb.append("class AudienceEntityV1 {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" created: ").append(toIndentedString(created)).append("\n"); - sb.append(" updated: ").append(toIndentedString(updated)).append("\n"); - sb.append(" nbLines: ").append(toIndentedString(nbLines)).append("\n"); - sb.append(" nbLinesEmail: ").append(toIndentedString(nbLinesEmail)).append("\n"); - sb.append(" nbMatchesEmail: ").append(toIndentedString(nbMatchesEmail)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n"); + sb.append(" adSetIds: ").append(toIndentedString(adSetIds)).append("\n"); + sb.append(" algebra: ").append(toIndentedString(algebra)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -377,50 +360,46 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("advertiserId"); openapiFields.add("name"); openapiFields.add("description"); - openapiFields.add("created"); - openapiFields.add("updated"); - openapiFields.add("nbLines"); - openapiFields.add("nbLinesEmail"); - openapiFields.add("nbMatchesEmail"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("advertiserId"); + openapiFields.add("adSetIds"); + openapiFields.add("algebra"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("created"); - openapiRequiredFields.add("updated"); } /** * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to AudienceAttributes + * @throws IOException if the JSON Object is invalid with respect to AudienceEntityV1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!AudienceAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceAttributes is not found in the empty JSON string", AudienceAttributes.openapiRequiredFields.toString())); + if (!AudienceEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceEntityV1 is not found in the empty JSON string", AudienceEntityV1.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AudienceAttributes.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); - } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("advertiserId") != null && !jsonObj.get("advertiserId").isJsonNull()) && !jsonObj.get("advertiserId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `advertiserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("advertiserId").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + // ensure the optional json data is an array if present + if (jsonObj.get("adSetIds") != null && !jsonObj.get("adSetIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `adSetIds` to be an array in the JSON string but got `%s`", jsonObj.get("adSetIds").toString())); } - if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + // validate the optional field `algebra` + if (jsonObj.get("algebra") != null && !jsonObj.get("algebra").isJsonNull()) { + AlgebraNodeV1.validateJsonObject(jsonObj.getAsJsonObject("algebra")); } } @@ -428,16 +407,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!AudienceAttributes.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AudienceAttributes' and its subtypes + if (!AudienceEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceEntityV1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AudienceAttributes.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceEntityV1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, AudienceAttributes value) throws IOException { + public void write(JsonWriter out, AudienceEntityV1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -460,11 +439,11 @@ else if (entry.getValue() instanceof Character) } @Override - public AudienceAttributes read(JsonReader in) throws IOException { + public AudienceEntityV1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - AudienceAttributes instance = thisAdapter.fromJsonTree(jsonObj); + AudienceEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -491,18 +470,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of AudienceAttributes given an JSON string + * Create an instance of AudienceEntityV1 given an JSON string * * @param jsonString JSON string - * @return An instance of AudienceAttributes - * @throws IOException if the JSON string is invalid with respect to AudienceAttributes + * @return An instance of AudienceEntityV1 + * @throws IOException if the JSON string is invalid with respect to AudienceEntityV1 */ - public static AudienceAttributes fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, AudienceAttributes.class); + public static AudienceEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceEntityV1.class); } /** - * Convert an instance of AudienceAttributes to an JSON string + * Convert an instance of AudienceEntityV1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1AudienceSearchMetadataV1ListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1AudienceSearchMetadataV1ListResponse.java new file mode 100644 index 00000000..079ae874 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1AudienceSearchMetadataV1ListResponse.java @@ -0,0 +1,427 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceEntityV1Resource; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSearchMetadataV1; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several entities and metadata + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceEntityV1AudienceSearchMetadataV1ListResponse { + public static final String SERIALIZED_NAME_META = "meta"; + @SerializedName(SERIALIZED_NAME_META) + private AudienceSearchMetadataV1 meta; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public AudienceEntityV1AudienceSearchMetadataV1ListResponse() { + } + + + public AudienceEntityV1AudienceSearchMetadataV1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public AudienceEntityV1AudienceSearchMetadataV1ListResponse meta(AudienceSearchMetadataV1 meta) { + + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + + public AudienceSearchMetadataV1 getMeta() { + return meta; + } + + + public void setMeta(AudienceSearchMetadataV1 meta) { + this.meta = meta; + } + + + public AudienceEntityV1AudienceSearchMetadataV1ListResponse data(List data) { + + this.data = data; + return this; + } + + public AudienceEntityV1AudienceSearchMetadataV1ListResponse addDataItem(AudienceEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceEntityV1AudienceSearchMetadataV1ListResponse instance itself + */ + public AudienceEntityV1AudienceSearchMetadataV1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceEntityV1AudienceSearchMetadataV1ListResponse audienceEntityV1AudienceSearchMetadataV1ListResponse = (AudienceEntityV1AudienceSearchMetadataV1ListResponse) o; + return Objects.equals(this.meta, audienceEntityV1AudienceSearchMetadataV1ListResponse.meta) && + Objects.equals(this.data, audienceEntityV1AudienceSearchMetadataV1ListResponse.data) && + Objects.equals(this.warnings, audienceEntityV1AudienceSearchMetadataV1ListResponse.warnings) && + Objects.equals(this.errors, audienceEntityV1AudienceSearchMetadataV1ListResponse.errors)&& + Objects.equals(this.additionalProperties, audienceEntityV1AudienceSearchMetadataV1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(meta, data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceEntityV1AudienceSearchMetadataV1ListResponse {\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("meta"); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceEntityV1AudienceSearchMetadataV1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceEntityV1AudienceSearchMetadataV1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceEntityV1AudienceSearchMetadataV1ListResponse is not found in the empty JSON string", AudienceEntityV1AudienceSearchMetadataV1ListResponse.openapiRequiredFields.toString())); + } + } + // validate the optional field `meta` + if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { + AudienceSearchMetadataV1.validateJsonObject(jsonObj.getAsJsonObject("meta")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceEntityV1AudienceSearchMetadataV1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceEntityV1AudienceSearchMetadataV1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceEntityV1AudienceSearchMetadataV1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceEntityV1AudienceSearchMetadataV1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceEntityV1AudienceSearchMetadataV1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceEntityV1AudienceSearchMetadataV1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceEntityV1AudienceSearchMetadataV1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceEntityV1AudienceSearchMetadataV1ListResponse + * @throws IOException if the JSON string is invalid with respect to AudienceEntityV1AudienceSearchMetadataV1ListResponse + */ + public static AudienceEntityV1AudienceSearchMetadataV1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceEntityV1AudienceSearchMetadataV1ListResponse.class); + } + + /** + * Convert an instance of AudienceEntityV1AudienceSearchMetadataV1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1ListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1ListResponse.java new file mode 100644 index 00000000..aecc618d --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1ListResponse.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceEntityV1Resource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several entities + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceEntityV1ListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public AudienceEntityV1ListResponse() { + } + + + public AudienceEntityV1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public AudienceEntityV1ListResponse data(List data) { + + this.data = data; + return this; + } + + public AudienceEntityV1ListResponse addDataItem(AudienceEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceEntityV1ListResponse instance itself + */ + public AudienceEntityV1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceEntityV1ListResponse audienceEntityV1ListResponse = (AudienceEntityV1ListResponse) o; + return Objects.equals(this.data, audienceEntityV1ListResponse.data) && + Objects.equals(this.warnings, audienceEntityV1ListResponse.warnings) && + Objects.equals(this.errors, audienceEntityV1ListResponse.errors)&& + Objects.equals(this.additionalProperties, audienceEntityV1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceEntityV1ListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceEntityV1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceEntityV1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceEntityV1ListResponse is not found in the empty JSON string", AudienceEntityV1ListResponse.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceEntityV1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceEntityV1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceEntityV1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceEntityV1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceEntityV1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceEntityV1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceEntityV1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceEntityV1ListResponse + * @throws IOException if the JSON string is invalid with respect to AudienceEntityV1ListResponse + */ + public static AudienceEntityV1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceEntityV1ListResponse.class); + } + + /** + * Convert an instance of AudienceEntityV1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1Resource.java new file mode 100644 index 00000000..40d98423 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEntityV1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceEntityV1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AudienceEntityV1Resource() { + } + + public AudienceEntityV1Resource attributes(AudienceEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceEntityV1 attributes) { + this.attributes = attributes; + } + + + public AudienceEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AudienceEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceEntityV1Resource instance itself + */ + public AudienceEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceEntityV1Resource audienceEntityV1Resource = (AudienceEntityV1Resource) o; + return Objects.equals(this.attributes, audienceEntityV1Resource.attributes) && + Objects.equals(this.id, audienceEntityV1Resource.id) && + Objects.equals(this.type, audienceEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, audienceEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceEntityV1Resource is not found in the empty JSON string", AudienceEntityV1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceEntityV1Resource + */ + public static AudienceEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceError.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceError.java similarity index 99% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceError.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceError.java index 2ee39085..69ce8fd6 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceError.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceError.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Definition of an audience error diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeEntityV1.java new file mode 100644 index 00000000..2b87b78d --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeEntityV1.java @@ -0,0 +1,321 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AlgebraNodeV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Audience of people of interest for a marketer. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceEstimateSizeEntityV1 { + public static final String SERIALIZED_NAME_ADVERTISER_ID = "advertiserId"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_ID) + private String advertiserId; + + public static final String SERIALIZED_NAME_ALGEBRA = "algebra"; + @SerializedName(SERIALIZED_NAME_ALGEBRA) + private AlgebraNodeV1 algebra; + + public AudienceEstimateSizeEntityV1() { + } + + public AudienceEstimateSizeEntityV1 advertiserId(String advertiserId) { + + this.advertiserId = advertiserId; + return this; + } + + /** + * Advertiser associated to the audience + * @return advertiserId + **/ + @javax.annotation.Nonnull + + public String getAdvertiserId() { + return advertiserId; + } + + + public void setAdvertiserId(String advertiserId) { + this.advertiserId = advertiserId; + } + + + public AudienceEstimateSizeEntityV1 algebra(AlgebraNodeV1 algebra) { + + this.algebra = algebra; + return this; + } + + /** + * Get algebra + * @return algebra + **/ + @javax.annotation.Nonnull + + public AlgebraNodeV1 getAlgebra() { + return algebra; + } + + + public void setAlgebra(AlgebraNodeV1 algebra) { + this.algebra = algebra; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceEstimateSizeEntityV1 instance itself + */ + public AudienceEstimateSizeEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceEstimateSizeEntityV1 audienceEstimateSizeEntityV1 = (AudienceEstimateSizeEntityV1) o; + return Objects.equals(this.advertiserId, audienceEstimateSizeEntityV1.advertiserId) && + Objects.equals(this.algebra, audienceEstimateSizeEntityV1.algebra)&& + Objects.equals(this.additionalProperties, audienceEstimateSizeEntityV1.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(advertiserId, algebra, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceEstimateSizeEntityV1 {\n"); + sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n"); + sb.append(" algebra: ").append(toIndentedString(algebra)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("advertiserId"); + openapiFields.add("algebra"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("advertiserId"); + openapiRequiredFields.add("algebra"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceEstimateSizeEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceEstimateSizeEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceEstimateSizeEntityV1 is not found in the empty JSON string", AudienceEstimateSizeEntityV1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AudienceEstimateSizeEntityV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("advertiserId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("advertiserId").toString())); + } + // validate the required field `algebra` + AlgebraNodeV1.validateJsonObject(jsonObj.getAsJsonObject("algebra")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceEstimateSizeEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceEstimateSizeEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceEstimateSizeEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceEstimateSizeEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceEstimateSizeEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceEstimateSizeEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceEstimateSizeEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceEstimateSizeEntityV1 + * @throws IOException if the JSON string is invalid with respect to AudienceEstimateSizeEntityV1 + */ + public static AudienceEstimateSizeEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceEstimateSizeEntityV1.class); + } + + /** + * Convert an instance of AudienceEstimateSizeEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeEntityV1Resource.java new file mode 100644 index 00000000..9d433103 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeEntityV1Resource.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceEstimateSizeEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceEstimateSizeEntityV1Resource { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceEstimateSizeEntityV1 attributes; + + public AudienceEstimateSizeEntityV1Resource() { + } + + public AudienceEstimateSizeEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public AudienceEstimateSizeEntityV1Resource attributes(AudienceEstimateSizeEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceEstimateSizeEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceEstimateSizeEntityV1 attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceEstimateSizeEntityV1Resource instance itself + */ + public AudienceEstimateSizeEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceEstimateSizeEntityV1Resource audienceEstimateSizeEntityV1Resource = (AudienceEstimateSizeEntityV1Resource) o; + return Objects.equals(this.type, audienceEstimateSizeEntityV1Resource.type) && + Objects.equals(this.attributes, audienceEstimateSizeEntityV1Resource.attributes)&& + Objects.equals(this.additionalProperties, audienceEstimateSizeEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceEstimateSizeEntityV1Resource {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceEstimateSizeEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceEstimateSizeEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceEstimateSizeEntityV1Resource is not found in the empty JSON string", AudienceEstimateSizeEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceEstimateSizeEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceEstimateSizeEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceEstimateSizeEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceEstimateSizeEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceEstimateSizeEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceEstimateSizeEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceEstimateSizeEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceEstimateSizeEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceEstimateSizeEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceEstimateSizeEntityV1Resource + */ + public static AudienceEstimateSizeEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceEstimateSizeEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceEstimateSizeEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeInputV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeInputV1.java new file mode 100644 index 00000000..c7c77dd5 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceEstimateSizeInputV1.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceEstimateSizeEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Input to estimate the size of an audience. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceEstimateSizeInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private AudienceEstimateSizeEntityV1Resource data; + + public AudienceEstimateSizeInputV1() { + } + + public AudienceEstimateSizeInputV1 data(AudienceEstimateSizeEntityV1Resource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public AudienceEstimateSizeEntityV1Resource getData() { + return data; + } + + + public void setData(AudienceEstimateSizeEntityV1Resource data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceEstimateSizeInputV1 instance itself + */ + public AudienceEstimateSizeInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceEstimateSizeInputV1 audienceEstimateSizeInputV1 = (AudienceEstimateSizeInputV1) o; + return Objects.equals(this.data, audienceEstimateSizeInputV1.data)&& + Objects.equals(this.additionalProperties, audienceEstimateSizeInputV1.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceEstimateSizeInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceEstimateSizeInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceEstimateSizeInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceEstimateSizeInputV1 is not found in the empty JSON string", AudienceEstimateSizeInputV1.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + AudienceEstimateSizeEntityV1Resource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceEstimateSizeInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceEstimateSizeInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceEstimateSizeInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceEstimateSizeInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceEstimateSizeInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceEstimateSizeInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceEstimateSizeInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceEstimateSizeInputV1 + * @throws IOException if the JSON string is invalid with respect to AudienceEstimateSizeInputV1 + */ + public static AudienceEstimateSizeInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceEstimateSizeInputV1.class); + } + + /** + * Convert an instance of AudienceEstimateSizeInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceIdEntityV1ListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceIdEntityV1ListResponse.java new file mode 100644 index 00000000..57d6bc8c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceIdEntityV1ListResponse.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceIdEntityV1Resource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several entities + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceIdEntityV1ListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public AudienceIdEntityV1ListResponse() { + } + + + public AudienceIdEntityV1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public AudienceIdEntityV1ListResponse data(List data) { + + this.data = data; + return this; + } + + public AudienceIdEntityV1ListResponse addDataItem(AudienceIdEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceIdEntityV1ListResponse instance itself + */ + public AudienceIdEntityV1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceIdEntityV1ListResponse audienceIdEntityV1ListResponse = (AudienceIdEntityV1ListResponse) o; + return Objects.equals(this.data, audienceIdEntityV1ListResponse.data) && + Objects.equals(this.warnings, audienceIdEntityV1ListResponse.warnings) && + Objects.equals(this.errors, audienceIdEntityV1ListResponse.errors)&& + Objects.equals(this.additionalProperties, audienceIdEntityV1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceIdEntityV1ListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceIdEntityV1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceIdEntityV1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceIdEntityV1ListResponse is not found in the empty JSON string", AudienceIdEntityV1ListResponse.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceIdEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceIdEntityV1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceIdEntityV1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceIdEntityV1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceIdEntityV1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceIdEntityV1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceIdEntityV1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceIdEntityV1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceIdEntityV1ListResponse + * @throws IOException if the JSON string is invalid with respect to AudienceIdEntityV1ListResponse + */ + public static AudienceIdEntityV1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceIdEntityV1ListResponse.class); + } + + /** + * Convert an instance of AudienceIdEntityV1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceIdEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceIdEntityV1Resource.java new file mode 100644 index 00000000..4832c25f --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceIdEntityV1Resource.java @@ -0,0 +1,353 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceIdEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private Object attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AudienceIdEntityV1Resource() { + } + + public AudienceIdEntityV1Resource attributes(Object attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Audience entity with only its ID + * @return attributes + **/ + @javax.annotation.Nullable + + public Object getAttributes() { + return attributes; + } + + + public void setAttributes(Object attributes) { + this.attributes = attributes; + } + + + public AudienceIdEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AudienceIdEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceIdEntityV1Resource instance itself + */ + public AudienceIdEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceIdEntityV1Resource audienceIdEntityV1Resource = (AudienceIdEntityV1Resource) o; + return Objects.equals(this.attributes, audienceIdEntityV1Resource.attributes) && + Objects.equals(this.id, audienceIdEntityV1Resource.id) && + Objects.equals(this.type, audienceIdEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, audienceIdEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceIdEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceIdEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceIdEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceIdEntityV1Resource is not found in the empty JSON string", AudienceIdEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceIdEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceIdEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceIdEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceIdEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceIdEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceIdEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceIdEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceIdEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceIdEntityV1Resource + */ + public static AudienceIdEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceIdEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceIdEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceNameDescription.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceNameDescription.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceNameDescription.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceNameDescription.java index 4c2444f1..efef1925 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceNameDescription.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceNameDescription.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Description of an audience with name and detailed description diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchEntityV1.java new file mode 100644 index 00000000..15e16bc5 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchEntityV1.java @@ -0,0 +1,426 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Available filters to perform a search on segments. If present, the filters are AND'ed together when applied. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSearchEntityV1 { + public static final String SERIALIZED_NAME_AUDIENCE_IDS = "audienceIds"; + @SerializedName(SERIALIZED_NAME_AUDIENCE_IDS) + private List audienceIds = null; + + public static final String SERIALIZED_NAME_ADVERTISER_IDS = "advertiserIds"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_IDS) + private List advertiserIds = null; + + public static final String SERIALIZED_NAME_AUDIENCE_SEGMENT_IDS = "audienceSegmentIds"; + @SerializedName(SERIALIZED_NAME_AUDIENCE_SEGMENT_IDS) + private List audienceSegmentIds = null; + + public static final String SERIALIZED_NAME_AD_SET_IDS = "adSetIds"; + @SerializedName(SERIALIZED_NAME_AD_SET_IDS) + private List adSetIds = null; + + public AudienceSearchEntityV1() { + } + + public AudienceSearchEntityV1 audienceIds(List audienceIds) { + + this.audienceIds = audienceIds; + return this; + } + + public AudienceSearchEntityV1 addAudienceIdsItem(String audienceIdsItem) { + if (this.audienceIds == null) { + this.audienceIds = null; + } + this.audienceIds.add(audienceIdsItem); + return this; + } + + /** + * List of audience ids + * @return audienceIds + **/ + @javax.annotation.Nullable + + public List getAudienceIds() { + return audienceIds; + } + + + public void setAudienceIds(List audienceIds) { + this.audienceIds = audienceIds; + } + + + public AudienceSearchEntityV1 advertiserIds(List advertiserIds) { + + this.advertiserIds = advertiserIds; + return this; + } + + public AudienceSearchEntityV1 addAdvertiserIdsItem(String advertiserIdsItem) { + if (this.advertiserIds == null) { + this.advertiserIds = null; + } + this.advertiserIds.add(advertiserIdsItem); + return this; + } + + /** + * List of advertiser ids + * @return advertiserIds + **/ + @javax.annotation.Nullable + + public List getAdvertiserIds() { + return advertiserIds; + } + + + public void setAdvertiserIds(List advertiserIds) { + this.advertiserIds = advertiserIds; + } + + + public AudienceSearchEntityV1 audienceSegmentIds(List audienceSegmentIds) { + + this.audienceSegmentIds = audienceSegmentIds; + return this; + } + + public AudienceSearchEntityV1 addAudienceSegmentIdsItem(String audienceSegmentIdsItem) { + if (this.audienceSegmentIds == null) { + this.audienceSegmentIds = null; + } + this.audienceSegmentIds.add(audienceSegmentIdsItem); + return this; + } + + /** + * List of segment ids (linked to the result audiences) + * @return audienceSegmentIds + **/ + @javax.annotation.Nullable + + public List getAudienceSegmentIds() { + return audienceSegmentIds; + } + + + public void setAudienceSegmentIds(List audienceSegmentIds) { + this.audienceSegmentIds = audienceSegmentIds; + } + + + public AudienceSearchEntityV1 adSetIds(List adSetIds) { + + this.adSetIds = adSetIds; + return this; + } + + public AudienceSearchEntityV1 addAdSetIdsItem(String adSetIdsItem) { + if (this.adSetIds == null) { + this.adSetIds = null; + } + this.adSetIds.add(adSetIdsItem); + return this; + } + + /** + * List of AdSet ids + * @return adSetIds + **/ + @javax.annotation.Nullable + + public List getAdSetIds() { + return adSetIds; + } + + + public void setAdSetIds(List adSetIds) { + this.adSetIds = adSetIds; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSearchEntityV1 instance itself + */ + public AudienceSearchEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSearchEntityV1 audienceSearchEntityV1 = (AudienceSearchEntityV1) o; + return Objects.equals(this.audienceIds, audienceSearchEntityV1.audienceIds) && + Objects.equals(this.advertiserIds, audienceSearchEntityV1.advertiserIds) && + Objects.equals(this.audienceSegmentIds, audienceSearchEntityV1.audienceSegmentIds) && + Objects.equals(this.adSetIds, audienceSearchEntityV1.adSetIds)&& + Objects.equals(this.additionalProperties, audienceSearchEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(audienceIds, advertiserIds, audienceSegmentIds, adSetIds, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSearchEntityV1 {\n"); + sb.append(" audienceIds: ").append(toIndentedString(audienceIds)).append("\n"); + sb.append(" advertiserIds: ").append(toIndentedString(advertiserIds)).append("\n"); + sb.append(" audienceSegmentIds: ").append(toIndentedString(audienceSegmentIds)).append("\n"); + sb.append(" adSetIds: ").append(toIndentedString(adSetIds)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("audienceIds"); + openapiFields.add("advertiserIds"); + openapiFields.add("audienceSegmentIds"); + openapiFields.add("adSetIds"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSearchEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSearchEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSearchEntityV1 is not found in the empty JSON string", AudienceSearchEntityV1.openapiRequiredFields.toString())); + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("audienceIds") != null && !jsonObj.get("audienceIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `audienceIds` to be an array in the JSON string but got `%s`", jsonObj.get("audienceIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("advertiserIds") != null && !jsonObj.get("advertiserIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserIds` to be an array in the JSON string but got `%s`", jsonObj.get("advertiserIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("audienceSegmentIds") != null && !jsonObj.get("audienceSegmentIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `audienceSegmentIds` to be an array in the JSON string but got `%s`", jsonObj.get("audienceSegmentIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("adSetIds") != null && !jsonObj.get("adSetIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `adSetIds` to be an array in the JSON string but got `%s`", jsonObj.get("adSetIds").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSearchEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSearchEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSearchEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSearchEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSearchEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSearchEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSearchEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSearchEntityV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSearchEntityV1 + */ + public static AudienceSearchEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSearchEntityV1.class); + } + + /** + * Convert an instance of AudienceSearchEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchEntityV1Resource.java new file mode 100644 index 00000000..e68a9d28 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchEntityV1Resource.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSearchEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSearchEntityV1Resource { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceSearchEntityV1 attributes; + + public AudienceSearchEntityV1Resource() { + } + + public AudienceSearchEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public AudienceSearchEntityV1Resource attributes(AudienceSearchEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceSearchEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceSearchEntityV1 attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSearchEntityV1Resource instance itself + */ + public AudienceSearchEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSearchEntityV1Resource audienceSearchEntityV1Resource = (AudienceSearchEntityV1Resource) o; + return Objects.equals(this.type, audienceSearchEntityV1Resource.type) && + Objects.equals(this.attributes, audienceSearchEntityV1Resource.attributes)&& + Objects.equals(this.additionalProperties, audienceSearchEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSearchEntityV1Resource {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSearchEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSearchEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSearchEntityV1Resource is not found in the empty JSON string", AudienceSearchEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceSearchEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSearchEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSearchEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSearchEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSearchEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSearchEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSearchEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSearchEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSearchEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceSearchEntityV1Resource + */ + public static AudienceSearchEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSearchEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceSearchEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchInputV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchInputV1.java new file mode 100644 index 00000000..a82139f6 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchInputV1.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSearchEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Audience search parameter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSearchInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private AudienceSearchEntityV1Resource data; + + public AudienceSearchInputV1() { + } + + public AudienceSearchInputV1 data(AudienceSearchEntityV1Resource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public AudienceSearchEntityV1Resource getData() { + return data; + } + + + public void setData(AudienceSearchEntityV1Resource data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSearchInputV1 instance itself + */ + public AudienceSearchInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSearchInputV1 audienceSearchInputV1 = (AudienceSearchInputV1) o; + return Objects.equals(this.data, audienceSearchInputV1.data)&& + Objects.equals(this.additionalProperties, audienceSearchInputV1.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSearchInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSearchInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSearchInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSearchInputV1 is not found in the empty JSON string", AudienceSearchInputV1.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + AudienceSearchEntityV1Resource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSearchInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSearchInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSearchInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSearchInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSearchInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSearchInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSearchInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSearchInputV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSearchInputV1 + */ + public static AudienceSearchInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSearchInputV1.class); + } + + /** + * Convert an instance of AudienceSearchInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchMetadataV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchMetadataV1.java new file mode 100644 index 00000000..ece85df7 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSearchMetadataV1.java @@ -0,0 +1,347 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Metadata for the audience search response. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSearchMetadataV1 { + public static final String SERIALIZED_NAME_TOTAL_ITEMS = "totalItems"; + @SerializedName(SERIALIZED_NAME_TOTAL_ITEMS) + private Integer totalItems; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + @SerializedName(SERIALIZED_NAME_LIMIT) + private Integer limit; + + public static final String SERIALIZED_NAME_OFFSET = "offset"; + @SerializedName(SERIALIZED_NAME_OFFSET) + private Integer offset; + + public AudienceSearchMetadataV1() { + } + + public AudienceSearchMetadataV1 totalItems(Integer totalItems) { + + this.totalItems = totalItems; + return this; + } + + /** + * Total number of items + * @return totalItems + **/ + @javax.annotation.Nullable + + public Integer getTotalItems() { + return totalItems; + } + + + public void setTotalItems(Integer totalItems) { + this.totalItems = totalItems; + } + + + public AudienceSearchMetadataV1 limit(Integer limit) { + + this.limit = limit; + return this; + } + + /** + * Max item of the current page + * @return limit + **/ + @javax.annotation.Nullable + + public Integer getLimit() { + return limit; + } + + + public void setLimit(Integer limit) { + this.limit = limit; + } + + + public AudienceSearchMetadataV1 offset(Integer offset) { + + this.offset = offset; + return this; + } + + /** + * Number of item to skip + * @return offset + **/ + @javax.annotation.Nullable + + public Integer getOffset() { + return offset; + } + + + public void setOffset(Integer offset) { + this.offset = offset; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSearchMetadataV1 instance itself + */ + public AudienceSearchMetadataV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSearchMetadataV1 audienceSearchMetadataV1 = (AudienceSearchMetadataV1) o; + return Objects.equals(this.totalItems, audienceSearchMetadataV1.totalItems) && + Objects.equals(this.limit, audienceSearchMetadataV1.limit) && + Objects.equals(this.offset, audienceSearchMetadataV1.offset)&& + Objects.equals(this.additionalProperties, audienceSearchMetadataV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(totalItems, limit, offset, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSearchMetadataV1 {\n"); + sb.append(" totalItems: ").append(toIndentedString(totalItems)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("totalItems"); + openapiFields.add("limit"); + openapiFields.add("offset"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSearchMetadataV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSearchMetadataV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSearchMetadataV1 is not found in the empty JSON string", AudienceSearchMetadataV1.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSearchMetadataV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSearchMetadataV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSearchMetadataV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSearchMetadataV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSearchMetadataV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSearchMetadataV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSearchMetadataV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSearchMetadataV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSearchMetadataV1 + */ + public static AudienceSearchMetadataV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSearchMetadataV1.class); + } + + /** + * Convert an instance of AudienceSearchMetadataV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkCreateInputV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkCreateInputV1.java new file mode 100644 index 00000000..1d6e6305 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkCreateInputV1.java @@ -0,0 +1,314 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentCreateEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Input to create one or more audience segments. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentBulkCreateInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public AudienceSegmentBulkCreateInputV1() { + } + + public AudienceSegmentBulkCreateInputV1 data(List data) { + + this.data = data; + return this; + } + + public AudienceSegmentBulkCreateInputV1 addDataItem(AudienceSegmentCreateEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentBulkCreateInputV1 instance itself + */ + public AudienceSegmentBulkCreateInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentBulkCreateInputV1 audienceSegmentBulkCreateInputV1 = (AudienceSegmentBulkCreateInputV1) o; + return Objects.equals(this.data, audienceSegmentBulkCreateInputV1.data)&& + Objects.equals(this.additionalProperties, audienceSegmentBulkCreateInputV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentBulkCreateInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentBulkCreateInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentBulkCreateInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentBulkCreateInputV1 is not found in the empty JSON string", AudienceSegmentBulkCreateInputV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceSegmentCreateEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentBulkCreateInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentBulkCreateInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentBulkCreateInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentBulkCreateInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentBulkCreateInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentBulkCreateInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentBulkCreateInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentBulkCreateInputV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentBulkCreateInputV1 + */ + public static AudienceSegmentBulkCreateInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentBulkCreateInputV1.class); + } + + /** + * Convert an instance of AudienceSegmentBulkCreateInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkDeleteInputV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkDeleteInputV1.java new file mode 100644 index 00000000..c8e1922d --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkDeleteInputV1.java @@ -0,0 +1,314 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentDeleteEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Input to delete one or more segments. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentBulkDeleteInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public AudienceSegmentBulkDeleteInputV1() { + } + + public AudienceSegmentBulkDeleteInputV1 data(List data) { + + this.data = data; + return this; + } + + public AudienceSegmentBulkDeleteInputV1 addDataItem(AudienceSegmentDeleteEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentBulkDeleteInputV1 instance itself + */ + public AudienceSegmentBulkDeleteInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentBulkDeleteInputV1 audienceSegmentBulkDeleteInputV1 = (AudienceSegmentBulkDeleteInputV1) o; + return Objects.equals(this.data, audienceSegmentBulkDeleteInputV1.data)&& + Objects.equals(this.additionalProperties, audienceSegmentBulkDeleteInputV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentBulkDeleteInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentBulkDeleteInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentBulkDeleteInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentBulkDeleteInputV1 is not found in the empty JSON string", AudienceSegmentBulkDeleteInputV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceSegmentDeleteEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentBulkDeleteInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentBulkDeleteInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentBulkDeleteInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentBulkDeleteInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentBulkDeleteInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentBulkDeleteInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentBulkDeleteInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentBulkDeleteInputV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentBulkDeleteInputV1 + */ + public static AudienceSegmentBulkDeleteInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentBulkDeleteInputV1.class); + } + + /** + * Convert an instance of AudienceSegmentBulkDeleteInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkUpdateInputV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkUpdateInputV1.java new file mode 100644 index 00000000..c96bf05c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentBulkUpdateInputV1.java @@ -0,0 +1,314 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentUpdateEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Input to update one or more segments. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentBulkUpdateInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public AudienceSegmentBulkUpdateInputV1() { + } + + public AudienceSegmentBulkUpdateInputV1 data(List data) { + + this.data = data; + return this; + } + + public AudienceSegmentBulkUpdateInputV1 addDataItem(AudienceSegmentUpdateEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentBulkUpdateInputV1 instance itself + */ + public AudienceSegmentBulkUpdateInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentBulkUpdateInputV1 audienceSegmentBulkUpdateInputV1 = (AudienceSegmentBulkUpdateInputV1) o; + return Objects.equals(this.data, audienceSegmentBulkUpdateInputV1.data)&& + Objects.equals(this.additionalProperties, audienceSegmentBulkUpdateInputV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentBulkUpdateInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentBulkUpdateInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentBulkUpdateInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentBulkUpdateInputV1 is not found in the empty JSON string", AudienceSegmentBulkUpdateInputV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceSegmentUpdateEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentBulkUpdateInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentBulkUpdateInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentBulkUpdateInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentBulkUpdateInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentBulkUpdateInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentBulkUpdateInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentBulkUpdateInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentBulkUpdateInputV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentBulkUpdateInputV1 + */ + public static AudienceSegmentBulkUpdateInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentBulkUpdateInputV1.class); + } + + /** + * Convert an instance of AudienceSegmentBulkUpdateInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentComputeSizeEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentComputeSizeEntityV1Resource.java new file mode 100644 index 00000000..1436189b --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentComputeSizeEntityV1Resource.java @@ -0,0 +1,353 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentComputeSizeEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private Object attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AudienceSegmentComputeSizeEntityV1Resource() { + } + + public AudienceSegmentComputeSizeEntityV1Resource attributes(Object attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Set of rules that defines specific people to target. + * @return attributes + **/ + @javax.annotation.Nullable + + public Object getAttributes() { + return attributes; + } + + + public void setAttributes(Object attributes) { + this.attributes = attributes; + } + + + public AudienceSegmentComputeSizeEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AudienceSegmentComputeSizeEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentComputeSizeEntityV1Resource instance itself + */ + public AudienceSegmentComputeSizeEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentComputeSizeEntityV1Resource audienceSegmentComputeSizeEntityV1Resource = (AudienceSegmentComputeSizeEntityV1Resource) o; + return Objects.equals(this.attributes, audienceSegmentComputeSizeEntityV1Resource.attributes) && + Objects.equals(this.id, audienceSegmentComputeSizeEntityV1Resource.id) && + Objects.equals(this.type, audienceSegmentComputeSizeEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, audienceSegmentComputeSizeEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentComputeSizeEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentComputeSizeEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentComputeSizeEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentComputeSizeEntityV1Resource is not found in the empty JSON string", AudienceSegmentComputeSizeEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentComputeSizeEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentComputeSizeEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentComputeSizeEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentComputeSizeEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentComputeSizeEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentComputeSizeEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentComputeSizeEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentComputeSizeEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentComputeSizeEntityV1Resource + */ + public static AudienceSegmentComputeSizeEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentComputeSizeEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceSegmentComputeSizeEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentComputeSizesInputV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentComputeSizesInputV1.java new file mode 100644 index 00000000..56d7e079 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentComputeSizesInputV1.java @@ -0,0 +1,314 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentComputeSizeEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Input to retrieve the size of one or more segments. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentComputeSizesInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public AudienceSegmentComputeSizesInputV1() { + } + + public AudienceSegmentComputeSizesInputV1 data(List data) { + + this.data = data; + return this; + } + + public AudienceSegmentComputeSizesInputV1 addDataItem(AudienceSegmentComputeSizeEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentComputeSizesInputV1 instance itself + */ + public AudienceSegmentComputeSizesInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentComputeSizesInputV1 audienceSegmentComputeSizesInputV1 = (AudienceSegmentComputeSizesInputV1) o; + return Objects.equals(this.data, audienceSegmentComputeSizesInputV1.data)&& + Objects.equals(this.additionalProperties, audienceSegmentComputeSizesInputV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentComputeSizesInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentComputeSizesInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentComputeSizesInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentComputeSizesInputV1 is not found in the empty JSON string", AudienceSegmentComputeSizesInputV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceSegmentComputeSizeEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentComputeSizesInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentComputeSizesInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentComputeSizesInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentComputeSizesInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentComputeSizesInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentComputeSizesInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentComputeSizesInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentComputeSizesInputV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentComputeSizesInputV1 + */ + public static AudienceSegmentComputeSizesInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentComputeSizesInputV1.class); + } + + /** + * Convert an instance of AudienceSegmentComputeSizesInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentCreateEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentCreateEntityV1.java new file mode 100644 index 00000000..05cf1871 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentCreateEntityV1.java @@ -0,0 +1,564 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.InMarketCreateV1; +import com.criteo.api.marketingsolutions.v2024_07.model.LocationCreateV1; +import com.criteo.api.marketingsolutions.v2024_07.model.LookalikeCreateV1; +import com.criteo.api.marketingsolutions.v2024_07.model.ProspectingCreateV1; +import com.criteo.api.marketingsolutions.v2024_07.model.RetargetingCreateV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Set of rules that defines specific people to target. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentCreateEntityV1 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_ADVERTISER_ID = "advertiserId"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_ID) + private String advertiserId; + + public static final String SERIALIZED_NAME_IN_MARKET = "inMarket"; + @SerializedName(SERIALIZED_NAME_IN_MARKET) + private InMarketCreateV1 inMarket; + + public static final String SERIALIZED_NAME_PROSPECTING = "prospecting"; + @SerializedName(SERIALIZED_NAME_PROSPECTING) + private ProspectingCreateV1 prospecting; + + public static final String SERIALIZED_NAME_CONTACT_LIST = "contactList"; + @SerializedName(SERIALIZED_NAME_CONTACT_LIST) + private Object contactList; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + private LocationCreateV1 location; + + public static final String SERIALIZED_NAME_RETARGETING = "retargeting"; + @SerializedName(SERIALIZED_NAME_RETARGETING) + private RetargetingCreateV1 retargeting; + + public static final String SERIALIZED_NAME_LOOKALIKE = "lookalike"; + @SerializedName(SERIALIZED_NAME_LOOKALIKE) + private LookalikeCreateV1 lookalike; + + public AudienceSegmentCreateEntityV1() { + } + + public AudienceSegmentCreateEntityV1 name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the segment + * @return name + **/ + @javax.annotation.Nonnull + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public AudienceSegmentCreateEntityV1 description(String description) { + + this.description = description; + return this; + } + + /** + * Description of the segment + * @return description + **/ + @javax.annotation.Nullable + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public AudienceSegmentCreateEntityV1 advertiserId(String advertiserId) { + + this.advertiserId = advertiserId; + return this; + } + + /** + * Advertiser associated to the segment + * @return advertiserId + **/ + @javax.annotation.Nonnull + + public String getAdvertiserId() { + return advertiserId; + } + + + public void setAdvertiserId(String advertiserId) { + this.advertiserId = advertiserId; + } + + + public AudienceSegmentCreateEntityV1 inMarket(InMarketCreateV1 inMarket) { + + this.inMarket = inMarket; + return this; + } + + /** + * Get inMarket + * @return inMarket + **/ + @javax.annotation.Nullable + + public InMarketCreateV1 getInMarket() { + return inMarket; + } + + + public void setInMarket(InMarketCreateV1 inMarket) { + this.inMarket = inMarket; + } + + + public AudienceSegmentCreateEntityV1 prospecting(ProspectingCreateV1 prospecting) { + + this.prospecting = prospecting; + return this; + } + + /** + * Get prospecting + * @return prospecting + **/ + @javax.annotation.Nullable + + public ProspectingCreateV1 getProspecting() { + return prospecting; + } + + + public void setProspecting(ProspectingCreateV1 prospecting) { + this.prospecting = prospecting; + } + + + public AudienceSegmentCreateEntityV1 contactList(Object contactList) { + + this.contactList = contactList; + return this; + } + + /** + * Settings to target users with your contact lists. + * @return contactList + **/ + @javax.annotation.Nullable + + public Object getContactList() { + return contactList; + } + + + public void setContactList(Object contactList) { + this.contactList = contactList; + } + + + public AudienceSegmentCreateEntityV1 location(LocationCreateV1 location) { + + this.location = location; + return this; + } + + /** + * Get location + * @return location + **/ + @javax.annotation.Nullable + + public LocationCreateV1 getLocation() { + return location; + } + + + public void setLocation(LocationCreateV1 location) { + this.location = location; + } + + + public AudienceSegmentCreateEntityV1 retargeting(RetargetingCreateV1 retargeting) { + + this.retargeting = retargeting; + return this; + } + + /** + * Get retargeting + * @return retargeting + **/ + @javax.annotation.Nullable + + public RetargetingCreateV1 getRetargeting() { + return retargeting; + } + + + public void setRetargeting(RetargetingCreateV1 retargeting) { + this.retargeting = retargeting; + } + + + public AudienceSegmentCreateEntityV1 lookalike(LookalikeCreateV1 lookalike) { + + this.lookalike = lookalike; + return this; + } + + /** + * Get lookalike + * @return lookalike + **/ + @javax.annotation.Nullable + + public LookalikeCreateV1 getLookalike() { + return lookalike; + } + + + public void setLookalike(LookalikeCreateV1 lookalike) { + this.lookalike = lookalike; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentCreateEntityV1 instance itself + */ + public AudienceSegmentCreateEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentCreateEntityV1 audienceSegmentCreateEntityV1 = (AudienceSegmentCreateEntityV1) o; + return Objects.equals(this.name, audienceSegmentCreateEntityV1.name) && + Objects.equals(this.description, audienceSegmentCreateEntityV1.description) && + Objects.equals(this.advertiserId, audienceSegmentCreateEntityV1.advertiserId) && + Objects.equals(this.inMarket, audienceSegmentCreateEntityV1.inMarket) && + Objects.equals(this.prospecting, audienceSegmentCreateEntityV1.prospecting) && + Objects.equals(this.contactList, audienceSegmentCreateEntityV1.contactList) && + Objects.equals(this.location, audienceSegmentCreateEntityV1.location) && + Objects.equals(this.retargeting, audienceSegmentCreateEntityV1.retargeting) && + Objects.equals(this.lookalike, audienceSegmentCreateEntityV1.lookalike)&& + Objects.equals(this.additionalProperties, audienceSegmentCreateEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, advertiserId, inMarket, prospecting, contactList, location, retargeting, lookalike, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentCreateEntityV1 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n"); + sb.append(" inMarket: ").append(toIndentedString(inMarket)).append("\n"); + sb.append(" prospecting: ").append(toIndentedString(prospecting)).append("\n"); + sb.append(" contactList: ").append(toIndentedString(contactList)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" retargeting: ").append(toIndentedString(retargeting)).append("\n"); + sb.append(" lookalike: ").append(toIndentedString(lookalike)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("advertiserId"); + openapiFields.add("inMarket"); + openapiFields.add("prospecting"); + openapiFields.add("contactList"); + openapiFields.add("location"); + openapiFields.add("retargeting"); + openapiFields.add("lookalike"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("advertiserId"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentCreateEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentCreateEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentCreateEntityV1 is not found in the empty JSON string", AudienceSegmentCreateEntityV1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AudienceSegmentCreateEntityV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("advertiserId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("advertiserId").toString())); + } + // validate the optional field `inMarket` + if (jsonObj.get("inMarket") != null && !jsonObj.get("inMarket").isJsonNull()) { + InMarketCreateV1.validateJsonObject(jsonObj.getAsJsonObject("inMarket")); + } + // validate the optional field `prospecting` + if (jsonObj.get("prospecting") != null && !jsonObj.get("prospecting").isJsonNull()) { + ProspectingCreateV1.validateJsonObject(jsonObj.getAsJsonObject("prospecting")); + } + // validate the optional field `location` + if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { + LocationCreateV1.validateJsonObject(jsonObj.getAsJsonObject("location")); + } + // validate the optional field `retargeting` + if (jsonObj.get("retargeting") != null && !jsonObj.get("retargeting").isJsonNull()) { + RetargetingCreateV1.validateJsonObject(jsonObj.getAsJsonObject("retargeting")); + } + // validate the optional field `lookalike` + if (jsonObj.get("lookalike") != null && !jsonObj.get("lookalike").isJsonNull()) { + LookalikeCreateV1.validateJsonObject(jsonObj.getAsJsonObject("lookalike")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentCreateEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentCreateEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentCreateEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentCreateEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentCreateEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentCreateEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentCreateEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentCreateEntityV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentCreateEntityV1 + */ + public static AudienceSegmentCreateEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentCreateEntityV1.class); + } + + /** + * Convert an instance of AudienceSegmentCreateEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentCreateEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentCreateEntityV1Resource.java new file mode 100644 index 00000000..36908c3d --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentCreateEntityV1Resource.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentCreateEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentCreateEntityV1Resource { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceSegmentCreateEntityV1 attributes; + + public AudienceSegmentCreateEntityV1Resource() { + } + + public AudienceSegmentCreateEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public AudienceSegmentCreateEntityV1Resource attributes(AudienceSegmentCreateEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceSegmentCreateEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceSegmentCreateEntityV1 attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentCreateEntityV1Resource instance itself + */ + public AudienceSegmentCreateEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentCreateEntityV1Resource audienceSegmentCreateEntityV1Resource = (AudienceSegmentCreateEntityV1Resource) o; + return Objects.equals(this.type, audienceSegmentCreateEntityV1Resource.type) && + Objects.equals(this.attributes, audienceSegmentCreateEntityV1Resource.attributes)&& + Objects.equals(this.additionalProperties, audienceSegmentCreateEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentCreateEntityV1Resource {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentCreateEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentCreateEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentCreateEntityV1Resource is not found in the empty JSON string", AudienceSegmentCreateEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceSegmentCreateEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentCreateEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentCreateEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentCreateEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentCreateEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentCreateEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentCreateEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentCreateEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentCreateEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentCreateEntityV1Resource + */ + public static AudienceSegmentCreateEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentCreateEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceSegmentCreateEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentDeleteEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentDeleteEntityV1Resource.java new file mode 100644 index 00000000..17dd6604 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentDeleteEntityV1Resource.java @@ -0,0 +1,353 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentDeleteEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private Object attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AudienceSegmentDeleteEntityV1Resource() { + } + + public AudienceSegmentDeleteEntityV1Resource attributes(Object attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Segment to delete + * @return attributes + **/ + @javax.annotation.Nullable + + public Object getAttributes() { + return attributes; + } + + + public void setAttributes(Object attributes) { + this.attributes = attributes; + } + + + public AudienceSegmentDeleteEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AudienceSegmentDeleteEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentDeleteEntityV1Resource instance itself + */ + public AudienceSegmentDeleteEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentDeleteEntityV1Resource audienceSegmentDeleteEntityV1Resource = (AudienceSegmentDeleteEntityV1Resource) o; + return Objects.equals(this.attributes, audienceSegmentDeleteEntityV1Resource.attributes) && + Objects.equals(this.id, audienceSegmentDeleteEntityV1Resource.id) && + Objects.equals(this.type, audienceSegmentDeleteEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, audienceSegmentDeleteEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentDeleteEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentDeleteEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentDeleteEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentDeleteEntityV1Resource is not found in the empty JSON string", AudienceSegmentDeleteEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentDeleteEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentDeleteEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentDeleteEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentDeleteEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentDeleteEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentDeleteEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentDeleteEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentDeleteEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentDeleteEntityV1Resource + */ + public static AudienceSegmentDeleteEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentDeleteEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceSegmentDeleteEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1.java new file mode 100644 index 00000000..fed167bb --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1.java @@ -0,0 +1,744 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.BehavioralV1; +import com.criteo.api.marketingsolutions.v2024_07.model.ContactListV1; +import com.criteo.api.marketingsolutions.v2024_07.model.InMarketV1; +import com.criteo.api.marketingsolutions.v2024_07.model.LocationV1; +import com.criteo.api.marketingsolutions.v2024_07.model.LookalikeV1; +import com.criteo.api.marketingsolutions.v2024_07.model.ProspectingV1; +import com.criteo.api.marketingsolutions.v2024_07.model.RetargetingV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Set of rules that defines specific people to target. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentEntityV1 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + /** + * Type of segment (read-only) + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + UNKNOWN("Unknown"), + + INMARKET("InMarket"), + + PROSPECTING("Prospecting"), + + CONTACTLIST("ContactList"), + + LOCATION("Location"), + + BEHAVIORAL("Behavioral"), + + RETARGETING("Retargeting"), + + LOOKALIKE("Lookalike"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; + + public static final String SERIALIZED_NAME_ADVERTISER_ID = "advertiserId"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_ID) + private String advertiserId; + + public static final String SERIALIZED_NAME_IN_MARKET = "inMarket"; + @SerializedName(SERIALIZED_NAME_IN_MARKET) + private InMarketV1 inMarket; + + public static final String SERIALIZED_NAME_PROSPECTING = "prospecting"; + @SerializedName(SERIALIZED_NAME_PROSPECTING) + private ProspectingV1 prospecting; + + public static final String SERIALIZED_NAME_CONTACT_LIST = "contactList"; + @SerializedName(SERIALIZED_NAME_CONTACT_LIST) + private ContactListV1 contactList; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + private LocationV1 location; + + public static final String SERIALIZED_NAME_BEHAVIORAL = "behavioral"; + @SerializedName(SERIALIZED_NAME_BEHAVIORAL) + private BehavioralV1 behavioral; + + public static final String SERIALIZED_NAME_RETARGETING = "retargeting"; + @SerializedName(SERIALIZED_NAME_RETARGETING) + private RetargetingV1 retargeting; + + public static final String SERIALIZED_NAME_LOOKALIKE = "lookalike"; + @SerializedName(SERIALIZED_NAME_LOOKALIKE) + private LookalikeV1 lookalike; + + public AudienceSegmentEntityV1() { + } + + public AudienceSegmentEntityV1 name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the segment + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public AudienceSegmentEntityV1 description(String description) { + + this.description = description; + return this; + } + + /** + * Description of the segment + * @return description + **/ + @javax.annotation.Nullable + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public AudienceSegmentEntityV1 type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Type of segment (read-only) + * @return type + **/ + @javax.annotation.Nullable + + public TypeEnum getType() { + return type; + } + + + public void setType(TypeEnum type) { + this.type = type; + } + + + public AudienceSegmentEntityV1 createdAt(OffsetDateTime createdAt) { + + this.createdAt = createdAt; + return this; + } + + /** + * ISO-8601 timestamp in UTC of segment creation (read-only) + * @return createdAt + **/ + @javax.annotation.Nullable + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public AudienceSegmentEntityV1 updatedAt(OffsetDateTime updatedAt) { + + this.updatedAt = updatedAt; + return this; + } + + /** + * ISO-8601 timestamp in UTC of segment update (read-only) + * @return updatedAt + **/ + @javax.annotation.Nullable + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public AudienceSegmentEntityV1 advertiserId(String advertiserId) { + + this.advertiserId = advertiserId; + return this; + } + + /** + * Advertiser associated to the segment + * @return advertiserId + **/ + @javax.annotation.Nullable + + public String getAdvertiserId() { + return advertiserId; + } + + + public void setAdvertiserId(String advertiserId) { + this.advertiserId = advertiserId; + } + + + public AudienceSegmentEntityV1 inMarket(InMarketV1 inMarket) { + + this.inMarket = inMarket; + return this; + } + + /** + * Get inMarket + * @return inMarket + **/ + @javax.annotation.Nullable + + public InMarketV1 getInMarket() { + return inMarket; + } + + + public void setInMarket(InMarketV1 inMarket) { + this.inMarket = inMarket; + } + + + public AudienceSegmentEntityV1 prospecting(ProspectingV1 prospecting) { + + this.prospecting = prospecting; + return this; + } + + /** + * Get prospecting + * @return prospecting + **/ + @javax.annotation.Nullable + + public ProspectingV1 getProspecting() { + return prospecting; + } + + + public void setProspecting(ProspectingV1 prospecting) { + this.prospecting = prospecting; + } + + + public AudienceSegmentEntityV1 contactList(ContactListV1 contactList) { + + this.contactList = contactList; + return this; + } + + /** + * Get contactList + * @return contactList + **/ + @javax.annotation.Nullable + + public ContactListV1 getContactList() { + return contactList; + } + + + public void setContactList(ContactListV1 contactList) { + this.contactList = contactList; + } + + + public AudienceSegmentEntityV1 location(LocationV1 location) { + + this.location = location; + return this; + } + + /** + * Get location + * @return location + **/ + @javax.annotation.Nullable + + public LocationV1 getLocation() { + return location; + } + + + public void setLocation(LocationV1 location) { + this.location = location; + } + + + public AudienceSegmentEntityV1 behavioral(BehavioralV1 behavioral) { + + this.behavioral = behavioral; + return this; + } + + /** + * Get behavioral + * @return behavioral + **/ + @javax.annotation.Nullable + + public BehavioralV1 getBehavioral() { + return behavioral; + } + + + public void setBehavioral(BehavioralV1 behavioral) { + this.behavioral = behavioral; + } + + + public AudienceSegmentEntityV1 retargeting(RetargetingV1 retargeting) { + + this.retargeting = retargeting; + return this; + } + + /** + * Get retargeting + * @return retargeting + **/ + @javax.annotation.Nullable + + public RetargetingV1 getRetargeting() { + return retargeting; + } + + + public void setRetargeting(RetargetingV1 retargeting) { + this.retargeting = retargeting; + } + + + public AudienceSegmentEntityV1 lookalike(LookalikeV1 lookalike) { + + this.lookalike = lookalike; + return this; + } + + /** + * Get lookalike + * @return lookalike + **/ + @javax.annotation.Nullable + + public LookalikeV1 getLookalike() { + return lookalike; + } + + + public void setLookalike(LookalikeV1 lookalike) { + this.lookalike = lookalike; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentEntityV1 instance itself + */ + public AudienceSegmentEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentEntityV1 audienceSegmentEntityV1 = (AudienceSegmentEntityV1) o; + return Objects.equals(this.name, audienceSegmentEntityV1.name) && + Objects.equals(this.description, audienceSegmentEntityV1.description) && + Objects.equals(this.type, audienceSegmentEntityV1.type) && + Objects.equals(this.createdAt, audienceSegmentEntityV1.createdAt) && + Objects.equals(this.updatedAt, audienceSegmentEntityV1.updatedAt) && + Objects.equals(this.advertiserId, audienceSegmentEntityV1.advertiserId) && + Objects.equals(this.inMarket, audienceSegmentEntityV1.inMarket) && + Objects.equals(this.prospecting, audienceSegmentEntityV1.prospecting) && + Objects.equals(this.contactList, audienceSegmentEntityV1.contactList) && + Objects.equals(this.location, audienceSegmentEntityV1.location) && + Objects.equals(this.behavioral, audienceSegmentEntityV1.behavioral) && + Objects.equals(this.retargeting, audienceSegmentEntityV1.retargeting) && + Objects.equals(this.lookalike, audienceSegmentEntityV1.lookalike)&& + Objects.equals(this.additionalProperties, audienceSegmentEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, type, createdAt, updatedAt, advertiserId, inMarket, prospecting, contactList, location, behavioral, retargeting, lookalike, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentEntityV1 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n"); + sb.append(" inMarket: ").append(toIndentedString(inMarket)).append("\n"); + sb.append(" prospecting: ").append(toIndentedString(prospecting)).append("\n"); + sb.append(" contactList: ").append(toIndentedString(contactList)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" behavioral: ").append(toIndentedString(behavioral)).append("\n"); + sb.append(" retargeting: ").append(toIndentedString(retargeting)).append("\n"); + sb.append(" lookalike: ").append(toIndentedString(lookalike)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("type"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("advertiserId"); + openapiFields.add("inMarket"); + openapiFields.add("prospecting"); + openapiFields.add("contactList"); + openapiFields.add("location"); + openapiFields.add("behavioral"); + openapiFields.add("retargeting"); + openapiFields.add("lookalike"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentEntityV1 is not found in the empty JSON string", AudienceSegmentEntityV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("advertiserId") != null && !jsonObj.get("advertiserId").isJsonNull()) && !jsonObj.get("advertiserId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("advertiserId").toString())); + } + // validate the optional field `inMarket` + if (jsonObj.get("inMarket") != null && !jsonObj.get("inMarket").isJsonNull()) { + InMarketV1.validateJsonObject(jsonObj.getAsJsonObject("inMarket")); + } + // validate the optional field `prospecting` + if (jsonObj.get("prospecting") != null && !jsonObj.get("prospecting").isJsonNull()) { + ProspectingV1.validateJsonObject(jsonObj.getAsJsonObject("prospecting")); + } + // validate the optional field `contactList` + if (jsonObj.get("contactList") != null && !jsonObj.get("contactList").isJsonNull()) { + ContactListV1.validateJsonObject(jsonObj.getAsJsonObject("contactList")); + } + // validate the optional field `location` + if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { + LocationV1.validateJsonObject(jsonObj.getAsJsonObject("location")); + } + // validate the optional field `behavioral` + if (jsonObj.get("behavioral") != null && !jsonObj.get("behavioral").isJsonNull()) { + BehavioralV1.validateJsonObject(jsonObj.getAsJsonObject("behavioral")); + } + // validate the optional field `retargeting` + if (jsonObj.get("retargeting") != null && !jsonObj.get("retargeting").isJsonNull()) { + RetargetingV1.validateJsonObject(jsonObj.getAsJsonObject("retargeting")); + } + // validate the optional field `lookalike` + if (jsonObj.get("lookalike") != null && !jsonObj.get("lookalike").isJsonNull()) { + LookalikeV1.validateJsonObject(jsonObj.getAsJsonObject("lookalike")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentEntityV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentEntityV1 + */ + public static AudienceSegmentEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentEntityV1.class); + } + + /** + * Convert an instance of AudienceSegmentEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.java new file mode 100644 index 00000000..a6b7c782 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.java @@ -0,0 +1,427 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentEntityV1Resource; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSearchMetadataV1; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several entities and metadata + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse { + public static final String SERIALIZED_NAME_META = "meta"; + @SerializedName(SERIALIZED_NAME_META) + private AudienceSegmentSearchMetadataV1 meta; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse() { + } + + + public AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse meta(AudienceSegmentSearchMetadataV1 meta) { + + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + + public AudienceSegmentSearchMetadataV1 getMeta() { + return meta; + } + + + public void setMeta(AudienceSegmentSearchMetadataV1 meta) { + this.meta = meta; + } + + + public AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse data(List data) { + + this.data = data; + return this; + } + + public AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse addDataItem(AudienceSegmentEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse instance itself + */ + public AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse audienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse = (AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse) o; + return Objects.equals(this.meta, audienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.meta) && + Objects.equals(this.data, audienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.data) && + Objects.equals(this.warnings, audienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.warnings) && + Objects.equals(this.errors, audienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.errors)&& + Objects.equals(this.additionalProperties, audienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(meta, data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse {\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("meta"); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse is not found in the empty JSON string", AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.openapiRequiredFields.toString())); + } + } + // validate the optional field `meta` + if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { + AudienceSegmentSearchMetadataV1.validateJsonObject(jsonObj.getAsJsonObject("meta")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceSegmentEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse + */ + public static AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse.class); + } + + /** + * Convert an instance of AudienceSegmentEntityV1AudienceSegmentSearchMetadataV1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1ListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1ListResponse.java new file mode 100644 index 00000000..1b6b4e2a --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1ListResponse.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentEntityV1Resource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several entities + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentEntityV1ListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public AudienceSegmentEntityV1ListResponse() { + } + + + public AudienceSegmentEntityV1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public AudienceSegmentEntityV1ListResponse data(List data) { + + this.data = data; + return this; + } + + public AudienceSegmentEntityV1ListResponse addDataItem(AudienceSegmentEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentEntityV1ListResponse instance itself + */ + public AudienceSegmentEntityV1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentEntityV1ListResponse audienceSegmentEntityV1ListResponse = (AudienceSegmentEntityV1ListResponse) o; + return Objects.equals(this.data, audienceSegmentEntityV1ListResponse.data) && + Objects.equals(this.warnings, audienceSegmentEntityV1ListResponse.warnings) && + Objects.equals(this.errors, audienceSegmentEntityV1ListResponse.errors)&& + Objects.equals(this.additionalProperties, audienceSegmentEntityV1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentEntityV1ListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentEntityV1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentEntityV1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentEntityV1ListResponse is not found in the empty JSON string", AudienceSegmentEntityV1ListResponse.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceSegmentEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentEntityV1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentEntityV1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentEntityV1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentEntityV1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentEntityV1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentEntityV1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentEntityV1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentEntityV1ListResponse + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentEntityV1ListResponse + */ + public static AudienceSegmentEntityV1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentEntityV1ListResponse.class); + } + + /** + * Convert an instance of AudienceSegmentEntityV1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1Resource.java new file mode 100644 index 00000000..a373b989 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEntityV1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceSegmentEntityV1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AudienceSegmentEntityV1Resource() { + } + + public AudienceSegmentEntityV1Resource attributes(AudienceSegmentEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceSegmentEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceSegmentEntityV1 attributes) { + this.attributes = attributes; + } + + + public AudienceSegmentEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AudienceSegmentEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentEntityV1Resource instance itself + */ + public AudienceSegmentEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentEntityV1Resource audienceSegmentEntityV1Resource = (AudienceSegmentEntityV1Resource) o; + return Objects.equals(this.attributes, audienceSegmentEntityV1Resource.attributes) && + Objects.equals(this.id, audienceSegmentEntityV1Resource.id) && + Objects.equals(this.type, audienceSegmentEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, audienceSegmentEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentEntityV1Resource is not found in the empty JSON string", AudienceSegmentEntityV1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceSegmentEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentEntityV1Resource + */ + public static AudienceSegmentEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceSegmentEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEstimateSizeInputV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEstimateSizeInputV1.java new file mode 100644 index 00000000..961c7312 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentEstimateSizeInputV1.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEstimationEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Input to estimate the size of an audience segment.. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentEstimateSizeInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private AudienceSegmentSizeEstimationEntityV1Resource data; + + public AudienceSegmentEstimateSizeInputV1() { + } + + public AudienceSegmentEstimateSizeInputV1 data(AudienceSegmentSizeEstimationEntityV1Resource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public AudienceSegmentSizeEstimationEntityV1Resource getData() { + return data; + } + + + public void setData(AudienceSegmentSizeEstimationEntityV1Resource data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentEstimateSizeInputV1 instance itself + */ + public AudienceSegmentEstimateSizeInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentEstimateSizeInputV1 audienceSegmentEstimateSizeInputV1 = (AudienceSegmentEstimateSizeInputV1) o; + return Objects.equals(this.data, audienceSegmentEstimateSizeInputV1.data)&& + Objects.equals(this.additionalProperties, audienceSegmentEstimateSizeInputV1.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentEstimateSizeInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentEstimateSizeInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentEstimateSizeInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentEstimateSizeInputV1 is not found in the empty JSON string", AudienceSegmentEstimateSizeInputV1.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + AudienceSegmentSizeEstimationEntityV1Resource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentEstimateSizeInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentEstimateSizeInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentEstimateSizeInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentEstimateSizeInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentEstimateSizeInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentEstimateSizeInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentEstimateSizeInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentEstimateSizeInputV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentEstimateSizeInputV1 + */ + public static AudienceSegmentEstimateSizeInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentEstimateSizeInputV1.class); + } + + /** + * Convert an instance of AudienceSegmentEstimateSizeInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentIdEntityV1ListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentIdEntityV1ListResponse.java new file mode 100644 index 00000000..2d3b5c3c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentIdEntityV1ListResponse.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentIdEntityV1Resource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several entities + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentIdEntityV1ListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public AudienceSegmentIdEntityV1ListResponse() { + } + + + public AudienceSegmentIdEntityV1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public AudienceSegmentIdEntityV1ListResponse data(List data) { + + this.data = data; + return this; + } + + public AudienceSegmentIdEntityV1ListResponse addDataItem(AudienceSegmentIdEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentIdEntityV1ListResponse instance itself + */ + public AudienceSegmentIdEntityV1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentIdEntityV1ListResponse audienceSegmentIdEntityV1ListResponse = (AudienceSegmentIdEntityV1ListResponse) o; + return Objects.equals(this.data, audienceSegmentIdEntityV1ListResponse.data) && + Objects.equals(this.warnings, audienceSegmentIdEntityV1ListResponse.warnings) && + Objects.equals(this.errors, audienceSegmentIdEntityV1ListResponse.errors)&& + Objects.equals(this.additionalProperties, audienceSegmentIdEntityV1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentIdEntityV1ListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentIdEntityV1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentIdEntityV1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentIdEntityV1ListResponse is not found in the empty JSON string", AudienceSegmentIdEntityV1ListResponse.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceSegmentIdEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentIdEntityV1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentIdEntityV1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentIdEntityV1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentIdEntityV1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentIdEntityV1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentIdEntityV1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentIdEntityV1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentIdEntityV1ListResponse + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentIdEntityV1ListResponse + */ + public static AudienceSegmentIdEntityV1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentIdEntityV1ListResponse.class); + } + + /** + * Convert an instance of AudienceSegmentIdEntityV1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentIdEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentIdEntityV1Resource.java new file mode 100644 index 00000000..ff1b8a72 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentIdEntityV1Resource.java @@ -0,0 +1,353 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentIdEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private Object attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AudienceSegmentIdEntityV1Resource() { + } + + public AudienceSegmentIdEntityV1Resource attributes(Object attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Audience Segment entity only with its ID + * @return attributes + **/ + @javax.annotation.Nullable + + public Object getAttributes() { + return attributes; + } + + + public void setAttributes(Object attributes) { + this.attributes = attributes; + } + + + public AudienceSegmentIdEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AudienceSegmentIdEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentIdEntityV1Resource instance itself + */ + public AudienceSegmentIdEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentIdEntityV1Resource audienceSegmentIdEntityV1Resource = (AudienceSegmentIdEntityV1Resource) o; + return Objects.equals(this.attributes, audienceSegmentIdEntityV1Resource.attributes) && + Objects.equals(this.id, audienceSegmentIdEntityV1Resource.id) && + Objects.equals(this.type, audienceSegmentIdEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, audienceSegmentIdEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentIdEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentIdEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentIdEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentIdEntityV1Resource is not found in the empty JSON string", AudienceSegmentIdEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentIdEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentIdEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentIdEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentIdEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentIdEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentIdEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentIdEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentIdEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentIdEntityV1Resource + */ + public static AudienceSegmentIdEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentIdEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceSegmentIdEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchEntityV1.java new file mode 100644 index 00000000..38036396 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchEntityV1.java @@ -0,0 +1,444 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Available filters to perform a search on audience segments. If present, the filters are AND'ed together when applied. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentSearchEntityV1 { + public static final String SERIALIZED_NAME_AUDIENCE_SEGMENT_IDS = "audienceSegmentIds"; + @SerializedName(SERIALIZED_NAME_AUDIENCE_SEGMENT_IDS) + private List audienceSegmentIds = null; + + public static final String SERIALIZED_NAME_ADVERTISER_IDS = "advertiserIds"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_IDS) + private List advertiserIds = null; + + /** + * Gets or Sets audienceSegmentTypes + */ + @JsonAdapter(AudienceSegmentTypesEnum.Adapter.class) + public enum AudienceSegmentTypesEnum { + UNKNOWN("Unknown"), + + INMARKET("InMarket"), + + PROSPECTING("Prospecting"), + + CONTACTLIST("ContactList"), + + LOCATION("Location"), + + BEHAVIORAL("Behavioral"), + + RETARGETING("Retargeting"), + + LOOKALIKE("Lookalike"); + + private String value; + + AudienceSegmentTypesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AudienceSegmentTypesEnum fromValue(String value) { + for (AudienceSegmentTypesEnum b : AudienceSegmentTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AudienceSegmentTypesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AudienceSegmentTypesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AudienceSegmentTypesEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_AUDIENCE_SEGMENT_TYPES = "audienceSegmentTypes"; + @SerializedName(SERIALIZED_NAME_AUDIENCE_SEGMENT_TYPES) + private List audienceSegmentTypes = null; + + public AudienceSegmentSearchEntityV1() { + } + + public AudienceSegmentSearchEntityV1 audienceSegmentIds(List audienceSegmentIds) { + + this.audienceSegmentIds = audienceSegmentIds; + return this; + } + + public AudienceSegmentSearchEntityV1 addAudienceSegmentIdsItem(String audienceSegmentIdsItem) { + if (this.audienceSegmentIds == null) { + this.audienceSegmentIds = null; + } + this.audienceSegmentIds.add(audienceSegmentIdsItem); + return this; + } + + /** + * List of segment ids + * @return audienceSegmentIds + **/ + @javax.annotation.Nullable + + public List getAudienceSegmentIds() { + return audienceSegmentIds; + } + + + public void setAudienceSegmentIds(List audienceSegmentIds) { + this.audienceSegmentIds = audienceSegmentIds; + } + + + public AudienceSegmentSearchEntityV1 advertiserIds(List advertiserIds) { + + this.advertiserIds = advertiserIds; + return this; + } + + public AudienceSegmentSearchEntityV1 addAdvertiserIdsItem(String advertiserIdsItem) { + if (this.advertiserIds == null) { + this.advertiserIds = null; + } + this.advertiserIds.add(advertiserIdsItem); + return this; + } + + /** + * List of advertiser ids + * @return advertiserIds + **/ + @javax.annotation.Nullable + + public List getAdvertiserIds() { + return advertiserIds; + } + + + public void setAdvertiserIds(List advertiserIds) { + this.advertiserIds = advertiserIds; + } + + + public AudienceSegmentSearchEntityV1 audienceSegmentTypes(List audienceSegmentTypes) { + + this.audienceSegmentTypes = audienceSegmentTypes; + return this; + } + + public AudienceSegmentSearchEntityV1 addAudienceSegmentTypesItem(AudienceSegmentTypesEnum audienceSegmentTypesItem) { + if (this.audienceSegmentTypes == null) { + this.audienceSegmentTypes = null; + } + this.audienceSegmentTypes.add(audienceSegmentTypesItem); + return this; + } + + /** + * List of segment types + * @return audienceSegmentTypes + **/ + @javax.annotation.Nullable + + public List getAudienceSegmentTypes() { + return audienceSegmentTypes; + } + + + public void setAudienceSegmentTypes(List audienceSegmentTypes) { + this.audienceSegmentTypes = audienceSegmentTypes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentSearchEntityV1 instance itself + */ + public AudienceSegmentSearchEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentSearchEntityV1 audienceSegmentSearchEntityV1 = (AudienceSegmentSearchEntityV1) o; + return Objects.equals(this.audienceSegmentIds, audienceSegmentSearchEntityV1.audienceSegmentIds) && + Objects.equals(this.advertiserIds, audienceSegmentSearchEntityV1.advertiserIds) && + Objects.equals(this.audienceSegmentTypes, audienceSegmentSearchEntityV1.audienceSegmentTypes)&& + Objects.equals(this.additionalProperties, audienceSegmentSearchEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(audienceSegmentIds, advertiserIds, audienceSegmentTypes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentSearchEntityV1 {\n"); + sb.append(" audienceSegmentIds: ").append(toIndentedString(audienceSegmentIds)).append("\n"); + sb.append(" advertiserIds: ").append(toIndentedString(advertiserIds)).append("\n"); + sb.append(" audienceSegmentTypes: ").append(toIndentedString(audienceSegmentTypes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("audienceSegmentIds"); + openapiFields.add("advertiserIds"); + openapiFields.add("audienceSegmentTypes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentSearchEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentSearchEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentSearchEntityV1 is not found in the empty JSON string", AudienceSegmentSearchEntityV1.openapiRequiredFields.toString())); + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("audienceSegmentIds") != null && !jsonObj.get("audienceSegmentIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `audienceSegmentIds` to be an array in the JSON string but got `%s`", jsonObj.get("audienceSegmentIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("advertiserIds") != null && !jsonObj.get("advertiserIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserIds` to be an array in the JSON string but got `%s`", jsonObj.get("advertiserIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("audienceSegmentTypes") != null && !jsonObj.get("audienceSegmentTypes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `audienceSegmentTypes` to be an array in the JSON string but got `%s`", jsonObj.get("audienceSegmentTypes").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentSearchEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentSearchEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentSearchEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentSearchEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentSearchEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentSearchEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentSearchEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentSearchEntityV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentSearchEntityV1 + */ + public static AudienceSegmentSearchEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentSearchEntityV1.class); + } + + /** + * Convert an instance of AudienceSegmentSearchEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchEntityV1Resource.java new file mode 100644 index 00000000..3046904c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchEntityV1Resource.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSearchEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentSearchEntityV1Resource { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceSegmentSearchEntityV1 attributes; + + public AudienceSegmentSearchEntityV1Resource() { + } + + public AudienceSegmentSearchEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public AudienceSegmentSearchEntityV1Resource attributes(AudienceSegmentSearchEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceSegmentSearchEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceSegmentSearchEntityV1 attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentSearchEntityV1Resource instance itself + */ + public AudienceSegmentSearchEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentSearchEntityV1Resource audienceSegmentSearchEntityV1Resource = (AudienceSegmentSearchEntityV1Resource) o; + return Objects.equals(this.type, audienceSegmentSearchEntityV1Resource.type) && + Objects.equals(this.attributes, audienceSegmentSearchEntityV1Resource.attributes)&& + Objects.equals(this.additionalProperties, audienceSegmentSearchEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentSearchEntityV1Resource {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentSearchEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentSearchEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentSearchEntityV1Resource is not found in the empty JSON string", AudienceSegmentSearchEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceSegmentSearchEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentSearchEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentSearchEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentSearchEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentSearchEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentSearchEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentSearchEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentSearchEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentSearchEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentSearchEntityV1Resource + */ + public static AudienceSegmentSearchEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentSearchEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceSegmentSearchEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchInputV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchInputV1.java new file mode 100644 index 00000000..c8182660 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchInputV1.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSearchEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Audience segment search parameter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentSearchInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private AudienceSegmentSearchEntityV1Resource data; + + public AudienceSegmentSearchInputV1() { + } + + public AudienceSegmentSearchInputV1 data(AudienceSegmentSearchEntityV1Resource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public AudienceSegmentSearchEntityV1Resource getData() { + return data; + } + + + public void setData(AudienceSegmentSearchEntityV1Resource data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentSearchInputV1 instance itself + */ + public AudienceSegmentSearchInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentSearchInputV1 audienceSegmentSearchInputV1 = (AudienceSegmentSearchInputV1) o; + return Objects.equals(this.data, audienceSegmentSearchInputV1.data)&& + Objects.equals(this.additionalProperties, audienceSegmentSearchInputV1.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentSearchInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentSearchInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentSearchInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentSearchInputV1 is not found in the empty JSON string", AudienceSegmentSearchInputV1.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + AudienceSegmentSearchEntityV1Resource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentSearchInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentSearchInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentSearchInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentSearchInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentSearchInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentSearchInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentSearchInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentSearchInputV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentSearchInputV1 + */ + public static AudienceSegmentSearchInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentSearchInputV1.class); + } + + /** + * Convert an instance of AudienceSegmentSearchInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchMetadataV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchMetadataV1.java new file mode 100644 index 00000000..13b1688b --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSearchMetadataV1.java @@ -0,0 +1,347 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Metadata for the audience segment search response. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentSearchMetadataV1 { + public static final String SERIALIZED_NAME_TOTAL_ITEMS = "totalItems"; + @SerializedName(SERIALIZED_NAME_TOTAL_ITEMS) + private Integer totalItems; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + @SerializedName(SERIALIZED_NAME_LIMIT) + private Integer limit; + + public static final String SERIALIZED_NAME_OFFSET = "offset"; + @SerializedName(SERIALIZED_NAME_OFFSET) + private Integer offset; + + public AudienceSegmentSearchMetadataV1() { + } + + public AudienceSegmentSearchMetadataV1 totalItems(Integer totalItems) { + + this.totalItems = totalItems; + return this; + } + + /** + * Total number of items + * @return totalItems + **/ + @javax.annotation.Nullable + + public Integer getTotalItems() { + return totalItems; + } + + + public void setTotalItems(Integer totalItems) { + this.totalItems = totalItems; + } + + + public AudienceSegmentSearchMetadataV1 limit(Integer limit) { + + this.limit = limit; + return this; + } + + /** + * Max item of the current page + * @return limit + **/ + @javax.annotation.Nullable + + public Integer getLimit() { + return limit; + } + + + public void setLimit(Integer limit) { + this.limit = limit; + } + + + public AudienceSegmentSearchMetadataV1 offset(Integer offset) { + + this.offset = offset; + return this; + } + + /** + * Number of item to skip + * @return offset + **/ + @javax.annotation.Nullable + + public Integer getOffset() { + return offset; + } + + + public void setOffset(Integer offset) { + this.offset = offset; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentSearchMetadataV1 instance itself + */ + public AudienceSegmentSearchMetadataV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentSearchMetadataV1 audienceSegmentSearchMetadataV1 = (AudienceSegmentSearchMetadataV1) o; + return Objects.equals(this.totalItems, audienceSegmentSearchMetadataV1.totalItems) && + Objects.equals(this.limit, audienceSegmentSearchMetadataV1.limit) && + Objects.equals(this.offset, audienceSegmentSearchMetadataV1.offset)&& + Objects.equals(this.additionalProperties, audienceSegmentSearchMetadataV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(totalItems, limit, offset, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentSearchMetadataV1 {\n"); + sb.append(" totalItems: ").append(toIndentedString(totalItems)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("totalItems"); + openapiFields.add("limit"); + openapiFields.add("offset"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentSearchMetadataV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentSearchMetadataV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentSearchMetadataV1 is not found in the empty JSON string", AudienceSegmentSearchMetadataV1.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentSearchMetadataV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentSearchMetadataV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentSearchMetadataV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentSearchMetadataV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentSearchMetadataV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentSearchMetadataV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentSearchMetadataV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentSearchMetadataV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentSearchMetadataV1 + */ + public static AudienceSegmentSearchMetadataV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentSearchMetadataV1.class); + } + + /** + * Convert an instance of AudienceSegmentSearchMetadataV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1.java new file mode 100644 index 00000000..02ddc97a --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1.java @@ -0,0 +1,289 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Set of rules that defines specific people to target. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentSizeEntityV1 { + public static final String SERIALIZED_NAME_SIZE = "size"; + @SerializedName(SERIALIZED_NAME_SIZE) + private Long size; + + public AudienceSegmentSizeEntityV1() { + } + + public AudienceSegmentSizeEntityV1 size(Long size) { + + this.size = size; + return this; + } + + /** + * Get size + * @return size + **/ + @javax.annotation.Nullable + + public Long getSize() { + return size; + } + + + public void setSize(Long size) { + this.size = size; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentSizeEntityV1 instance itself + */ + public AudienceSegmentSizeEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentSizeEntityV1 audienceSegmentSizeEntityV1 = (AudienceSegmentSizeEntityV1) o; + return Objects.equals(this.size, audienceSegmentSizeEntityV1.size)&& + Objects.equals(this.additionalProperties, audienceSegmentSizeEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(size, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentSizeEntityV1 {\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("size"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentSizeEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentSizeEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentSizeEntityV1 is not found in the empty JSON string", AudienceSegmentSizeEntityV1.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentSizeEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentSizeEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentSizeEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentSizeEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentSizeEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentSizeEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentSizeEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentSizeEntityV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentSizeEntityV1 + */ + public static AudienceSegmentSizeEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentSizeEntityV1.class); + } + + /** + * Convert an instance of AudienceSegmentSizeEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1ListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1ListResponse.java new file mode 100644 index 00000000..693b1476 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1ListResponse.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEntityV1Resource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several entities + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentSizeEntityV1ListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public AudienceSegmentSizeEntityV1ListResponse() { + } + + + public AudienceSegmentSizeEntityV1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public AudienceSegmentSizeEntityV1ListResponse data(List data) { + + this.data = data; + return this; + } + + public AudienceSegmentSizeEntityV1ListResponse addDataItem(AudienceSegmentSizeEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentSizeEntityV1ListResponse instance itself + */ + public AudienceSegmentSizeEntityV1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentSizeEntityV1ListResponse audienceSegmentSizeEntityV1ListResponse = (AudienceSegmentSizeEntityV1ListResponse) o; + return Objects.equals(this.data, audienceSegmentSizeEntityV1ListResponse.data) && + Objects.equals(this.warnings, audienceSegmentSizeEntityV1ListResponse.warnings) && + Objects.equals(this.errors, audienceSegmentSizeEntityV1ListResponse.errors)&& + Objects.equals(this.additionalProperties, audienceSegmentSizeEntityV1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentSizeEntityV1ListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentSizeEntityV1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentSizeEntityV1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentSizeEntityV1ListResponse is not found in the empty JSON string", AudienceSegmentSizeEntityV1ListResponse.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceSegmentSizeEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentSizeEntityV1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentSizeEntityV1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentSizeEntityV1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentSizeEntityV1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentSizeEntityV1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentSizeEntityV1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentSizeEntityV1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentSizeEntityV1ListResponse + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentSizeEntityV1ListResponse + */ + public static AudienceSegmentSizeEntityV1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentSizeEntityV1ListResponse.class); + } + + /** + * Convert an instance of AudienceSegmentSizeEntityV1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1Resource.java new file mode 100644 index 00000000..7d9b15a4 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEntityV1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentSizeEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceSegmentSizeEntityV1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AudienceSegmentSizeEntityV1Resource() { + } + + public AudienceSegmentSizeEntityV1Resource attributes(AudienceSegmentSizeEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceSegmentSizeEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceSegmentSizeEntityV1 attributes) { + this.attributes = attributes; + } + + + public AudienceSegmentSizeEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AudienceSegmentSizeEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentSizeEntityV1Resource instance itself + */ + public AudienceSegmentSizeEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentSizeEntityV1Resource audienceSegmentSizeEntityV1Resource = (AudienceSegmentSizeEntityV1Resource) o; + return Objects.equals(this.attributes, audienceSegmentSizeEntityV1Resource.attributes) && + Objects.equals(this.id, audienceSegmentSizeEntityV1Resource.id) && + Objects.equals(this.type, audienceSegmentSizeEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, audienceSegmentSizeEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentSizeEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentSizeEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentSizeEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentSizeEntityV1Resource is not found in the empty JSON string", AudienceSegmentSizeEntityV1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceSegmentSizeEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentSizeEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentSizeEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentSizeEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentSizeEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentSizeEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentSizeEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentSizeEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentSizeEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentSizeEntityV1Resource + */ + public static AudienceSegmentSizeEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentSizeEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceSegmentSizeEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationEntityV1.java new file mode 100644 index 00000000..c43f7a7a --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationEntityV1.java @@ -0,0 +1,356 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.InMarketSizeEstimationV1; +import com.criteo.api.marketingsolutions.v2024_07.model.LocationSizeEstimationV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Set of rules that defines specific people to target. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentSizeEstimationEntityV1 { + public static final String SERIALIZED_NAME_ADVERTISER_ID = "advertiserId"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_ID) + private String advertiserId; + + public static final String SERIALIZED_NAME_IN_MARKET = "inMarket"; + @SerializedName(SERIALIZED_NAME_IN_MARKET) + private InMarketSizeEstimationV1 inMarket; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + private LocationSizeEstimationV1 location; + + public AudienceSegmentSizeEstimationEntityV1() { + } + + public AudienceSegmentSizeEstimationEntityV1 advertiserId(String advertiserId) { + + this.advertiserId = advertiserId; + return this; + } + + /** + * Advertiser associated to the segment + * @return advertiserId + **/ + @javax.annotation.Nonnull + + public String getAdvertiserId() { + return advertiserId; + } + + + public void setAdvertiserId(String advertiserId) { + this.advertiserId = advertiserId; + } + + + public AudienceSegmentSizeEstimationEntityV1 inMarket(InMarketSizeEstimationV1 inMarket) { + + this.inMarket = inMarket; + return this; + } + + /** + * Get inMarket + * @return inMarket + **/ + @javax.annotation.Nullable + + public InMarketSizeEstimationV1 getInMarket() { + return inMarket; + } + + + public void setInMarket(InMarketSizeEstimationV1 inMarket) { + this.inMarket = inMarket; + } + + + public AudienceSegmentSizeEstimationEntityV1 location(LocationSizeEstimationV1 location) { + + this.location = location; + return this; + } + + /** + * Get location + * @return location + **/ + @javax.annotation.Nullable + + public LocationSizeEstimationV1 getLocation() { + return location; + } + + + public void setLocation(LocationSizeEstimationV1 location) { + this.location = location; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentSizeEstimationEntityV1 instance itself + */ + public AudienceSegmentSizeEstimationEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentSizeEstimationEntityV1 audienceSegmentSizeEstimationEntityV1 = (AudienceSegmentSizeEstimationEntityV1) o; + return Objects.equals(this.advertiserId, audienceSegmentSizeEstimationEntityV1.advertiserId) && + Objects.equals(this.inMarket, audienceSegmentSizeEstimationEntityV1.inMarket) && + Objects.equals(this.location, audienceSegmentSizeEstimationEntityV1.location)&& + Objects.equals(this.additionalProperties, audienceSegmentSizeEstimationEntityV1.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(advertiserId, inMarket, location, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentSizeEstimationEntityV1 {\n"); + sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n"); + sb.append(" inMarket: ").append(toIndentedString(inMarket)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("advertiserId"); + openapiFields.add("inMarket"); + openapiFields.add("location"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("advertiserId"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentSizeEstimationEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentSizeEstimationEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentSizeEstimationEntityV1 is not found in the empty JSON string", AudienceSegmentSizeEstimationEntityV1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AudienceSegmentSizeEstimationEntityV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("advertiserId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("advertiserId").toString())); + } + // validate the optional field `inMarket` + if (jsonObj.get("inMarket") != null && !jsonObj.get("inMarket").isJsonNull()) { + InMarketSizeEstimationV1.validateJsonObject(jsonObj.getAsJsonObject("inMarket")); + } + // validate the optional field `location` + if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { + LocationSizeEstimationV1.validateJsonObject(jsonObj.getAsJsonObject("location")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentSizeEstimationEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentSizeEstimationEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentSizeEstimationEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentSizeEstimationEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentSizeEstimationEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentSizeEstimationEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentSizeEstimationEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentSizeEstimationEntityV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentSizeEstimationEntityV1 + */ + public static AudienceSegmentSizeEstimationEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentSizeEstimationEntityV1.class); + } + + /** + * Convert an instance of AudienceSegmentSizeEstimationEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationEntityV1Resource.java new file mode 100644 index 00000000..3a0c8b78 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationEntityV1Resource.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEstimationEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentSizeEstimationEntityV1Resource { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceSegmentSizeEstimationEntityV1 attributes; + + public AudienceSegmentSizeEstimationEntityV1Resource() { + } + + public AudienceSegmentSizeEstimationEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public AudienceSegmentSizeEstimationEntityV1Resource attributes(AudienceSegmentSizeEstimationEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceSegmentSizeEstimationEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceSegmentSizeEstimationEntityV1 attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentSizeEstimationEntityV1Resource instance itself + */ + public AudienceSegmentSizeEstimationEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentSizeEstimationEntityV1Resource audienceSegmentSizeEstimationEntityV1Resource = (AudienceSegmentSizeEstimationEntityV1Resource) o; + return Objects.equals(this.type, audienceSegmentSizeEstimationEntityV1Resource.type) && + Objects.equals(this.attributes, audienceSegmentSizeEstimationEntityV1Resource.attributes)&& + Objects.equals(this.additionalProperties, audienceSegmentSizeEstimationEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentSizeEstimationEntityV1Resource {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentSizeEstimationEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentSizeEstimationEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentSizeEstimationEntityV1Resource is not found in the empty JSON string", AudienceSegmentSizeEstimationEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceSegmentSizeEstimationEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentSizeEstimationEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentSizeEstimationEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentSizeEstimationEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentSizeEstimationEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentSizeEstimationEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentSizeEstimationEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentSizeEstimationEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentSizeEstimationEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentSizeEstimationEntityV1Resource + */ + public static AudienceSegmentSizeEstimationEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentSizeEstimationEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceSegmentSizeEstimationEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1.java new file mode 100644 index 00000000..863aa243 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1.java @@ -0,0 +1,289 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Segment size estimation + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentSizeEstimationV1 { + public static final String SERIALIZED_NAME_SIZE = "size"; + @SerializedName(SERIALIZED_NAME_SIZE) + private Long size; + + public AudienceSegmentSizeEstimationV1() { + } + + public AudienceSegmentSizeEstimationV1 size(Long size) { + + this.size = size; + return this; + } + + /** + * Get size + * @return size + **/ + @javax.annotation.Nullable + + public Long getSize() { + return size; + } + + + public void setSize(Long size) { + this.size = size; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentSizeEstimationV1 instance itself + */ + public AudienceSegmentSizeEstimationV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentSizeEstimationV1 audienceSegmentSizeEstimationV1 = (AudienceSegmentSizeEstimationV1) o; + return Objects.equals(this.size, audienceSegmentSizeEstimationV1.size)&& + Objects.equals(this.additionalProperties, audienceSegmentSizeEstimationV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(size, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentSizeEstimationV1 {\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("size"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentSizeEstimationV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentSizeEstimationV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentSizeEstimationV1 is not found in the empty JSON string", AudienceSegmentSizeEstimationV1.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentSizeEstimationV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentSizeEstimationV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentSizeEstimationV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentSizeEstimationV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentSizeEstimationV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentSizeEstimationV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentSizeEstimationV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentSizeEstimationV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentSizeEstimationV1 + */ + public static AudienceSegmentSizeEstimationV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentSizeEstimationV1.class); + } + + /** + * Convert an instance of AudienceSegmentSizeEstimationV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1Resource.java new file mode 100644 index 00000000..ad51bd78 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1Resource.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEstimationV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentSizeEstimationV1Resource { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceSegmentSizeEstimationV1 attributes; + + public AudienceSegmentSizeEstimationV1Resource() { + } + + public AudienceSegmentSizeEstimationV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public AudienceSegmentSizeEstimationV1Resource attributes(AudienceSegmentSizeEstimationV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceSegmentSizeEstimationV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceSegmentSizeEstimationV1 attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentSizeEstimationV1Resource instance itself + */ + public AudienceSegmentSizeEstimationV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentSizeEstimationV1Resource audienceSegmentSizeEstimationV1Resource = (AudienceSegmentSizeEstimationV1Resource) o; + return Objects.equals(this.type, audienceSegmentSizeEstimationV1Resource.type) && + Objects.equals(this.attributes, audienceSegmentSizeEstimationV1Resource.attributes)&& + Objects.equals(this.additionalProperties, audienceSegmentSizeEstimationV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentSizeEstimationV1Resource {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentSizeEstimationV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentSizeEstimationV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentSizeEstimationV1Resource is not found in the empty JSON string", AudienceSegmentSizeEstimationV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceSegmentSizeEstimationV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentSizeEstimationV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentSizeEstimationV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentSizeEstimationV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentSizeEstimationV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentSizeEstimationV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentSizeEstimationV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentSizeEstimationV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentSizeEstimationV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentSizeEstimationV1Resource + */ + public static AudienceSegmentSizeEstimationV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentSizeEstimationV1Resource.class); + } + + /** + * Convert an instance of AudienceSegmentSizeEstimationV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1Response.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1Response.java new file mode 100644 index 00000000..369485ab --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentSizeEstimationV1Response.java @@ -0,0 +1,375 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentSizeEstimationV1Resource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentSizeEstimationV1Response { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private AudienceSegmentSizeEstimationV1Resource data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public AudienceSegmentSizeEstimationV1Response() { + } + + + public AudienceSegmentSizeEstimationV1Response( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public AudienceSegmentSizeEstimationV1Response data(AudienceSegmentSizeEstimationV1Resource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public AudienceSegmentSizeEstimationV1Resource getData() { + return data; + } + + + public void setData(AudienceSegmentSizeEstimationV1Resource data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentSizeEstimationV1Response instance itself + */ + public AudienceSegmentSizeEstimationV1Response putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentSizeEstimationV1Response audienceSegmentSizeEstimationV1Response = (AudienceSegmentSizeEstimationV1Response) o; + return Objects.equals(this.data, audienceSegmentSizeEstimationV1Response.data) && + Objects.equals(this.warnings, audienceSegmentSizeEstimationV1Response.warnings) && + Objects.equals(this.errors, audienceSegmentSizeEstimationV1Response.errors)&& + Objects.equals(this.additionalProperties, audienceSegmentSizeEstimationV1Response.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentSizeEstimationV1Response {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentSizeEstimationV1Response + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentSizeEstimationV1Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentSizeEstimationV1Response is not found in the empty JSON string", AudienceSegmentSizeEstimationV1Response.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + AudienceSegmentSizeEstimationV1Resource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentSizeEstimationV1Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentSizeEstimationV1Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentSizeEstimationV1Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentSizeEstimationV1Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentSizeEstimationV1Response read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentSizeEstimationV1Response instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentSizeEstimationV1Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentSizeEstimationV1Response + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentSizeEstimationV1Response + */ + public static AudienceSegmentSizeEstimationV1Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentSizeEstimationV1Response.class); + } + + /** + * Convert an instance of AudienceSegmentSizeEstimationV1Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentUpdateEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentUpdateEntityV1.java new file mode 100644 index 00000000..b329351b --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentUpdateEntityV1.java @@ -0,0 +1,496 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.InMarketUpdateV1; +import com.criteo.api.marketingsolutions.v2024_07.model.LocationUpdateV1; +import com.criteo.api.marketingsolutions.v2024_07.model.LookalikeUpdateV1; +import com.criteo.api.marketingsolutions.v2024_07.model.NillableString; +import com.criteo.api.marketingsolutions.v2024_07.model.ProspectingUpdateV1; +import com.criteo.api.marketingsolutions.v2024_07.model.RetargetingUpdateV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Set of rules that defines specific people to target. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentUpdateEntityV1 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private NillableString description; + + public static final String SERIALIZED_NAME_IN_MARKET = "inMarket"; + @SerializedName(SERIALIZED_NAME_IN_MARKET) + private InMarketUpdateV1 inMarket; + + public static final String SERIALIZED_NAME_LOCATION = "location"; + @SerializedName(SERIALIZED_NAME_LOCATION) + private LocationUpdateV1 location; + + public static final String SERIALIZED_NAME_RETARGETING = "retargeting"; + @SerializedName(SERIALIZED_NAME_RETARGETING) + private RetargetingUpdateV1 retargeting; + + public static final String SERIALIZED_NAME_LOOKALIKE = "lookalike"; + @SerializedName(SERIALIZED_NAME_LOOKALIKE) + private LookalikeUpdateV1 lookalike; + + public static final String SERIALIZED_NAME_PROSPECTING = "prospecting"; + @SerializedName(SERIALIZED_NAME_PROSPECTING) + private ProspectingUpdateV1 prospecting; + + public AudienceSegmentUpdateEntityV1() { + } + + public AudienceSegmentUpdateEntityV1 name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the segment + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public AudienceSegmentUpdateEntityV1 description(NillableString description) { + + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + + public NillableString getDescription() { + return description; + } + + + public void setDescription(NillableString description) { + this.description = description; + } + + + public AudienceSegmentUpdateEntityV1 inMarket(InMarketUpdateV1 inMarket) { + + this.inMarket = inMarket; + return this; + } + + /** + * Get inMarket + * @return inMarket + **/ + @javax.annotation.Nullable + + public InMarketUpdateV1 getInMarket() { + return inMarket; + } + + + public void setInMarket(InMarketUpdateV1 inMarket) { + this.inMarket = inMarket; + } + + + public AudienceSegmentUpdateEntityV1 location(LocationUpdateV1 location) { + + this.location = location; + return this; + } + + /** + * Get location + * @return location + **/ + @javax.annotation.Nullable + + public LocationUpdateV1 getLocation() { + return location; + } + + + public void setLocation(LocationUpdateV1 location) { + this.location = location; + } + + + public AudienceSegmentUpdateEntityV1 retargeting(RetargetingUpdateV1 retargeting) { + + this.retargeting = retargeting; + return this; + } + + /** + * Get retargeting + * @return retargeting + **/ + @javax.annotation.Nullable + + public RetargetingUpdateV1 getRetargeting() { + return retargeting; + } + + + public void setRetargeting(RetargetingUpdateV1 retargeting) { + this.retargeting = retargeting; + } + + + public AudienceSegmentUpdateEntityV1 lookalike(LookalikeUpdateV1 lookalike) { + + this.lookalike = lookalike; + return this; + } + + /** + * Get lookalike + * @return lookalike + **/ + @javax.annotation.Nullable + + public LookalikeUpdateV1 getLookalike() { + return lookalike; + } + + + public void setLookalike(LookalikeUpdateV1 lookalike) { + this.lookalike = lookalike; + } + + + public AudienceSegmentUpdateEntityV1 prospecting(ProspectingUpdateV1 prospecting) { + + this.prospecting = prospecting; + return this; + } + + /** + * Get prospecting + * @return prospecting + **/ + @javax.annotation.Nullable + + public ProspectingUpdateV1 getProspecting() { + return prospecting; + } + + + public void setProspecting(ProspectingUpdateV1 prospecting) { + this.prospecting = prospecting; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentUpdateEntityV1 instance itself + */ + public AudienceSegmentUpdateEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentUpdateEntityV1 audienceSegmentUpdateEntityV1 = (AudienceSegmentUpdateEntityV1) o; + return Objects.equals(this.name, audienceSegmentUpdateEntityV1.name) && + Objects.equals(this.description, audienceSegmentUpdateEntityV1.description) && + Objects.equals(this.inMarket, audienceSegmentUpdateEntityV1.inMarket) && + Objects.equals(this.location, audienceSegmentUpdateEntityV1.location) && + Objects.equals(this.retargeting, audienceSegmentUpdateEntityV1.retargeting) && + Objects.equals(this.lookalike, audienceSegmentUpdateEntityV1.lookalike) && + Objects.equals(this.prospecting, audienceSegmentUpdateEntityV1.prospecting)&& + Objects.equals(this.additionalProperties, audienceSegmentUpdateEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, inMarket, location, retargeting, lookalike, prospecting, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentUpdateEntityV1 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" inMarket: ").append(toIndentedString(inMarket)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" retargeting: ").append(toIndentedString(retargeting)).append("\n"); + sb.append(" lookalike: ").append(toIndentedString(lookalike)).append("\n"); + sb.append(" prospecting: ").append(toIndentedString(prospecting)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("inMarket"); + openapiFields.add("location"); + openapiFields.add("retargeting"); + openapiFields.add("lookalike"); + openapiFields.add("prospecting"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentUpdateEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentUpdateEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentUpdateEntityV1 is not found in the empty JSON string", AudienceSegmentUpdateEntityV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // validate the optional field `description` + if (jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) { + NillableString.validateJsonObject(jsonObj.getAsJsonObject("description")); + } + // validate the optional field `inMarket` + if (jsonObj.get("inMarket") != null && !jsonObj.get("inMarket").isJsonNull()) { + InMarketUpdateV1.validateJsonObject(jsonObj.getAsJsonObject("inMarket")); + } + // validate the optional field `location` + if (jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) { + LocationUpdateV1.validateJsonObject(jsonObj.getAsJsonObject("location")); + } + // validate the optional field `retargeting` + if (jsonObj.get("retargeting") != null && !jsonObj.get("retargeting").isJsonNull()) { + RetargetingUpdateV1.validateJsonObject(jsonObj.getAsJsonObject("retargeting")); + } + // validate the optional field `lookalike` + if (jsonObj.get("lookalike") != null && !jsonObj.get("lookalike").isJsonNull()) { + LookalikeUpdateV1.validateJsonObject(jsonObj.getAsJsonObject("lookalike")); + } + // validate the optional field `prospecting` + if (jsonObj.get("prospecting") != null && !jsonObj.get("prospecting").isJsonNull()) { + ProspectingUpdateV1.validateJsonObject(jsonObj.getAsJsonObject("prospecting")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentUpdateEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentUpdateEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentUpdateEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentUpdateEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentUpdateEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentUpdateEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentUpdateEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentUpdateEntityV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentUpdateEntityV1 + */ + public static AudienceSegmentUpdateEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentUpdateEntityV1.class); + } + + /** + * Convert an instance of AudienceSegmentUpdateEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentUpdateEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentUpdateEntityV1Resource.java new file mode 100644 index 00000000..417e4964 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSegmentUpdateEntityV1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSegmentUpdateEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSegmentUpdateEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceSegmentUpdateEntityV1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AudienceSegmentUpdateEntityV1Resource() { + } + + public AudienceSegmentUpdateEntityV1Resource attributes(AudienceSegmentUpdateEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceSegmentUpdateEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceSegmentUpdateEntityV1 attributes) { + this.attributes = attributes; + } + + + public AudienceSegmentUpdateEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AudienceSegmentUpdateEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSegmentUpdateEntityV1Resource instance itself + */ + public AudienceSegmentUpdateEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSegmentUpdateEntityV1Resource audienceSegmentUpdateEntityV1Resource = (AudienceSegmentUpdateEntityV1Resource) o; + return Objects.equals(this.attributes, audienceSegmentUpdateEntityV1Resource.attributes) && + Objects.equals(this.id, audienceSegmentUpdateEntityV1Resource.id) && + Objects.equals(this.type, audienceSegmentUpdateEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, audienceSegmentUpdateEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSegmentUpdateEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSegmentUpdateEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSegmentUpdateEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSegmentUpdateEntityV1Resource is not found in the empty JSON string", AudienceSegmentUpdateEntityV1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceSegmentUpdateEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSegmentUpdateEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSegmentUpdateEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSegmentUpdateEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSegmentUpdateEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSegmentUpdateEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSegmentUpdateEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSegmentUpdateEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSegmentUpdateEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceSegmentUpdateEntityV1Resource + */ + public static AudienceSegmentUpdateEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSegmentUpdateEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceSegmentUpdateEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1.java new file mode 100644 index 00000000..2ae3ad3b --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1.java @@ -0,0 +1,289 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Audience entity only with its size + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSizeEntityV1 { + public static final String SERIALIZED_NAME_SIZE = "size"; + @SerializedName(SERIALIZED_NAME_SIZE) + private Long size; + + public AudienceSizeEntityV1() { + } + + public AudienceSizeEntityV1 size(Long size) { + + this.size = size; + return this; + } + + /** + * Get size + * @return size + **/ + @javax.annotation.Nullable + + public Long getSize() { + return size; + } + + + public void setSize(Long size) { + this.size = size; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSizeEntityV1 instance itself + */ + public AudienceSizeEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSizeEntityV1 audienceSizeEntityV1 = (AudienceSizeEntityV1) o; + return Objects.equals(this.size, audienceSizeEntityV1.size)&& + Objects.equals(this.additionalProperties, audienceSizeEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(size, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSizeEntityV1 {\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("size"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSizeEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSizeEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSizeEntityV1 is not found in the empty JSON string", AudienceSizeEntityV1.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSizeEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSizeEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSizeEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSizeEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSizeEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSizeEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSizeEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSizeEntityV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSizeEntityV1 + */ + public static AudienceSizeEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSizeEntityV1.class); + } + + /** + * Convert an instance of AudienceSizeEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1ListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1ListResponse.java new file mode 100644 index 00000000..1f03e810 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1ListResponse.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSizeEntityV1Resource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several entities + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSizeEntityV1ListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public AudienceSizeEntityV1ListResponse() { + } + + + public AudienceSizeEntityV1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public AudienceSizeEntityV1ListResponse data(List data) { + + this.data = data; + return this; + } + + public AudienceSizeEntityV1ListResponse addDataItem(AudienceSizeEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSizeEntityV1ListResponse instance itself + */ + public AudienceSizeEntityV1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSizeEntityV1ListResponse audienceSizeEntityV1ListResponse = (AudienceSizeEntityV1ListResponse) o; + return Objects.equals(this.data, audienceSizeEntityV1ListResponse.data) && + Objects.equals(this.warnings, audienceSizeEntityV1ListResponse.warnings) && + Objects.equals(this.errors, audienceSizeEntityV1ListResponse.errors)&& + Objects.equals(this.additionalProperties, audienceSizeEntityV1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSizeEntityV1ListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSizeEntityV1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSizeEntityV1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSizeEntityV1ListResponse is not found in the empty JSON string", AudienceSizeEntityV1ListResponse.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + AudienceSizeEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSizeEntityV1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSizeEntityV1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSizeEntityV1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSizeEntityV1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSizeEntityV1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSizeEntityV1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSizeEntityV1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSizeEntityV1ListResponse + * @throws IOException if the JSON string is invalid with respect to AudienceSizeEntityV1ListResponse + */ + public static AudienceSizeEntityV1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSizeEntityV1ListResponse.class); + } + + /** + * Convert an instance of AudienceSizeEntityV1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1Resource.java new file mode 100644 index 00000000..20559eb0 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEntityV1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSizeEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSizeEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceSizeEntityV1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AudienceSizeEntityV1Resource() { + } + + public AudienceSizeEntityV1Resource attributes(AudienceSizeEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceSizeEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceSizeEntityV1 attributes) { + this.attributes = attributes; + } + + + public AudienceSizeEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AudienceSizeEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSizeEntityV1Resource instance itself + */ + public AudienceSizeEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSizeEntityV1Resource audienceSizeEntityV1Resource = (AudienceSizeEntityV1Resource) o; + return Objects.equals(this.attributes, audienceSizeEntityV1Resource.attributes) && + Objects.equals(this.id, audienceSizeEntityV1Resource.id) && + Objects.equals(this.type, audienceSizeEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, audienceSizeEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSizeEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSizeEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSizeEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSizeEntityV1Resource is not found in the empty JSON string", AudienceSizeEntityV1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceSizeEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSizeEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSizeEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSizeEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSizeEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSizeEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSizeEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSizeEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSizeEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceSizeEntityV1Resource + */ + public static AudienceSizeEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSizeEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceSizeEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1.java new file mode 100644 index 00000000..f9913e90 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1.java @@ -0,0 +1,289 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Audience size estimation + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSizeEstimationV1 { + public static final String SERIALIZED_NAME_SIZE = "size"; + @SerializedName(SERIALIZED_NAME_SIZE) + private Long size; + + public AudienceSizeEstimationV1() { + } + + public AudienceSizeEstimationV1 size(Long size) { + + this.size = size; + return this; + } + + /** + * Get size + * @return size + **/ + @javax.annotation.Nullable + + public Long getSize() { + return size; + } + + + public void setSize(Long size) { + this.size = size; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSizeEstimationV1 instance itself + */ + public AudienceSizeEstimationV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSizeEstimationV1 audienceSizeEstimationV1 = (AudienceSizeEstimationV1) o; + return Objects.equals(this.size, audienceSizeEstimationV1.size)&& + Objects.equals(this.additionalProperties, audienceSizeEstimationV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(size, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSizeEstimationV1 {\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("size"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSizeEstimationV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSizeEstimationV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSizeEstimationV1 is not found in the empty JSON string", AudienceSizeEstimationV1.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSizeEstimationV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSizeEstimationV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSizeEstimationV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSizeEstimationV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSizeEstimationV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSizeEstimationV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSizeEstimationV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSizeEstimationV1 + * @throws IOException if the JSON string is invalid with respect to AudienceSizeEstimationV1 + */ + public static AudienceSizeEstimationV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSizeEstimationV1.class); + } + + /** + * Convert an instance of AudienceSizeEstimationV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1Resource.java new file mode 100644 index 00000000..ad576788 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1Resource.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSizeEstimationV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSizeEstimationV1Resource { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceSizeEstimationV1 attributes; + + public AudienceSizeEstimationV1Resource() { + } + + public AudienceSizeEstimationV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public AudienceSizeEstimationV1Resource attributes(AudienceSizeEstimationV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceSizeEstimationV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceSizeEstimationV1 attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSizeEstimationV1Resource instance itself + */ + public AudienceSizeEstimationV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSizeEstimationV1Resource audienceSizeEstimationV1Resource = (AudienceSizeEstimationV1Resource) o; + return Objects.equals(this.type, audienceSizeEstimationV1Resource.type) && + Objects.equals(this.attributes, audienceSizeEstimationV1Resource.attributes)&& + Objects.equals(this.additionalProperties, audienceSizeEstimationV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSizeEstimationV1Resource {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSizeEstimationV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSizeEstimationV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSizeEstimationV1Resource is not found in the empty JSON string", AudienceSizeEstimationV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceSizeEstimationV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSizeEstimationV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSizeEstimationV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSizeEstimationV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSizeEstimationV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSizeEstimationV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSizeEstimationV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSizeEstimationV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSizeEstimationV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceSizeEstimationV1Resource + */ + public static AudienceSizeEstimationV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSizeEstimationV1Resource.class); + } + + /** + * Convert an instance of AudienceSizeEstimationV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1Response.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1Response.java new file mode 100644 index 00000000..c9afaceb --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceSizeEstimationV1Response.java @@ -0,0 +1,375 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceSizeEstimationV1Resource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceSizeEstimationV1Response { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private AudienceSizeEstimationV1Resource data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public AudienceSizeEstimationV1Response() { + } + + + public AudienceSizeEstimationV1Response( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public AudienceSizeEstimationV1Response data(AudienceSizeEstimationV1Resource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public AudienceSizeEstimationV1Resource getData() { + return data; + } + + + public void setData(AudienceSizeEstimationV1Resource data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceSizeEstimationV1Response instance itself + */ + public AudienceSizeEstimationV1Response putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceSizeEstimationV1Response audienceSizeEstimationV1Response = (AudienceSizeEstimationV1Response) o; + return Objects.equals(this.data, audienceSizeEstimationV1Response.data) && + Objects.equals(this.warnings, audienceSizeEstimationV1Response.warnings) && + Objects.equals(this.errors, audienceSizeEstimationV1Response.errors)&& + Objects.equals(this.additionalProperties, audienceSizeEstimationV1Response.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceSizeEstimationV1Response {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceSizeEstimationV1Response + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceSizeEstimationV1Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceSizeEstimationV1Response is not found in the empty JSON string", AudienceSizeEstimationV1Response.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + AudienceSizeEstimationV1Resource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceSizeEstimationV1Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceSizeEstimationV1Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceSizeEstimationV1Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceSizeEstimationV1Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceSizeEstimationV1Response read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceSizeEstimationV1Response instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceSizeEstimationV1Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceSizeEstimationV1Response + * @throws IOException if the JSON string is invalid with respect to AudienceSizeEstimationV1Response + */ + public static AudienceSizeEstimationV1Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceSizeEstimationV1Response.class); + } + + /** + * Convert an instance of AudienceSizeEstimationV1Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceUpdateEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceUpdateEntityV1.java new file mode 100644 index 00000000..edf4547b --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceUpdateEntityV1.java @@ -0,0 +1,360 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AlgebraNodeV1; +import com.criteo.api.marketingsolutions.v2024_07.model.NillableString; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Audience of people of interest for a marketer. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceUpdateEntityV1 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private NillableString description; + + public static final String SERIALIZED_NAME_ALGEBRA = "algebra"; + @SerializedName(SERIALIZED_NAME_ALGEBRA) + private AlgebraNodeV1 algebra; + + public AudienceUpdateEntityV1() { + } + + public AudienceUpdateEntityV1 name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the audience + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public AudienceUpdateEntityV1 description(NillableString description) { + + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + + public NillableString getDescription() { + return description; + } + + + public void setDescription(NillableString description) { + this.description = description; + } + + + public AudienceUpdateEntityV1 algebra(AlgebraNodeV1 algebra) { + + this.algebra = algebra; + return this; + } + + /** + * Get algebra + * @return algebra + **/ + @javax.annotation.Nullable + + public AlgebraNodeV1 getAlgebra() { + return algebra; + } + + + public void setAlgebra(AlgebraNodeV1 algebra) { + this.algebra = algebra; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceUpdateEntityV1 instance itself + */ + public AudienceUpdateEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceUpdateEntityV1 audienceUpdateEntityV1 = (AudienceUpdateEntityV1) o; + return Objects.equals(this.name, audienceUpdateEntityV1.name) && + Objects.equals(this.description, audienceUpdateEntityV1.description) && + Objects.equals(this.algebra, audienceUpdateEntityV1.algebra)&& + Objects.equals(this.additionalProperties, audienceUpdateEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, algebra, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceUpdateEntityV1 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" algebra: ").append(toIndentedString(algebra)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("algebra"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceUpdateEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceUpdateEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceUpdateEntityV1 is not found in the empty JSON string", AudienceUpdateEntityV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // validate the optional field `description` + if (jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) { + NillableString.validateJsonObject(jsonObj.getAsJsonObject("description")); + } + // validate the optional field `algebra` + if (jsonObj.get("algebra") != null && !jsonObj.get("algebra").isJsonNull()) { + AlgebraNodeV1.validateJsonObject(jsonObj.getAsJsonObject("algebra")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceUpdateEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceUpdateEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceUpdateEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceUpdateEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceUpdateEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceUpdateEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceUpdateEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceUpdateEntityV1 + * @throws IOException if the JSON string is invalid with respect to AudienceUpdateEntityV1 + */ + public static AudienceUpdateEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceUpdateEntityV1.class); + } + + /** + * Convert an instance of AudienceUpdateEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceUpdateEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceUpdateEntityV1Resource.java new file mode 100644 index 00000000..a8edd0fd --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceUpdateEntityV1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceUpdateEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AudienceUpdateEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AudienceUpdateEntityV1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public AudienceUpdateEntityV1Resource() { + } + + public AudienceUpdateEntityV1Resource attributes(AudienceUpdateEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AudienceUpdateEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(AudienceUpdateEntityV1 attributes) { + this.attributes = attributes; + } + + + public AudienceUpdateEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AudienceUpdateEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AudienceUpdateEntityV1Resource instance itself + */ + public AudienceUpdateEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AudienceUpdateEntityV1Resource audienceUpdateEntityV1Resource = (AudienceUpdateEntityV1Resource) o; + return Objects.equals(this.attributes, audienceUpdateEntityV1Resource.attributes) && + Objects.equals(this.id, audienceUpdateEntityV1Resource.id) && + Objects.equals(this.type, audienceUpdateEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, audienceUpdateEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AudienceUpdateEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AudienceUpdateEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AudienceUpdateEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AudienceUpdateEntityV1Resource is not found in the empty JSON string", AudienceUpdateEntityV1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AudienceUpdateEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AudienceUpdateEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AudienceUpdateEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AudienceUpdateEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AudienceUpdateEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AudienceUpdateEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AudienceUpdateEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AudienceUpdateEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AudienceUpdateEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to AudienceUpdateEntityV1Resource + */ + public static AudienceUpdateEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AudienceUpdateEntityV1Resource.class); + } + + /** + * Convert an instance of AudienceUpdateEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceWarning.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceWarning.java similarity index 99% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceWarning.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceWarning.java index d0026ab2..5a27babf 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/AudienceWarning.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/AudienceWarning.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Definition of the warning diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/BasicAudienceDefinition.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/BasicAudienceDefinition.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/BasicAudienceDefinition.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/BasicAudienceDefinition.java index 6a148fc4..01a592fd 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/BasicAudienceDefinition.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/BasicAudienceDefinition.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceNameDescription; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceNameDescription; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Common definition of an audience diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/BehavioralV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/BehavioralV1.java new file mode 100644 index 00000000..09a99c9f --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/BehavioralV1.java @@ -0,0 +1,444 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings of a behavioral set of users provided by Criteo. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BehavioralV1 { + public static final String SERIALIZED_NAME_COUNTRY = "country"; + @SerializedName(SERIALIZED_NAME_COUNTRY) + private String country; + + /** + * The type of behavioral + */ + @JsonAdapter(CategoryEnum.Adapter.class) + public enum CategoryEnum { + UNKNOWN("Unknown"), + + LIFESTYLES("Lifestyles"), + + LIFEEVENTS("LifeEvents"), + + SEASONAL("Seasonal"), + + BUYINGPATTERNS("BuyingPatterns"); + + private String value; + + CategoryEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CategoryEnum fromValue(String value) { + for (CategoryEnum b : CategoryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CategoryEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CategoryEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CategoryEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_CATEGORY = "category"; + @SerializedName(SERIALIZED_NAME_CATEGORY) + private CategoryEnum category; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private OffsetDateTime startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private OffsetDateTime endDate; + + public BehavioralV1() { + } + + public BehavioralV1 country(String country) { + + this.country = country; + return this; + } + + /** + * The users' country + * @return country + **/ + @javax.annotation.Nullable + + public String getCountry() { + return country; + } + + + public void setCountry(String country) { + this.country = country; + } + + + public BehavioralV1 category(CategoryEnum category) { + + this.category = category; + return this; + } + + /** + * The type of behavioral + * @return category + **/ + @javax.annotation.Nonnull + + public CategoryEnum getCategory() { + return category; + } + + + public void setCategory(CategoryEnum category) { + this.category = category; + } + + + public BehavioralV1 startDate(OffsetDateTime startDate) { + + this.startDate = startDate; + return this; + } + + /** + * Desired date when the behavioral will start + * @return startDate + **/ + @javax.annotation.Nullable + + public OffsetDateTime getStartDate() { + return startDate; + } + + + public void setStartDate(OffsetDateTime startDate) { + this.startDate = startDate; + } + + + public BehavioralV1 endDate(OffsetDateTime endDate) { + + this.endDate = endDate; + return this; + } + + /** + * Desired date when the behavioral will end + * @return endDate + **/ + @javax.annotation.Nullable + + public OffsetDateTime getEndDate() { + return endDate; + } + + + public void setEndDate(OffsetDateTime endDate) { + this.endDate = endDate; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the BehavioralV1 instance itself + */ + public BehavioralV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BehavioralV1 behavioralV1 = (BehavioralV1) o; + return Objects.equals(this.country, behavioralV1.country) && + Objects.equals(this.category, behavioralV1.category) && + Objects.equals(this.startDate, behavioralV1.startDate) && + Objects.equals(this.endDate, behavioralV1.endDate)&& + Objects.equals(this.additionalProperties, behavioralV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(country, category, startDate, endDate, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BehavioralV1 {\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("country"); + openapiFields.add("category"); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("category"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to BehavioralV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!BehavioralV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BehavioralV1 is not found in the empty JSON string", BehavioralV1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : BehavioralV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); + } + if (!jsonObj.get("category").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `category` to be a primitive type in the JSON string but got `%s`", jsonObj.get("category").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BehavioralV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BehavioralV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BehavioralV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BehavioralV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public BehavioralV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + BehavioralV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BehavioralV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of BehavioralV1 + * @throws IOException if the JSON string is invalid with respect to BehavioralV1 + */ + public static BehavioralV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BehavioralV1.class); + } + + /** + * Convert an instance of BehavioralV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSearchFilters.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSearchFiltersV23Q1.java similarity index 83% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSearchFilters.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSearchFiltersV23Q1.java index fac43320..bdf24b1b 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSearchFilters.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSearchFiltersV23Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,13 +44,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * filters on campaign */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CampaignSearchFilters { +public class CampaignSearchFiltersV23Q1 { public static final String SERIALIZED_NAME_CAMPAIGN_IDS = "campaignIds"; @SerializedName(SERIALIZED_NAME_CAMPAIGN_IDS) private List campaignIds = null; @@ -59,16 +59,16 @@ public class CampaignSearchFilters { @SerializedName(SERIALIZED_NAME_ADVERTISER_IDS) private List advertiserIds = null; - public CampaignSearchFilters() { + public CampaignSearchFiltersV23Q1() { } - public CampaignSearchFilters campaignIds(List campaignIds) { + public CampaignSearchFiltersV23Q1 campaignIds(List campaignIds) { this.campaignIds = campaignIds; return this; } - public CampaignSearchFilters addCampaignIdsItem(String campaignIdsItem) { + public CampaignSearchFiltersV23Q1 addCampaignIdsItem(String campaignIdsItem) { if (this.campaignIds == null) { this.campaignIds = null; } @@ -92,13 +92,13 @@ public void setCampaignIds(List campaignIds) { } - public CampaignSearchFilters advertiserIds(List advertiserIds) { + public CampaignSearchFiltersV23Q1 advertiserIds(List advertiserIds) { this.advertiserIds = advertiserIds; return this; } - public CampaignSearchFilters addAdvertiserIdsItem(String advertiserIdsItem) { + public CampaignSearchFiltersV23Q1 addAdvertiserIdsItem(String advertiserIdsItem) { if (this.advertiserIds == null) { this.advertiserIds = null; } @@ -134,9 +134,9 @@ public void setAdvertiserIds(List advertiserIds) { * * @param key name of the property * @param value value of the property - * @return the CampaignSearchFilters instance itself + * @return the CampaignSearchFiltersV23Q1 instance itself */ - public CampaignSearchFilters putAdditionalProperty(String key, Object value) { + public CampaignSearchFiltersV23Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -175,10 +175,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CampaignSearchFilters campaignSearchFilters = (CampaignSearchFilters) o; - return Objects.equals(this.campaignIds, campaignSearchFilters.campaignIds) && - Objects.equals(this.advertiserIds, campaignSearchFilters.advertiserIds)&& - Objects.equals(this.additionalProperties, campaignSearchFilters.additionalProperties); + CampaignSearchFiltersV23Q1 campaignSearchFiltersV23Q1 = (CampaignSearchFiltersV23Q1) o; + return Objects.equals(this.campaignIds, campaignSearchFiltersV23Q1.campaignIds) && + Objects.equals(this.advertiserIds, campaignSearchFiltersV23Q1.advertiserIds)&& + Objects.equals(this.additionalProperties, campaignSearchFiltersV23Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -200,7 +200,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CampaignSearchFilters {\n"); + sb.append("class CampaignSearchFiltersV23Q1 {\n"); sb.append(" campaignIds: ").append(toIndentedString(campaignIds)).append("\n"); sb.append(" advertiserIds: ").append(toIndentedString(advertiserIds)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -237,12 +237,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CampaignSearchFilters + * @throws IOException if the JSON Object is invalid with respect to CampaignSearchFiltersV23Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!CampaignSearchFilters.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignSearchFilters is not found in the empty JSON string", CampaignSearchFilters.openapiRequiredFields.toString())); + if (!CampaignSearchFiltersV23Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignSearchFiltersV23Q1 is not found in the empty JSON string", CampaignSearchFiltersV23Q1.openapiRequiredFields.toString())); } } // ensure the optional json data is an array if present @@ -259,16 +259,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CampaignSearchFilters.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CampaignSearchFilters' and its subtypes + if (!CampaignSearchFiltersV23Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CampaignSearchFiltersV23Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CampaignSearchFilters.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CampaignSearchFiltersV23Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CampaignSearchFilters value) throws IOException { + public void write(JsonWriter out, CampaignSearchFiltersV23Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -291,11 +291,11 @@ else if (entry.getValue() instanceof Character) } @Override - public CampaignSearchFilters read(JsonReader in) throws IOException { + public CampaignSearchFiltersV23Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - CampaignSearchFilters instance = thisAdapter.fromJsonTree(jsonObj); + CampaignSearchFiltersV23Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -322,18 +322,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of CampaignSearchFilters given an JSON string + * Create an instance of CampaignSearchFiltersV23Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of CampaignSearchFilters - * @throws IOException if the JSON string is invalid with respect to CampaignSearchFilters + * @return An instance of CampaignSearchFiltersV23Q1 + * @throws IOException if the JSON string is invalid with respect to CampaignSearchFiltersV23Q1 */ - public static CampaignSearchFilters fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CampaignSearchFilters.class); + public static CampaignSearchFiltersV23Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CampaignSearchFiltersV23Q1.class); } /** - * Convert an instance of CampaignSearchFilters to an JSON string + * Convert an instance of CampaignSearchFiltersV23Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSearchRequest.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSearchRequestV23Q1.java similarity index 79% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSearchRequest.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSearchRequestV23Q1.java index f849bf5b..e6d2ff6a 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSearchRequest.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSearchRequestV23Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.CampaignSearchFilters; +import com.criteo.api.marketingsolutions.v2024_07.model.CampaignSearchFiltersV23Q1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,21 +42,21 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * request payload of the search endpoint */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CampaignSearchRequest { +public class CampaignSearchRequestV23Q1 { public static final String SERIALIZED_NAME_FILTERS = "filters"; @SerializedName(SERIALIZED_NAME_FILTERS) - private CampaignSearchFilters filters; + private CampaignSearchFiltersV23Q1 filters; - public CampaignSearchRequest() { + public CampaignSearchRequestV23Q1() { } - public CampaignSearchRequest filters(CampaignSearchFilters filters) { + public CampaignSearchRequestV23Q1 filters(CampaignSearchFiltersV23Q1 filters) { this.filters = filters; return this; @@ -68,12 +68,12 @@ public CampaignSearchRequest filters(CampaignSearchFilters filters) { **/ @javax.annotation.Nullable - public CampaignSearchFilters getFilters() { + public CampaignSearchFiltersV23Q1 getFilters() { return filters; } - public void setFilters(CampaignSearchFilters filters) { + public void setFilters(CampaignSearchFiltersV23Q1 filters) { this.filters = filters; } @@ -90,9 +90,9 @@ public void setFilters(CampaignSearchFilters filters) { * * @param key name of the property * @param value value of the property - * @return the CampaignSearchRequest instance itself + * @return the CampaignSearchRequestV23Q1 instance itself */ - public CampaignSearchRequest putAdditionalProperty(String key, Object value) { + public CampaignSearchRequestV23Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -131,9 +131,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CampaignSearchRequest campaignSearchRequest = (CampaignSearchRequest) o; - return Objects.equals(this.filters, campaignSearchRequest.filters)&& - Objects.equals(this.additionalProperties, campaignSearchRequest.additionalProperties); + CampaignSearchRequestV23Q1 campaignSearchRequestV23Q1 = (CampaignSearchRequestV23Q1) o; + return Objects.equals(this.filters, campaignSearchRequestV23Q1.filters)&& + Objects.equals(this.additionalProperties, campaignSearchRequestV23Q1.additionalProperties); } @Override @@ -144,7 +144,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CampaignSearchRequest {\n"); + sb.append("class CampaignSearchRequestV23Q1 {\n"); sb.append(" filters: ").append(toIndentedString(filters)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -179,17 +179,17 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CampaignSearchRequest + * @throws IOException if the JSON Object is invalid with respect to CampaignSearchRequestV23Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!CampaignSearchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignSearchRequest is not found in the empty JSON string", CampaignSearchRequest.openapiRequiredFields.toString())); + if (!CampaignSearchRequestV23Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignSearchRequestV23Q1 is not found in the empty JSON string", CampaignSearchRequestV23Q1.openapiRequiredFields.toString())); } } // validate the optional field `filters` if (jsonObj.get("filters") != null && !jsonObj.get("filters").isJsonNull()) { - CampaignSearchFilters.validateJsonObject(jsonObj.getAsJsonObject("filters")); + CampaignSearchFiltersV23Q1.validateJsonObject(jsonObj.getAsJsonObject("filters")); } } @@ -197,16 +197,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CampaignSearchRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CampaignSearchRequest' and its subtypes + if (!CampaignSearchRequestV23Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CampaignSearchRequestV23Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CampaignSearchRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CampaignSearchRequestV23Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CampaignSearchRequest value) throws IOException { + public void write(JsonWriter out, CampaignSearchRequestV23Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -229,11 +229,11 @@ else if (entry.getValue() instanceof Character) } @Override - public CampaignSearchRequest read(JsonReader in) throws IOException { + public CampaignSearchRequestV23Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - CampaignSearchRequest instance = thisAdapter.fromJsonTree(jsonObj); + CampaignSearchRequestV23Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -260,18 +260,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of CampaignSearchRequest given an JSON string + * Create an instance of CampaignSearchRequestV23Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of CampaignSearchRequest - * @throws IOException if the JSON string is invalid with respect to CampaignSearchRequest + * @return An instance of CampaignSearchRequestV23Q1 + * @throws IOException if the JSON string is invalid with respect to CampaignSearchRequestV23Q1 */ - public static CampaignSearchRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CampaignSearchRequest.class); + public static CampaignSearchRequestV23Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CampaignSearchRequestV23Q1.class); } /** - * Convert an instance of CampaignSearchRequest to an JSON string + * Convert an instance of CampaignSearchRequestV23Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSpendLimit.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSpendLimitV23Q1.java similarity index 86% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSpendLimit.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSpendLimitV23Q1.java index 4ab9a2d5..23fd4bf8 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignSpendLimit.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignSpendLimitV23Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.NillableDecimal; +import com.criteo.api.marketingsolutions.v2024_07.model.NillableDecimal; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +43,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * campaign spend limit model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CampaignSpendLimit { +public class CampaignSpendLimitV23Q1 { /** * Gets or Sets spendLimitType */ @@ -160,10 +160,10 @@ public SpendLimitRenewalEnum read(final JsonReader jsonReader) throws IOExceptio @SerializedName(SERIALIZED_NAME_SPEND_LIMIT_AMOUNT) private NillableDecimal spendLimitAmount; - public CampaignSpendLimit() { + public CampaignSpendLimitV23Q1() { } - public CampaignSpendLimit spendLimitType(SpendLimitTypeEnum spendLimitType) { + public CampaignSpendLimitV23Q1 spendLimitType(SpendLimitTypeEnum spendLimitType) { this.spendLimitType = spendLimitType; return this; @@ -185,7 +185,7 @@ public void setSpendLimitType(SpendLimitTypeEnum spendLimitType) { } - public CampaignSpendLimit spendLimitRenewal(SpendLimitRenewalEnum spendLimitRenewal) { + public CampaignSpendLimitV23Q1 spendLimitRenewal(SpendLimitRenewalEnum spendLimitRenewal) { this.spendLimitRenewal = spendLimitRenewal; return this; @@ -207,7 +207,7 @@ public void setSpendLimitRenewal(SpendLimitRenewalEnum spendLimitRenewal) { } - public CampaignSpendLimit spendLimitAmount(NillableDecimal spendLimitAmount) { + public CampaignSpendLimitV23Q1 spendLimitAmount(NillableDecimal spendLimitAmount) { this.spendLimitAmount = spendLimitAmount; return this; @@ -241,9 +241,9 @@ public void setSpendLimitAmount(NillableDecimal spendLimitAmount) { * * @param key name of the property * @param value value of the property - * @return the CampaignSpendLimit instance itself + * @return the CampaignSpendLimitV23Q1 instance itself */ - public CampaignSpendLimit putAdditionalProperty(String key, Object value) { + public CampaignSpendLimitV23Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -282,11 +282,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CampaignSpendLimit campaignSpendLimit = (CampaignSpendLimit) o; - return Objects.equals(this.spendLimitType, campaignSpendLimit.spendLimitType) && - Objects.equals(this.spendLimitRenewal, campaignSpendLimit.spendLimitRenewal) && - Objects.equals(this.spendLimitAmount, campaignSpendLimit.spendLimitAmount)&& - Objects.equals(this.additionalProperties, campaignSpendLimit.additionalProperties); + CampaignSpendLimitV23Q1 campaignSpendLimitV23Q1 = (CampaignSpendLimitV23Q1) o; + return Objects.equals(this.spendLimitType, campaignSpendLimitV23Q1.spendLimitType) && + Objects.equals(this.spendLimitRenewal, campaignSpendLimitV23Q1.spendLimitRenewal) && + Objects.equals(this.spendLimitAmount, campaignSpendLimitV23Q1.spendLimitAmount)&& + Objects.equals(this.additionalProperties, campaignSpendLimitV23Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -308,7 +308,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CampaignSpendLimit {\n"); + sb.append("class CampaignSpendLimitV23Q1 {\n"); sb.append(" spendLimitType: ").append(toIndentedString(spendLimitType)).append("\n"); sb.append(" spendLimitRenewal: ").append(toIndentedString(spendLimitRenewal)).append("\n"); sb.append(" spendLimitAmount: ").append(toIndentedString(spendLimitAmount)).append("\n"); @@ -347,12 +347,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CampaignSpendLimit + * @throws IOException if the JSON Object is invalid with respect to CampaignSpendLimitV23Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!CampaignSpendLimit.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignSpendLimit is not found in the empty JSON string", CampaignSpendLimit.openapiRequiredFields.toString())); + if (!CampaignSpendLimitV23Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignSpendLimitV23Q1 is not found in the empty JSON string", CampaignSpendLimitV23Q1.openapiRequiredFields.toString())); } } if ((jsonObj.get("spendLimitType") != null && !jsonObj.get("spendLimitType").isJsonNull()) && !jsonObj.get("spendLimitType").isJsonPrimitive()) { @@ -371,16 +371,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CampaignSpendLimit.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CampaignSpendLimit' and its subtypes + if (!CampaignSpendLimitV23Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CampaignSpendLimitV23Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CampaignSpendLimit.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CampaignSpendLimitV23Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CampaignSpendLimit value) throws IOException { + public void write(JsonWriter out, CampaignSpendLimitV23Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -403,11 +403,11 @@ else if (entry.getValue() instanceof Character) } @Override - public CampaignSpendLimit read(JsonReader in) throws IOException { + public CampaignSpendLimitV23Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - CampaignSpendLimit instance = thisAdapter.fromJsonTree(jsonObj); + CampaignSpendLimitV23Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -434,18 +434,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of CampaignSpendLimit given an JSON string + * Create an instance of CampaignSpendLimitV23Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of CampaignSpendLimit - * @throws IOException if the JSON string is invalid with respect to CampaignSpendLimit + * @return An instance of CampaignSpendLimitV23Q1 + * @throws IOException if the JSON string is invalid with respect to CampaignSpendLimitV23Q1 */ - public static CampaignSpendLimit fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CampaignSpendLimit.class); + public static CampaignSpendLimitV23Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CampaignSpendLimitV23Q1.class); } /** - * Convert an instance of CampaignSpendLimit to an JSON string + * Convert an instance of CampaignSpendLimitV23Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/Campaign.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1.java similarity index 77% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/Campaign.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1.java index 55809c75..58b63e6a 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/Campaign.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.CampaignSpendLimit; +import com.criteo.api.marketingsolutions.v2024_07.model.CampaignSpendLimitV23Q1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +43,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * campaign read model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Campaign { +public class CampaignV23Q1 { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -58,24 +58,20 @@ public class Campaign { @SerializedName(SERIALIZED_NAME_ADVERTISER_ID) private String advertiserId; - public static final String SERIALIZED_NAME_OBJECTIVE = "objective"; - @SerializedName(SERIALIZED_NAME_OBJECTIVE) - private String objective; - public static final String SERIALIZED_NAME_SPEND_LIMIT = "spendLimit"; @SerializedName(SERIALIZED_NAME_SPEND_LIMIT) - private CampaignSpendLimit spendLimit; + private CampaignSpendLimitV23Q1 spendLimit; /** * Gets or Sets goal */ @JsonAdapter(GoalEnum.Adapter.class) public enum GoalEnum { - UNSPECIFIED("Unspecified"), + UNSPECIFIED("unspecified"), - ACQUISITION("Acquisition"), + ACQUISITION("acquisition"), - RETENTION("Retention"); + RETENTION("retention"); private String value; @@ -119,10 +115,10 @@ public GoalEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_GOAL) private GoalEnum goal; - public Campaign() { + public CampaignV23Q1() { } - public Campaign name(String name) { + public CampaignV23Q1 name(String name) { this.name = name; return this; @@ -144,7 +140,7 @@ public void setName(String name) { } - public Campaign advertiserId(String advertiserId) { + public CampaignV23Q1 advertiserId(String advertiserId) { this.advertiserId = advertiserId; return this; @@ -166,29 +162,7 @@ public void setAdvertiserId(String advertiserId) { } - public Campaign objective(String objective) { - - this.objective = objective; - return this; - } - - /** - * Get objective - * @return objective - **/ - @javax.annotation.Nullable - - public String getObjective() { - return objective; - } - - - public void setObjective(String objective) { - this.objective = objective; - } - - - public Campaign spendLimit(CampaignSpendLimit spendLimit) { + public CampaignV23Q1 spendLimit(CampaignSpendLimitV23Q1 spendLimit) { this.spendLimit = spendLimit; return this; @@ -200,17 +174,17 @@ public Campaign spendLimit(CampaignSpendLimit spendLimit) { **/ @javax.annotation.Nullable - public CampaignSpendLimit getSpendLimit() { + public CampaignSpendLimitV23Q1 getSpendLimit() { return spendLimit; } - public void setSpendLimit(CampaignSpendLimit spendLimit) { + public void setSpendLimit(CampaignSpendLimitV23Q1 spendLimit) { this.spendLimit = spendLimit; } - public Campaign goal(GoalEnum goal) { + public CampaignV23Q1 goal(GoalEnum goal) { this.goal = goal; return this; @@ -244,9 +218,9 @@ public void setGoal(GoalEnum goal) { * * @param key name of the property * @param value value of the property - * @return the Campaign instance itself + * @return the CampaignV23Q1 instance itself */ - public Campaign putAdditionalProperty(String key, Object value) { + public CampaignV23Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -285,13 +259,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Campaign campaign = (Campaign) o; - return Objects.equals(this.name, campaign.name) && - Objects.equals(this.advertiserId, campaign.advertiserId) && - Objects.equals(this.objective, campaign.objective) && - Objects.equals(this.spendLimit, campaign.spendLimit) && - Objects.equals(this.goal, campaign.goal)&& - Objects.equals(this.additionalProperties, campaign.additionalProperties); + CampaignV23Q1 campaignV23Q1 = (CampaignV23Q1) o; + return Objects.equals(this.name, campaignV23Q1.name) && + Objects.equals(this.advertiserId, campaignV23Q1.advertiserId) && + Objects.equals(this.spendLimit, campaignV23Q1.spendLimit) && + Objects.equals(this.goal, campaignV23Q1.goal)&& + Objects.equals(this.additionalProperties, campaignV23Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -300,7 +273,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, advertiserId, objective, spendLimit, goal, additionalProperties); + return Objects.hash(name, advertiserId, spendLimit, goal, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -313,10 +286,9 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Campaign {\n"); + sb.append("class CampaignV23Q1 {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n"); - sb.append(" objective: ").append(toIndentedString(objective)).append("\n"); sb.append(" spendLimit: ").append(toIndentedString(spendLimit)).append("\n"); sb.append(" goal: ").append(toIndentedString(goal)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -344,7 +316,6 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("name"); openapiFields.add("advertiserId"); - openapiFields.add("objective"); openapiFields.add("spendLimit"); openapiFields.add("goal"); @@ -356,12 +327,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Campaign + * @throws IOException if the JSON Object is invalid with respect to CampaignV23Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!Campaign.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Campaign is not found in the empty JSON string", Campaign.openapiRequiredFields.toString())); + if (!CampaignV23Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignV23Q1 is not found in the empty JSON string", CampaignV23Q1.openapiRequiredFields.toString())); } } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { @@ -370,12 +341,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("advertiserId") != null && !jsonObj.get("advertiserId").isJsonNull()) && !jsonObj.get("advertiserId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `advertiserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("advertiserId").toString())); } - if ((jsonObj.get("objective") != null && !jsonObj.get("objective").isJsonNull()) && !jsonObj.get("objective").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `objective` to be a primitive type in the JSON string but got `%s`", jsonObj.get("objective").toString())); - } // validate the optional field `spendLimit` if (jsonObj.get("spendLimit") != null && !jsonObj.get("spendLimit").isJsonNull()) { - CampaignSpendLimit.validateJsonObject(jsonObj.getAsJsonObject("spendLimit")); + CampaignSpendLimitV23Q1.validateJsonObject(jsonObj.getAsJsonObject("spendLimit")); } if ((jsonObj.get("goal") != null && !jsonObj.get("goal").isJsonNull()) && !jsonObj.get("goal").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `goal` to be a primitive type in the JSON string but got `%s`", jsonObj.get("goal").toString())); @@ -386,16 +354,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!Campaign.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Campaign' and its subtypes + if (!CampaignV23Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CampaignV23Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Campaign.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CampaignV23Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, Campaign value) throws IOException { + public void write(JsonWriter out, CampaignV23Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -418,11 +386,11 @@ else if (entry.getValue() instanceof Character) } @Override - public Campaign read(JsonReader in) throws IOException { + public CampaignV23Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - Campaign instance = thisAdapter.fromJsonTree(jsonObj); + CampaignV23Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -449,18 +417,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of Campaign given an JSON string + * Create an instance of CampaignV23Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of Campaign - * @throws IOException if the JSON string is invalid with respect to Campaign + * @return An instance of CampaignV23Q1 + * @throws IOException if the JSON string is invalid with respect to CampaignV23Q1 */ - public static Campaign fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Campaign.class); + public static CampaignV23Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CampaignV23Q1.class); } /** - * Convert an instance of Campaign to an JSON string + * Convert an instance of CampaignV23Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1ListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1ListResponse.java new file mode 100644 index 00000000..0f63aa88 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1ListResponse.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CampaignV23Q1Resource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for a list of response resources + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CampaignV23Q1ListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public CampaignV23Q1ListResponse() { + } + + + public CampaignV23Q1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public CampaignV23Q1ListResponse data(List data) { + + this.data = data; + return this; + } + + public CampaignV23Q1ListResponse addDataItem(CampaignV23Q1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CampaignV23Q1ListResponse instance itself + */ + public CampaignV23Q1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CampaignV23Q1ListResponse campaignV23Q1ListResponse = (CampaignV23Q1ListResponse) o; + return Objects.equals(this.data, campaignV23Q1ListResponse.data) && + Objects.equals(this.warnings, campaignV23Q1ListResponse.warnings) && + Objects.equals(this.errors, campaignV23Q1ListResponse.errors)&& + Objects.equals(this.additionalProperties, campaignV23Q1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CampaignV23Q1ListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CampaignV23Q1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CampaignV23Q1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignV23Q1ListResponse is not found in the empty JSON string", CampaignV23Q1ListResponse.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + CampaignV23Q1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CampaignV23Q1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CampaignV23Q1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CampaignV23Q1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CampaignV23Q1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CampaignV23Q1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CampaignV23Q1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CampaignV23Q1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CampaignV23Q1ListResponse + * @throws IOException if the JSON string is invalid with respect to CampaignV23Q1ListResponse + */ + public static CampaignV23Q1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CampaignV23Q1ListResponse.class); + } + + /** + * Convert an instance of CampaignV23Q1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1Resource.java new file mode 100644 index 00000000..4ac754b2 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CampaignV23Q1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CampaignV23Q1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CampaignV23Q1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public CampaignV23Q1Resource() { + } + + public CampaignV23Q1Resource attributes(CampaignV23Q1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public CampaignV23Q1 getAttributes() { + return attributes; + } + + + public void setAttributes(CampaignV23Q1 attributes) { + this.attributes = attributes; + } + + + public CampaignV23Q1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public CampaignV23Q1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Canonical type name of the entity + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CampaignV23Q1Resource instance itself + */ + public CampaignV23Q1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CampaignV23Q1Resource campaignV23Q1Resource = (CampaignV23Q1Resource) o; + return Objects.equals(this.attributes, campaignV23Q1Resource.attributes) && + Objects.equals(this.id, campaignV23Q1Resource.id) && + Objects.equals(this.type, campaignV23Q1Resource.type)&& + Objects.equals(this.additionalProperties, campaignV23Q1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CampaignV23Q1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CampaignV23Q1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CampaignV23Q1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignV23Q1Resource is not found in the empty JSON string", CampaignV23Q1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + CampaignV23Q1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CampaignV23Q1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CampaignV23Q1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CampaignV23Q1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CampaignV23Q1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CampaignV23Q1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CampaignV23Q1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CampaignV23Q1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of CampaignV23Q1Resource + * @throws IOException if the JSON string is invalid with respect to CampaignV23Q1Resource + */ + public static CampaignV23Q1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CampaignV23Q1Resource.class); + } + + /** + * Convert an instance of CampaignV23Q1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1Response.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1Response.java new file mode 100644 index 00000000..61255005 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CampaignV23Q1Response.java @@ -0,0 +1,375 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CampaignV23Q1Resource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for response resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CampaignV23Q1Response { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CampaignV23Q1Resource data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public CampaignV23Q1Response() { + } + + + public CampaignV23Q1Response( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public CampaignV23Q1Response data(CampaignV23Q1Resource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public CampaignV23Q1Resource getData() { + return data; + } + + + public void setData(CampaignV23Q1Resource data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CampaignV23Q1Response instance itself + */ + public CampaignV23Q1Response putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CampaignV23Q1Response campaignV23Q1Response = (CampaignV23Q1Response) o; + return Objects.equals(this.data, campaignV23Q1Response.data) && + Objects.equals(this.warnings, campaignV23Q1Response.warnings) && + Objects.equals(this.errors, campaignV23Q1Response.errors)&& + Objects.equals(this.additionalProperties, campaignV23Q1Response.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CampaignV23Q1Response {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CampaignV23Q1Response + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CampaignV23Q1Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignV23Q1Response is not found in the empty JSON string", CampaignV23Q1Response.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CampaignV23Q1Resource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CampaignV23Q1Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CampaignV23Q1Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CampaignV23Q1Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CampaignV23Q1Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CampaignV23Q1Response read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CampaignV23Q1Response instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CampaignV23Q1Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of CampaignV23Q1Response + * @throws IOException if the JSON string is invalid with respect to CampaignV23Q1Response + */ + public static CampaignV23Q1Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CampaignV23Q1Response.class); + } + + /** + * Convert an instance of CampaignV23Q1Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CommonProblem.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CommonProblem.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CommonProblem.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CommonProblem.java index 853e4458..ffbb5ad3 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CommonProblem.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CommonProblem.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,10 +44,10 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** - * Common problem object. Can be specialized as needed. + * Common problem object. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CommonProblem { @@ -222,7 +222,7 @@ public CommonProblem code(String code) { } /** - * A machine-readable error code, expressed as a string value. + * A machine-readable error code, expressed as a string value. * @return code **/ @javax.annotation.Nullable diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1.java new file mode 100644 index 00000000..a4d0b07b --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1.java @@ -0,0 +1,347 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Contact list statistics. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContactListStatisticsEntityV1 { + public static final String SERIALIZED_NAME_NUMBER_OF_IDENTIFIERS = "numberOfIdentifiers"; + @SerializedName(SERIALIZED_NAME_NUMBER_OF_IDENTIFIERS) + private Integer numberOfIdentifiers; + + public static final String SERIALIZED_NAME_NUMBER_OF_MATCHES = "numberOfMatches"; + @SerializedName(SERIALIZED_NAME_NUMBER_OF_MATCHES) + private Integer numberOfMatches; + + public static final String SERIALIZED_NAME_MATCH_RATE = "matchRate"; + @SerializedName(SERIALIZED_NAME_MATCH_RATE) + private Double matchRate; + + public ContactListStatisticsEntityV1() { + } + + public ContactListStatisticsEntityV1 numberOfIdentifiers(Integer numberOfIdentifiers) { + + this.numberOfIdentifiers = numberOfIdentifiers; + return this; + } + + /** + * Number of identifiers in the contact list. + * @return numberOfIdentifiers + **/ + @javax.annotation.Nullable + + public Integer getNumberOfIdentifiers() { + return numberOfIdentifiers; + } + + + public void setNumberOfIdentifiers(Integer numberOfIdentifiers) { + this.numberOfIdentifiers = numberOfIdentifiers; + } + + + public ContactListStatisticsEntityV1 numberOfMatches(Integer numberOfMatches) { + + this.numberOfMatches = numberOfMatches; + return this; + } + + /** + * Number of matched identifiers in the contact list. + * @return numberOfMatches + **/ + @javax.annotation.Nullable + + public Integer getNumberOfMatches() { + return numberOfMatches; + } + + + public void setNumberOfMatches(Integer numberOfMatches) { + this.numberOfMatches = numberOfMatches; + } + + + public ContactListStatisticsEntityV1 matchRate(Double matchRate) { + + this.matchRate = matchRate; + return this; + } + + /** + * Percentage of matched identifiers in the contact list. Can differ from matches/identifiers depending on the contact list type. + * @return matchRate + **/ + @javax.annotation.Nullable + + public Double getMatchRate() { + return matchRate; + } + + + public void setMatchRate(Double matchRate) { + this.matchRate = matchRate; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ContactListStatisticsEntityV1 instance itself + */ + public ContactListStatisticsEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContactListStatisticsEntityV1 contactListStatisticsEntityV1 = (ContactListStatisticsEntityV1) o; + return Objects.equals(this.numberOfIdentifiers, contactListStatisticsEntityV1.numberOfIdentifiers) && + Objects.equals(this.numberOfMatches, contactListStatisticsEntityV1.numberOfMatches) && + Objects.equals(this.matchRate, contactListStatisticsEntityV1.matchRate)&& + Objects.equals(this.additionalProperties, contactListStatisticsEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(numberOfIdentifiers, numberOfMatches, matchRate, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContactListStatisticsEntityV1 {\n"); + sb.append(" numberOfIdentifiers: ").append(toIndentedString(numberOfIdentifiers)).append("\n"); + sb.append(" numberOfMatches: ").append(toIndentedString(numberOfMatches)).append("\n"); + sb.append(" matchRate: ").append(toIndentedString(matchRate)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("numberOfIdentifiers"); + openapiFields.add("numberOfMatches"); + openapiFields.add("matchRate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ContactListStatisticsEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ContactListStatisticsEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ContactListStatisticsEntityV1 is not found in the empty JSON string", ContactListStatisticsEntityV1.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContactListStatisticsEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ContactListStatisticsEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ContactListStatisticsEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ContactListStatisticsEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ContactListStatisticsEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ContactListStatisticsEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ContactListStatisticsEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContactListStatisticsEntityV1 + * @throws IOException if the JSON string is invalid with respect to ContactListStatisticsEntityV1 + */ + public static ContactListStatisticsEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ContactListStatisticsEntityV1.class); + } + + /** + * Convert an instance of ContactListStatisticsEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1Resource.java new file mode 100644 index 00000000..f9a3796e --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.ContactListStatisticsEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContactListStatisticsEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private ContactListStatisticsEntityV1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public ContactListStatisticsEntityV1Resource() { + } + + public ContactListStatisticsEntityV1Resource attributes(ContactListStatisticsEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public ContactListStatisticsEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(ContactListStatisticsEntityV1 attributes) { + this.attributes = attributes; + } + + + public ContactListStatisticsEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public ContactListStatisticsEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ContactListStatisticsEntityV1Resource instance itself + */ + public ContactListStatisticsEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContactListStatisticsEntityV1Resource contactListStatisticsEntityV1Resource = (ContactListStatisticsEntityV1Resource) o; + return Objects.equals(this.attributes, contactListStatisticsEntityV1Resource.attributes) && + Objects.equals(this.id, contactListStatisticsEntityV1Resource.id) && + Objects.equals(this.type, contactListStatisticsEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, contactListStatisticsEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContactListStatisticsEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ContactListStatisticsEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ContactListStatisticsEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ContactListStatisticsEntityV1Resource is not found in the empty JSON string", ContactListStatisticsEntityV1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + ContactListStatisticsEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContactListStatisticsEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ContactListStatisticsEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ContactListStatisticsEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ContactListStatisticsEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ContactListStatisticsEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ContactListStatisticsEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ContactListStatisticsEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContactListStatisticsEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to ContactListStatisticsEntityV1Resource + */ + public static ContactListStatisticsEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ContactListStatisticsEntityV1Resource.class); + } + + /** + * Convert an instance of ContactListStatisticsEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1Response.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1Response.java new file mode 100644 index 00000000..62008e38 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListStatisticsEntityV1Response.java @@ -0,0 +1,375 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.ContactListStatisticsEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single entity + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContactListStatisticsEntityV1Response { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ContactListStatisticsEntityV1Resource data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public ContactListStatisticsEntityV1Response() { + } + + + public ContactListStatisticsEntityV1Response( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public ContactListStatisticsEntityV1Response data(ContactListStatisticsEntityV1Resource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ContactListStatisticsEntityV1Resource getData() { + return data; + } + + + public void setData(ContactListStatisticsEntityV1Resource data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ContactListStatisticsEntityV1Response instance itself + */ + public ContactListStatisticsEntityV1Response putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContactListStatisticsEntityV1Response contactListStatisticsEntityV1Response = (ContactListStatisticsEntityV1Response) o; + return Objects.equals(this.data, contactListStatisticsEntityV1Response.data) && + Objects.equals(this.warnings, contactListStatisticsEntityV1Response.warnings) && + Objects.equals(this.errors, contactListStatisticsEntityV1Response.errors)&& + Objects.equals(this.additionalProperties, contactListStatisticsEntityV1Response.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContactListStatisticsEntityV1Response {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ContactListStatisticsEntityV1Response + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ContactListStatisticsEntityV1Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ContactListStatisticsEntityV1Response is not found in the empty JSON string", ContactListStatisticsEntityV1Response.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ContactListStatisticsEntityV1Resource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContactListStatisticsEntityV1Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ContactListStatisticsEntityV1Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ContactListStatisticsEntityV1Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ContactListStatisticsEntityV1Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ContactListStatisticsEntityV1Response read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ContactListStatisticsEntityV1Response instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ContactListStatisticsEntityV1Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContactListStatisticsEntityV1Response + * @throws IOException if the JSON string is invalid with respect to ContactListStatisticsEntityV1Response + */ + public static ContactListStatisticsEntityV1Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ContactListStatisticsEntityV1Response.class); + } + + /** + * Convert an instance of ContactListStatisticsEntityV1Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListV1.java new file mode 100644 index 00000000..ec8ea107 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactListV1.java @@ -0,0 +1,289 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target users with your contact lists. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ContactListV1 { + public static final String SERIALIZED_NAME_IS_READ_ONLY = "isReadOnly"; + @SerializedName(SERIALIZED_NAME_IS_READ_ONLY) + private Boolean isReadOnly; + + public ContactListV1() { + } + + public ContactListV1 isReadOnly(Boolean isReadOnly) { + + this.isReadOnly = isReadOnly; + return this; + } + + /** + * Is the segment read-only + * @return isReadOnly + **/ + @javax.annotation.Nullable + + public Boolean getIsReadOnly() { + return isReadOnly; + } + + + public void setIsReadOnly(Boolean isReadOnly) { + this.isReadOnly = isReadOnly; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ContactListV1 instance itself + */ + public ContactListV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ContactListV1 contactListV1 = (ContactListV1) o; + return Objects.equals(this.isReadOnly, contactListV1.isReadOnly)&& + Objects.equals(this.additionalProperties, contactListV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(isReadOnly, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContactListV1 {\n"); + sb.append(" isReadOnly: ").append(toIndentedString(isReadOnly)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("isReadOnly"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ContactListV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ContactListV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ContactListV1 is not found in the empty JSON string", ContactListV1.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ContactListV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ContactListV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ContactListV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ContactListV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ContactListV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ContactListV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ContactListV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ContactListV1 + * @throws IOException if the JSON string is invalid with respect to ContactListV1 + */ + public static ContactListV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ContactListV1.class); + } + + /** + * Convert an instance of ContactListV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistAmendment.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistAmendment.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistAmendment.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistAmendment.java index 8f040155..724e0788 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistAmendment.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistAmendment.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.ContactlistAmendmentAttributes; +import com.criteo.api.marketingsolutions.v2024_07.model.ContactlistAmendmentAttributes; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Parameters for the amendment of a contactlist diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistAmendmentAttributes.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistAmendmentAttributes.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistAmendmentAttributes.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistAmendmentAttributes.java index 17c897e5..f162d0ff 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistAmendmentAttributes.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistAmendmentAttributes.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * the name of the entity type @@ -115,7 +115,9 @@ public enum IdentifierTypeEnum { GUM("gum"), - CUSTOMERID("customerid"); + CUSTOMERID("customerid"), + + PHONENUMBER("phoneNumber"); private String value; diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistAmendmentRequest.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistAmendmentRequest.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistAmendmentRequest.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistAmendmentRequest.java index 17d612d3..abbb374d 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistAmendmentRequest.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistAmendmentRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.ContactlistAmendment; +import com.criteo.api.marketingsolutions.v2024_07.model.ContactlistAmendment; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Request for a contactlist amendment diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistOperation.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistOperation.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistOperation.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistOperation.java index 0be38312..bd3a6f79 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistOperation.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistOperation.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.ContactlistOperationAttributes; +import com.criteo.api.marketingsolutions.v2024_07.model.ContactlistOperationAttributes; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Response definition of a contactlist operation diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistOperationAttributes.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistOperationAttributes.java similarity index 99% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistOperationAttributes.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistOperationAttributes.java index cb109053..67f4e9f1 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ContactlistOperationAttributes.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ContactlistOperationAttributes.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * the contactlist operation attributes diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Coupon.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Coupon.java new file mode 100644 index 00000000..7705d33e --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Coupon.java @@ -0,0 +1,721 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.ImageSlide; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Coupons are static images applied on ad set which can be displayed within an ad and link to a landing page. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Coupon { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_AUTHOR = "author"; + @SerializedName(SERIALIZED_NAME_AUTHOR) + private String author; + + public static final String SERIALIZED_NAME_ADVERTISER_ID = "advertiserId"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_ID) + private String advertiserId; + + public static final String SERIALIZED_NAME_AD_SET_ID = "adSetId"; + @SerializedName(SERIALIZED_NAME_AD_SET_ID) + private String adSetId; + + public static final String SERIALIZED_NAME_LANDING_PAGE_URL = "landingPageUrl"; + @SerializedName(SERIALIZED_NAME_LANDING_PAGE_URL) + private String landingPageUrl; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private String endDate; + + public static final String SERIALIZED_NAME_FORMAT = "format"; + @SerializedName(SERIALIZED_NAME_FORMAT) + private String format; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_IMAGES = "images"; + @SerializedName(SERIALIZED_NAME_IMAGES) + private List images = null; + + public static final String SERIALIZED_NAME_SHOW_EVERY = "showEvery"; + @SerializedName(SERIALIZED_NAME_SHOW_EVERY) + private Integer showEvery; + + public static final String SERIALIZED_NAME_SHOW_DURATION = "showDuration"; + @SerializedName(SERIALIZED_NAME_SHOW_DURATION) + private Integer showDuration; + + public static final String SERIALIZED_NAME_ROTATIONS_NUMBER = "rotationsNumber"; + @SerializedName(SERIALIZED_NAME_ROTATIONS_NUMBER) + private Integer rotationsNumber; + + public Coupon() { + } + + public Coupon name(String name) { + + this.name = name; + return this; + } + + /** + * The name of the Coupon + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public Coupon description(String description) { + + this.description = description; + return this; + } + + /** + * The description of the Coupon + * @return description + **/ + @javax.annotation.Nullable + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public Coupon author(String author) { + + this.author = author; + return this; + } + + /** + * The login of the person who created this Coupon + * @return author + **/ + @javax.annotation.Nullable + + public String getAuthor() { + return author; + } + + + public void setAuthor(String author) { + this.author = author; + } + + + public Coupon advertiserId(String advertiserId) { + + this.advertiserId = advertiserId; + return this; + } + + /** + * Advertiser linked to the Coupon + * @return advertiserId + **/ + @javax.annotation.Nullable + + public String getAdvertiserId() { + return advertiserId; + } + + + public void setAdvertiserId(String advertiserId) { + this.advertiserId = advertiserId; + } + + + public Coupon adSetId(String adSetId) { + + this.adSetId = adSetId; + return this; + } + + /** + * The id of the Ad Set on which the Coupon is applied to + * @return adSetId + **/ + @javax.annotation.Nullable + + public String getAdSetId() { + return adSetId; + } + + + public void setAdSetId(String adSetId) { + this.adSetId = adSetId; + } + + + public Coupon landingPageUrl(String landingPageUrl) { + + this.landingPageUrl = landingPageUrl; + return this; + } + + /** + * Web redirection of the landing page url + * @return landingPageUrl + **/ + @javax.annotation.Nullable + + public String getLandingPageUrl() { + return landingPageUrl; + } + + + public void setLandingPageUrl(String landingPageUrl) { + this.landingPageUrl = landingPageUrl; + } + + + public Coupon startDate(String startDate) { + + this.startDate = startDate; + return this; + } + + /** + * The date when the Coupon will be launched String must be in ISO8601 format + * @return startDate + **/ + @javax.annotation.Nullable + + public String getStartDate() { + return startDate; + } + + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + + public Coupon endDate(String endDate) { + + this.endDate = endDate; + return this; + } + + /** + * The date when when we will stop to show this Coupon. If the end date is not specified (i.e. null) then the Coupon will go on forever String must be in ISO8601 format + * @return endDate + **/ + @javax.annotation.Nullable + + public String getEndDate() { + return endDate; + } + + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + + public Coupon format(String format) { + + this.format = format; + return this; + } + + /** + * Format of the Coupon, it can have two values: \"FullFrame\" or \"LogoZone\" + * @return format + **/ + @javax.annotation.Nullable + + public String getFormat() { + return format; + } + + + public void setFormat(String format) { + this.format = format; + } + + + public Coupon status(String status) { + + this.status = status; + return this; + } + + /** + * The status of the Coupon + * @return status + **/ + @javax.annotation.Nullable + + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + public Coupon images(List images) { + + this.images = images; + return this; + } + + public Coupon addImagesItem(ImageSlide imagesItem) { + if (this.images == null) { + this.images = null; + } + this.images.add(imagesItem); + return this; + } + + /** + * List of slides containing the image URLs + * @return images + **/ + @javax.annotation.Nullable + + public List getImages() { + return images; + } + + + public void setImages(List images) { + this.images = images; + } + + + public Coupon showEvery(Integer showEvery) { + + this.showEvery = showEvery; + return this; + } + + /** + * Show the Coupon every N seconds (between 1 and 10) + * @return showEvery + **/ + @javax.annotation.Nullable + + public Integer getShowEvery() { + return showEvery; + } + + + public void setShowEvery(Integer showEvery) { + this.showEvery = showEvery; + } + + + public Coupon showDuration(Integer showDuration) { + + this.showDuration = showDuration; + return this; + } + + /** + * Show Coupon for a duration of N seconds (between 1 and 5) + * @return showDuration + **/ + @javax.annotation.Nullable + + public Integer getShowDuration() { + return showDuration; + } + + + public void setShowDuration(Integer showDuration) { + this.showDuration = showDuration; + } + + + public Coupon rotationsNumber(Integer rotationsNumber) { + + this.rotationsNumber = rotationsNumber; + return this; + } + + /** + * Number of rotations for the Coupons (from 1 to 10 times) + * @return rotationsNumber + **/ + @javax.annotation.Nullable + + public Integer getRotationsNumber() { + return rotationsNumber; + } + + + public void setRotationsNumber(Integer rotationsNumber) { + this.rotationsNumber = rotationsNumber; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Coupon instance itself + */ + public Coupon putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Coupon coupon = (Coupon) o; + return Objects.equals(this.name, coupon.name) && + Objects.equals(this.description, coupon.description) && + Objects.equals(this.author, coupon.author) && + Objects.equals(this.advertiserId, coupon.advertiserId) && + Objects.equals(this.adSetId, coupon.adSetId) && + Objects.equals(this.landingPageUrl, coupon.landingPageUrl) && + Objects.equals(this.startDate, coupon.startDate) && + Objects.equals(this.endDate, coupon.endDate) && + Objects.equals(this.format, coupon.format) && + Objects.equals(this.status, coupon.status) && + Objects.equals(this.images, coupon.images) && + Objects.equals(this.showEvery, coupon.showEvery) && + Objects.equals(this.showDuration, coupon.showDuration) && + Objects.equals(this.rotationsNumber, coupon.rotationsNumber)&& + Objects.equals(this.additionalProperties, coupon.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, author, advertiserId, adSetId, landingPageUrl, startDate, endDate, format, status, images, showEvery, showDuration, rotationsNumber, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Coupon {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n"); + sb.append(" adSetId: ").append(toIndentedString(adSetId)).append("\n"); + sb.append(" landingPageUrl: ").append(toIndentedString(landingPageUrl)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" format: ").append(toIndentedString(format)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" images: ").append(toIndentedString(images)).append("\n"); + sb.append(" showEvery: ").append(toIndentedString(showEvery)).append("\n"); + sb.append(" showDuration: ").append(toIndentedString(showDuration)).append("\n"); + sb.append(" rotationsNumber: ").append(toIndentedString(rotationsNumber)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("author"); + openapiFields.add("advertiserId"); + openapiFields.add("adSetId"); + openapiFields.add("landingPageUrl"); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + openapiFields.add("format"); + openapiFields.add("status"); + openapiFields.add("images"); + openapiFields.add("showEvery"); + openapiFields.add("showDuration"); + openapiFields.add("rotationsNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to Coupon + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!Coupon.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Coupon is not found in the empty JSON string", Coupon.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("author") != null && !jsonObj.get("author").isJsonNull()) && !jsonObj.get("author").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `author` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author").toString())); + } + if ((jsonObj.get("advertiserId") != null && !jsonObj.get("advertiserId").isJsonNull()) && !jsonObj.get("advertiserId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("advertiserId").toString())); + } + if ((jsonObj.get("adSetId") != null && !jsonObj.get("adSetId").isJsonNull()) && !jsonObj.get("adSetId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `adSetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("adSetId").toString())); + } + if ((jsonObj.get("landingPageUrl") != null && !jsonObj.get("landingPageUrl").isJsonNull()) && !jsonObj.get("landingPageUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `landingPageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("landingPageUrl").toString())); + } + if ((jsonObj.get("startDate") != null && !jsonObj.get("startDate").isJsonNull()) && !jsonObj.get("startDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `startDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("startDate").toString())); + } + if ((jsonObj.get("endDate") != null && !jsonObj.get("endDate").isJsonNull()) && !jsonObj.get("endDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); + } + if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (jsonObj.get("images") != null && !jsonObj.get("images").isJsonNull()) { + JsonArray jsonArrayimages = jsonObj.getAsJsonArray("images"); + if (jsonArrayimages != null) { + // ensure the json data is an array + if (!jsonObj.get("images").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `images` to be an array in the JSON string but got `%s`", jsonObj.get("images").toString())); + } + + // validate the optional field `images` (array) + for (int i = 0; i < jsonArrayimages.size(); i++) { + ImageSlide.validateJsonObject(jsonArrayimages.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Coupon.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Coupon' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Coupon.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Coupon value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Coupon read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + Coupon instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Coupon given an JSON string + * + * @param jsonString JSON string + * @return An instance of Coupon + * @throws IOException if the JSON string is invalid with respect to Coupon + */ + public static Coupon fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Coupon.class); + } + + /** + * Convert an instance of Coupon to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponListResponse.java new file mode 100644 index 00000000..71774cc3 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponListResponse.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.CouponResource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for a list of response resources + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CouponListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public CouponListResponse() { + } + + + public CouponListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public CouponListResponse data(List data) { + + this.data = data; + return this; + } + + public CouponListResponse addDataItem(CouponResource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CouponListResponse instance itself + */ + public CouponListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CouponListResponse couponListResponse = (CouponListResponse) o; + return Objects.equals(this.data, couponListResponse.data) && + Objects.equals(this.warnings, couponListResponse.warnings) && + Objects.equals(this.errors, couponListResponse.errors)&& + Objects.equals(this.additionalProperties, couponListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CouponListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CouponListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CouponListResponse is not found in the empty JSON string", CouponListResponse.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + CouponResource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CouponListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CouponListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CouponListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CouponListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CouponListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CouponListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CouponListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CouponListResponse + * @throws IOException if the JSON string is invalid with respect to CouponListResponse + */ + public static CouponListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CouponListResponse.class); + } + + /** + * Convert an instance of CouponListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponResource.java new file mode 100644 index 00000000..202f6b1c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponResource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.Coupon; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CouponResource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private Coupon attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public CouponResource() { + } + + public CouponResource attributes(Coupon attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public Coupon getAttributes() { + return attributes; + } + + + public void setAttributes(Coupon attributes) { + this.attributes = attributes; + } + + + public CouponResource id(String id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public CouponResource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CouponResource instance itself + */ + public CouponResource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CouponResource couponResource = (CouponResource) o; + return Objects.equals(this.attributes, couponResource.attributes) && + Objects.equals(this.id, couponResource.id) && + Objects.equals(this.type, couponResource.type)&& + Objects.equals(this.additionalProperties, couponResource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CouponResource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CouponResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CouponResource is not found in the empty JSON string", CouponResource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + Coupon.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CouponResource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CouponResource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CouponResource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CouponResource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CouponResource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CouponResource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CouponResource given an JSON string + * + * @param jsonString JSON string + * @return An instance of CouponResource + * @throws IOException if the JSON string is invalid with respect to CouponResource + */ + public static CouponResource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CouponResource.class); + } + + /** + * Convert an instance of CouponResource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponResponse.java new file mode 100644 index 00000000..e5251108 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponResponse.java @@ -0,0 +1,375 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.CouponResource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for response resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CouponResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CouponResource data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public CouponResponse() { + } + + + public CouponResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public CouponResponse data(CouponResource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public CouponResource getData() { + return data; + } + + + public void setData(CouponResource data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CouponResponse instance itself + */ + public CouponResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CouponResponse couponResponse = (CouponResponse) o; + return Objects.equals(this.data, couponResponse.data) && + Objects.equals(this.warnings, couponResponse.warnings) && + Objects.equals(this.errors, couponResponse.errors)&& + Objects.equals(this.additionalProperties, couponResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CouponResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CouponResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CouponResponse is not found in the empty JSON string", CouponResponse.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CouponResource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CouponResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CouponResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CouponResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CouponResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CouponResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CouponResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CouponResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CouponResponse + * @throws IOException if the JSON string is invalid with respect to CouponResponse + */ + public static CouponResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CouponResponse.class); + } + + /** + * Convert an instance of CouponResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizes.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizes.java new file mode 100644 index 00000000..421a7dd7 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizes.java @@ -0,0 +1,344 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Entity containing the list of Coupon supported sizes + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CouponSupportedSizes { + public static final String SERIALIZED_NAME_LOGO_ZONE = "logoZone"; + @SerializedName(SERIALIZED_NAME_LOGO_ZONE) + private List logoZone = null; + + public static final String SERIALIZED_NAME_FULL_FRAME = "fullFrame"; + @SerializedName(SERIALIZED_NAME_FULL_FRAME) + private List fullFrame = null; + + public CouponSupportedSizes() { + } + + public CouponSupportedSizes logoZone(List logoZone) { + + this.logoZone = logoZone; + return this; + } + + public CouponSupportedSizes addLogoZoneItem(String logoZoneItem) { + if (this.logoZone == null) { + this.logoZone = null; + } + this.logoZone.add(logoZoneItem); + return this; + } + + /** + * Array of LogoZone sizes as string in width x height format + * @return logoZone + **/ + @javax.annotation.Nullable + + public List getLogoZone() { + return logoZone; + } + + + public void setLogoZone(List logoZone) { + this.logoZone = logoZone; + } + + + public CouponSupportedSizes fullFrame(List fullFrame) { + + this.fullFrame = fullFrame; + return this; + } + + public CouponSupportedSizes addFullFrameItem(String fullFrameItem) { + if (this.fullFrame == null) { + this.fullFrame = null; + } + this.fullFrame.add(fullFrameItem); + return this; + } + + /** + * Array of FullFrame sizes as string in width x height format + * @return fullFrame + **/ + @javax.annotation.Nullable + + public List getFullFrame() { + return fullFrame; + } + + + public void setFullFrame(List fullFrame) { + this.fullFrame = fullFrame; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CouponSupportedSizes instance itself + */ + public CouponSupportedSizes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CouponSupportedSizes couponSupportedSizes = (CouponSupportedSizes) o; + return Objects.equals(this.logoZone, couponSupportedSizes.logoZone) && + Objects.equals(this.fullFrame, couponSupportedSizes.fullFrame)&& + Objects.equals(this.additionalProperties, couponSupportedSizes.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(logoZone, fullFrame, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponSupportedSizes {\n"); + sb.append(" logoZone: ").append(toIndentedString(logoZone)).append("\n"); + sb.append(" fullFrame: ").append(toIndentedString(fullFrame)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("logoZone"); + openapiFields.add("fullFrame"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CouponSupportedSizes + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CouponSupportedSizes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CouponSupportedSizes is not found in the empty JSON string", CouponSupportedSizes.openapiRequiredFields.toString())); + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("logoZone") != null && !jsonObj.get("logoZone").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `logoZone` to be an array in the JSON string but got `%s`", jsonObj.get("logoZone").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("fullFrame") != null && !jsonObj.get("fullFrame").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `fullFrame` to be an array in the JSON string but got `%s`", jsonObj.get("fullFrame").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CouponSupportedSizes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CouponSupportedSizes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CouponSupportedSizes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CouponSupportedSizes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CouponSupportedSizes read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CouponSupportedSizes instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CouponSupportedSizes given an JSON string + * + * @param jsonString JSON string + * @return An instance of CouponSupportedSizes + * @throws IOException if the JSON string is invalid with respect to CouponSupportedSizes + */ + public static CouponSupportedSizes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CouponSupportedSizes.class); + } + + /** + * Convert an instance of CouponSupportedSizes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizesResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizesResource.java new file mode 100644 index 00000000..a704f3f9 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizesResource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CouponSupportedSizes; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CouponSupportedSizesResource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CouponSupportedSizes attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public CouponSupportedSizesResource() { + } + + public CouponSupportedSizesResource attributes(CouponSupportedSizes attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public CouponSupportedSizes getAttributes() { + return attributes; + } + + + public void setAttributes(CouponSupportedSizes attributes) { + this.attributes = attributes; + } + + + public CouponSupportedSizesResource id(String id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public CouponSupportedSizesResource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CouponSupportedSizesResource instance itself + */ + public CouponSupportedSizesResource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CouponSupportedSizesResource couponSupportedSizesResource = (CouponSupportedSizesResource) o; + return Objects.equals(this.attributes, couponSupportedSizesResource.attributes) && + Objects.equals(this.id, couponSupportedSizesResource.id) && + Objects.equals(this.type, couponSupportedSizesResource.type)&& + Objects.equals(this.additionalProperties, couponSupportedSizesResource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponSupportedSizesResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CouponSupportedSizesResource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CouponSupportedSizesResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CouponSupportedSizesResource is not found in the empty JSON string", CouponSupportedSizesResource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + CouponSupportedSizes.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CouponSupportedSizesResource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CouponSupportedSizesResource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CouponSupportedSizesResource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CouponSupportedSizesResource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CouponSupportedSizesResource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CouponSupportedSizesResource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CouponSupportedSizesResource given an JSON string + * + * @param jsonString JSON string + * @return An instance of CouponSupportedSizesResource + * @throws IOException if the JSON string is invalid with respect to CouponSupportedSizesResource + */ + public static CouponSupportedSizesResource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CouponSupportedSizesResource.class); + } + + /** + * Convert an instance of CouponSupportedSizesResource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizesResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizesResponse.java new file mode 100644 index 00000000..d75388db --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CouponSupportedSizesResponse.java @@ -0,0 +1,375 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.CouponSupportedSizesResource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for response resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CouponSupportedSizesResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CouponSupportedSizesResource data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public CouponSupportedSizesResponse() { + } + + + public CouponSupportedSizesResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public CouponSupportedSizesResponse data(CouponSupportedSizesResource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public CouponSupportedSizesResource getData() { + return data; + } + + + public void setData(CouponSupportedSizesResource data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CouponSupportedSizesResponse instance itself + */ + public CouponSupportedSizesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CouponSupportedSizesResponse couponSupportedSizesResponse = (CouponSupportedSizesResponse) o; + return Objects.equals(this.data, couponSupportedSizesResponse.data) && + Objects.equals(this.warnings, couponSupportedSizesResponse.warnings) && + Objects.equals(this.errors, couponSupportedSizesResponse.errors)&& + Objects.equals(this.additionalProperties, couponSupportedSizesResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CouponSupportedSizesResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CouponSupportedSizesResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CouponSupportedSizesResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CouponSupportedSizesResponse is not found in the empty JSON string", CouponSupportedSizesResponse.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CouponSupportedSizesResource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CouponSupportedSizesResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CouponSupportedSizesResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CouponSupportedSizesResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CouponSupportedSizesResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CouponSupportedSizesResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CouponSupportedSizesResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CouponSupportedSizesResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CouponSupportedSizesResponse + * @throws IOException if the JSON string is invalid with respect to CouponSupportedSizesResponse + */ + public static CouponSupportedSizesResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CouponSupportedSizesResponse.class); + } + + /** + * Convert an instance of CouponSupportedSizesResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetBiddingV24Q1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetBiddingV24Q1.java new file mode 100644 index 00000000..5e947139 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetBiddingV24Q1.java @@ -0,0 +1,390 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * ad set bidding create model + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAdSetBiddingV24Q1 { + public static final String SERIALIZED_NAME_BID_AMOUNT = "bidAmount"; + @SerializedName(SERIALIZED_NAME_BID_AMOUNT) + private Double bidAmount; + + /** + * How spend is controlled + */ + @JsonAdapter(CostControllerEnum.Adapter.class) + public enum CostControllerEnum { + COS("COS"), + + CPC("CPC"), + + CPI("CPI"), + + CPM("CPM"), + + CPO("CPO"), + + CPSV("CPSV"), + + CPV("CPV"), + + DAILYBUDGET("dailyBudget"), + + TARGETCPM("targetCPM"); + + private String value; + + CostControllerEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CostControllerEnum fromValue(String value) { + for (CostControllerEnum b : CostControllerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CostControllerEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CostControllerEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CostControllerEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_COST_CONTROLLER = "costController"; + @SerializedName(SERIALIZED_NAME_COST_CONTROLLER) + private CostControllerEnum costController; + + public CreateAdSetBiddingV24Q1() { + } + + public CreateAdSetBiddingV24Q1 bidAmount(Double bidAmount) { + + this.bidAmount = bidAmount; + return this; + } + + /** + * Decimal value target relating to the `bidStrategy` specified. May be `null` for strategies that do not require a target value. At most 4 decimals are supported. Additional decimals are rounded. + * @return bidAmount + **/ + @javax.annotation.Nullable + + public Double getBidAmount() { + return bidAmount; + } + + + public void setBidAmount(Double bidAmount) { + this.bidAmount = bidAmount; + } + + + public CreateAdSetBiddingV24Q1 costController(CostControllerEnum costController) { + + this.costController = costController; + return this; + } + + /** + * How spend is controlled + * @return costController + **/ + @javax.annotation.Nonnull + + public CostControllerEnum getCostController() { + return costController; + } + + + public void setCostController(CostControllerEnum costController) { + this.costController = costController; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateAdSetBiddingV24Q1 instance itself + */ + public CreateAdSetBiddingV24Q1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdSetBiddingV24Q1 createAdSetBiddingV24Q1 = (CreateAdSetBiddingV24Q1) o; + return Objects.equals(this.bidAmount, createAdSetBiddingV24Q1.bidAmount) && + Objects.equals(this.costController, createAdSetBiddingV24Q1.costController)&& + Objects.equals(this.additionalProperties, createAdSetBiddingV24Q1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(bidAmount, costController, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAdSetBiddingV24Q1 {\n"); + sb.append(" bidAmount: ").append(toIndentedString(bidAmount)).append("\n"); + sb.append(" costController: ").append(toIndentedString(costController)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("bidAmount"); + openapiFields.add("costController"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("costController"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateAdSetBiddingV24Q1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateAdSetBiddingV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAdSetBiddingV24Q1 is not found in the empty JSON string", CreateAdSetBiddingV24Q1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateAdSetBiddingV24Q1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("costController").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `costController` to be a primitive type in the JSON string but got `%s`", jsonObj.get("costController").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAdSetBiddingV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAdSetBiddingV24Q1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAdSetBiddingV24Q1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAdSetBiddingV24Q1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateAdSetBiddingV24Q1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateAdSetBiddingV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAdSetBiddingV24Q1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAdSetBiddingV24Q1 + * @throws IOException if the JSON string is invalid with respect to CreateAdSetBiddingV24Q1 + */ + public static CreateAdSetBiddingV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAdSetBiddingV24Q1.class); + } + + /** + * Convert an instance of CreateAdSetBiddingV24Q1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetBudgetV24Q1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetBudgetV24Q1.java new file mode 100644 index 00000000..08710361 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetBudgetV24Q1.java @@ -0,0 +1,631 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * ad set budget create model + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAdSetBudgetV24Q1 { + /** + * Gets or Sets budgetStrategy + */ + @JsonAdapter(BudgetStrategyEnum.Adapter.class) + public enum BudgetStrategyEnum { + CAPPED("capped"), + + UNCAPPED("uncapped"); + + private String value; + + BudgetStrategyEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BudgetStrategyEnum fromValue(String value) { + for (BudgetStrategyEnum b : BudgetStrategyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BudgetStrategyEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BudgetStrategyEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BudgetStrategyEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_BUDGET_STRATEGY = "budgetStrategy"; + @SerializedName(SERIALIZED_NAME_BUDGET_STRATEGY) + private BudgetStrategyEnum budgetStrategy; + + /** + * Gets or Sets budgetRenewal + */ + @JsonAdapter(BudgetRenewalEnum.Adapter.class) + public enum BudgetRenewalEnum { + UNDEFINED("undefined"), + + DAILY("daily"), + + MONTHLY("monthly"), + + LIFETIME("lifetime"), + + WEEKLY("weekly"); + + private String value; + + BudgetRenewalEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BudgetRenewalEnum fromValue(String value) { + for (BudgetRenewalEnum b : BudgetRenewalEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BudgetRenewalEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BudgetRenewalEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BudgetRenewalEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_BUDGET_RENEWAL = "budgetRenewal"; + @SerializedName(SERIALIZED_NAME_BUDGET_RENEWAL) + private BudgetRenewalEnum budgetRenewal; + + /** + * Gets or Sets budgetDeliverySmoothing + */ + @JsonAdapter(BudgetDeliverySmoothingEnum.Adapter.class) + public enum BudgetDeliverySmoothingEnum { + ACCELERATED("accelerated"), + + STANDARD("standard"); + + private String value; + + BudgetDeliverySmoothingEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BudgetDeliverySmoothingEnum fromValue(String value) { + for (BudgetDeliverySmoothingEnum b : BudgetDeliverySmoothingEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BudgetDeliverySmoothingEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BudgetDeliverySmoothingEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BudgetDeliverySmoothingEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_BUDGET_DELIVERY_SMOOTHING = "budgetDeliverySmoothing"; + @SerializedName(SERIALIZED_NAME_BUDGET_DELIVERY_SMOOTHING) + private BudgetDeliverySmoothingEnum budgetDeliverySmoothing; + + /** + * Gets or Sets budgetDeliveryWeek + */ + @JsonAdapter(BudgetDeliveryWeekEnum.Adapter.class) + public enum BudgetDeliveryWeekEnum { + UNDEFINED("undefined"), + + MONDAYTOSUNDAY("mondayToSunday"), + + TUESDAYTOMONDAY("tuesdayToMonday"), + + WEDNESDAYTOTUESDAY("wednesdayToTuesday"), + + THURSDAYTOWEDNESDAY("thursdayToWednesday"), + + FRIDAYTOTHURSDAY("fridayToThursday"), + + SATURDAYTOFRIDAY("saturdayToFriday"), + + SUNDAYTOSATURDAY("sundayToSaturday"); + + private String value; + + BudgetDeliveryWeekEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BudgetDeliveryWeekEnum fromValue(String value) { + for (BudgetDeliveryWeekEnum b : BudgetDeliveryWeekEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BudgetDeliveryWeekEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BudgetDeliveryWeekEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BudgetDeliveryWeekEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_BUDGET_DELIVERY_WEEK = "budgetDeliveryWeek"; + @SerializedName(SERIALIZED_NAME_BUDGET_DELIVERY_WEEK) + private BudgetDeliveryWeekEnum budgetDeliveryWeek; + + public static final String SERIALIZED_NAME_BUDGET_AMOUNT = "budgetAmount"; + @SerializedName(SERIALIZED_NAME_BUDGET_AMOUNT) + private Double budgetAmount; + + public CreateAdSetBudgetV24Q1() { + } + + public CreateAdSetBudgetV24Q1 budgetStrategy(BudgetStrategyEnum budgetStrategy) { + + this.budgetStrategy = budgetStrategy; + return this; + } + + /** + * Get budgetStrategy + * @return budgetStrategy + **/ + @javax.annotation.Nonnull + + public BudgetStrategyEnum getBudgetStrategy() { + return budgetStrategy; + } + + + public void setBudgetStrategy(BudgetStrategyEnum budgetStrategy) { + this.budgetStrategy = budgetStrategy; + } + + + public CreateAdSetBudgetV24Q1 budgetRenewal(BudgetRenewalEnum budgetRenewal) { + + this.budgetRenewal = budgetRenewal; + return this; + } + + /** + * Get budgetRenewal + * @return budgetRenewal + **/ + @javax.annotation.Nullable + + public BudgetRenewalEnum getBudgetRenewal() { + return budgetRenewal; + } + + + public void setBudgetRenewal(BudgetRenewalEnum budgetRenewal) { + this.budgetRenewal = budgetRenewal; + } + + + public CreateAdSetBudgetV24Q1 budgetDeliverySmoothing(BudgetDeliverySmoothingEnum budgetDeliverySmoothing) { + + this.budgetDeliverySmoothing = budgetDeliverySmoothing; + return this; + } + + /** + * Get budgetDeliverySmoothing + * @return budgetDeliverySmoothing + **/ + @javax.annotation.Nullable + + public BudgetDeliverySmoothingEnum getBudgetDeliverySmoothing() { + return budgetDeliverySmoothing; + } + + + public void setBudgetDeliverySmoothing(BudgetDeliverySmoothingEnum budgetDeliverySmoothing) { + this.budgetDeliverySmoothing = budgetDeliverySmoothing; + } + + + public CreateAdSetBudgetV24Q1 budgetDeliveryWeek(BudgetDeliveryWeekEnum budgetDeliveryWeek) { + + this.budgetDeliveryWeek = budgetDeliveryWeek; + return this; + } + + /** + * Get budgetDeliveryWeek + * @return budgetDeliveryWeek + **/ + @javax.annotation.Nullable + + public BudgetDeliveryWeekEnum getBudgetDeliveryWeek() { + return budgetDeliveryWeek; + } + + + public void setBudgetDeliveryWeek(BudgetDeliveryWeekEnum budgetDeliveryWeek) { + this.budgetDeliveryWeek = budgetDeliveryWeek; + } + + + public CreateAdSetBudgetV24Q1 budgetAmount(Double budgetAmount) { + + this.budgetAmount = budgetAmount; + return this; + } + + /** + * Get budgetAmount + * @return budgetAmount + **/ + @javax.annotation.Nullable + + public Double getBudgetAmount() { + return budgetAmount; + } + + + public void setBudgetAmount(Double budgetAmount) { + this.budgetAmount = budgetAmount; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateAdSetBudgetV24Q1 instance itself + */ + public CreateAdSetBudgetV24Q1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdSetBudgetV24Q1 createAdSetBudgetV24Q1 = (CreateAdSetBudgetV24Q1) o; + return Objects.equals(this.budgetStrategy, createAdSetBudgetV24Q1.budgetStrategy) && + Objects.equals(this.budgetRenewal, createAdSetBudgetV24Q1.budgetRenewal) && + Objects.equals(this.budgetDeliverySmoothing, createAdSetBudgetV24Q1.budgetDeliverySmoothing) && + Objects.equals(this.budgetDeliveryWeek, createAdSetBudgetV24Q1.budgetDeliveryWeek) && + Objects.equals(this.budgetAmount, createAdSetBudgetV24Q1.budgetAmount)&& + Objects.equals(this.additionalProperties, createAdSetBudgetV24Q1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(budgetStrategy, budgetRenewal, budgetDeliverySmoothing, budgetDeliveryWeek, budgetAmount, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAdSetBudgetV24Q1 {\n"); + sb.append(" budgetStrategy: ").append(toIndentedString(budgetStrategy)).append("\n"); + sb.append(" budgetRenewal: ").append(toIndentedString(budgetRenewal)).append("\n"); + sb.append(" budgetDeliverySmoothing: ").append(toIndentedString(budgetDeliverySmoothing)).append("\n"); + sb.append(" budgetDeliveryWeek: ").append(toIndentedString(budgetDeliveryWeek)).append("\n"); + sb.append(" budgetAmount: ").append(toIndentedString(budgetAmount)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("budgetStrategy"); + openapiFields.add("budgetRenewal"); + openapiFields.add("budgetDeliverySmoothing"); + openapiFields.add("budgetDeliveryWeek"); + openapiFields.add("budgetAmount"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("budgetStrategy"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateAdSetBudgetV24Q1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateAdSetBudgetV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAdSetBudgetV24Q1 is not found in the empty JSON string", CreateAdSetBudgetV24Q1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateAdSetBudgetV24Q1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("budgetStrategy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `budgetStrategy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("budgetStrategy").toString())); + } + if ((jsonObj.get("budgetRenewal") != null && !jsonObj.get("budgetRenewal").isJsonNull()) && !jsonObj.get("budgetRenewal").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `budgetRenewal` to be a primitive type in the JSON string but got `%s`", jsonObj.get("budgetRenewal").toString())); + } + if ((jsonObj.get("budgetDeliverySmoothing") != null && !jsonObj.get("budgetDeliverySmoothing").isJsonNull()) && !jsonObj.get("budgetDeliverySmoothing").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `budgetDeliverySmoothing` to be a primitive type in the JSON string but got `%s`", jsonObj.get("budgetDeliverySmoothing").toString())); + } + if ((jsonObj.get("budgetDeliveryWeek") != null && !jsonObj.get("budgetDeliveryWeek").isJsonNull()) && !jsonObj.get("budgetDeliveryWeek").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `budgetDeliveryWeek` to be a primitive type in the JSON string but got `%s`", jsonObj.get("budgetDeliveryWeek").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAdSetBudgetV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAdSetBudgetV24Q1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAdSetBudgetV24Q1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAdSetBudgetV24Q1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateAdSetBudgetV24Q1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateAdSetBudgetV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAdSetBudgetV24Q1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAdSetBudgetV24Q1 + * @throws IOException if the JSON string is invalid with respect to CreateAdSetBudgetV24Q1 + */ + public static CreateAdSetBudgetV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAdSetBudgetV24Q1.class); + } + + /** + * Convert an instance of CreateAdSetBudgetV24Q1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetGeoLocationV24Q1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetGeoLocationV24Q1.java new file mode 100644 index 00000000..6e987546 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetGeoLocationV24Q1.java @@ -0,0 +1,348 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetTargetingRuleV24Q1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Geolocation configuration of the ad set + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAdSetGeoLocationV24Q1 { + public static final String SERIALIZED_NAME_COUNTRIES = "countries"; + @SerializedName(SERIALIZED_NAME_COUNTRIES) + private AdSetTargetingRuleV24Q1 countries; + + public static final String SERIALIZED_NAME_SUBDIVISIONS = "subdivisions"; + @SerializedName(SERIALIZED_NAME_SUBDIVISIONS) + private AdSetTargetingRuleV24Q1 subdivisions; + + public static final String SERIALIZED_NAME_ZIP_CODES = "zipCodes"; + @SerializedName(SERIALIZED_NAME_ZIP_CODES) + private AdSetTargetingRuleV24Q1 zipCodes; + + public CreateAdSetGeoLocationV24Q1() { + } + + public CreateAdSetGeoLocationV24Q1 countries(AdSetTargetingRuleV24Q1 countries) { + + this.countries = countries; + return this; + } + + /** + * Get countries + * @return countries + **/ + @javax.annotation.Nullable + + public AdSetTargetingRuleV24Q1 getCountries() { + return countries; + } + + + public void setCountries(AdSetTargetingRuleV24Q1 countries) { + this.countries = countries; + } + + + public CreateAdSetGeoLocationV24Q1 subdivisions(AdSetTargetingRuleV24Q1 subdivisions) { + + this.subdivisions = subdivisions; + return this; + } + + /** + * Get subdivisions + * @return subdivisions + **/ + @javax.annotation.Nullable + + public AdSetTargetingRuleV24Q1 getSubdivisions() { + return subdivisions; + } + + + public void setSubdivisions(AdSetTargetingRuleV24Q1 subdivisions) { + this.subdivisions = subdivisions; + } + + + public CreateAdSetGeoLocationV24Q1 zipCodes(AdSetTargetingRuleV24Q1 zipCodes) { + + this.zipCodes = zipCodes; + return this; + } + + /** + * Get zipCodes + * @return zipCodes + **/ + @javax.annotation.Nullable + + public AdSetTargetingRuleV24Q1 getZipCodes() { + return zipCodes; + } + + + public void setZipCodes(AdSetTargetingRuleV24Q1 zipCodes) { + this.zipCodes = zipCodes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateAdSetGeoLocationV24Q1 instance itself + */ + public CreateAdSetGeoLocationV24Q1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdSetGeoLocationV24Q1 createAdSetGeoLocationV24Q1 = (CreateAdSetGeoLocationV24Q1) o; + return Objects.equals(this.countries, createAdSetGeoLocationV24Q1.countries) && + Objects.equals(this.subdivisions, createAdSetGeoLocationV24Q1.subdivisions) && + Objects.equals(this.zipCodes, createAdSetGeoLocationV24Q1.zipCodes)&& + Objects.equals(this.additionalProperties, createAdSetGeoLocationV24Q1.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(countries, subdivisions, zipCodes, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAdSetGeoLocationV24Q1 {\n"); + sb.append(" countries: ").append(toIndentedString(countries)).append("\n"); + sb.append(" subdivisions: ").append(toIndentedString(subdivisions)).append("\n"); + sb.append(" zipCodes: ").append(toIndentedString(zipCodes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("countries"); + openapiFields.add("subdivisions"); + openapiFields.add("zipCodes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateAdSetGeoLocationV24Q1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateAdSetGeoLocationV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAdSetGeoLocationV24Q1 is not found in the empty JSON string", CreateAdSetGeoLocationV24Q1.openapiRequiredFields.toString())); + } + } + // validate the optional field `countries` + if (jsonObj.get("countries") != null && !jsonObj.get("countries").isJsonNull()) { + AdSetTargetingRuleV24Q1.validateJsonObject(jsonObj.getAsJsonObject("countries")); + } + // validate the optional field `subdivisions` + if (jsonObj.get("subdivisions") != null && !jsonObj.get("subdivisions").isJsonNull()) { + AdSetTargetingRuleV24Q1.validateJsonObject(jsonObj.getAsJsonObject("subdivisions")); + } + // validate the optional field `zipCodes` + if (jsonObj.get("zipCodes") != null && !jsonObj.get("zipCodes").isJsonNull()) { + AdSetTargetingRuleV24Q1.validateJsonObject(jsonObj.getAsJsonObject("zipCodes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAdSetGeoLocationV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAdSetGeoLocationV24Q1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAdSetGeoLocationV24Q1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAdSetGeoLocationV24Q1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateAdSetGeoLocationV24Q1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateAdSetGeoLocationV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAdSetGeoLocationV24Q1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAdSetGeoLocationV24Q1 + * @throws IOException if the JSON string is invalid with respect to CreateAdSetGeoLocationV24Q1 + */ + public static CreateAdSetGeoLocationV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAdSetGeoLocationV24Q1.class); + } + + /** + * Convert an instance of CreateAdSetGeoLocationV24Q1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetScheduleV24Q1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetScheduleV24Q1.java new file mode 100644 index 00000000..22f61f3a --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetScheduleV24Q1.java @@ -0,0 +1,327 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * ad set schedule create model + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAdSetScheduleV24Q1 { + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private OffsetDateTime startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private OffsetDateTime endDate; + + public CreateAdSetScheduleV24Q1() { + } + + public CreateAdSetScheduleV24Q1 startDate(OffsetDateTime startDate) { + + this.startDate = startDate; + return this; + } + + /** + * Get startDate + * @return startDate + **/ + @javax.annotation.Nonnull + + public OffsetDateTime getStartDate() { + return startDate; + } + + + public void setStartDate(OffsetDateTime startDate) { + this.startDate = startDate; + } + + + public CreateAdSetScheduleV24Q1 endDate(OffsetDateTime endDate) { + + this.endDate = endDate; + return this; + } + + /** + * Get endDate + * @return endDate + **/ + @javax.annotation.Nullable + + public OffsetDateTime getEndDate() { + return endDate; + } + + + public void setEndDate(OffsetDateTime endDate) { + this.endDate = endDate; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateAdSetScheduleV24Q1 instance itself + */ + public CreateAdSetScheduleV24Q1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdSetScheduleV24Q1 createAdSetScheduleV24Q1 = (CreateAdSetScheduleV24Q1) o; + return Objects.equals(this.startDate, createAdSetScheduleV24Q1.startDate) && + Objects.equals(this.endDate, createAdSetScheduleV24Q1.endDate)&& + Objects.equals(this.additionalProperties, createAdSetScheduleV24Q1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(startDate, endDate, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAdSetScheduleV24Q1 {\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("startDate"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateAdSetScheduleV24Q1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateAdSetScheduleV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAdSetScheduleV24Q1 is not found in the empty JSON string", CreateAdSetScheduleV24Q1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateAdSetScheduleV24Q1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAdSetScheduleV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAdSetScheduleV24Q1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAdSetScheduleV24Q1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAdSetScheduleV24Q1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateAdSetScheduleV24Q1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateAdSetScheduleV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAdSetScheduleV24Q1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAdSetScheduleV24Q1 + * @throws IOException if the JSON string is invalid with respect to CreateAdSetScheduleV24Q1 + */ + public static CreateAdSetScheduleV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAdSetScheduleV24Q1.class); + } + + /** + * Convert an instance of CreateAdSetScheduleV24Q1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetTargetingV24Q1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetTargetingV24Q1.java new file mode 100644 index 00000000..dab6d0fe --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetTargetingV24Q1.java @@ -0,0 +1,356 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetDeliveryLimitationsV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetFrequencyCappingV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetGeoLocationV24Q1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Targeting configuration of the ad set + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAdSetTargetingV24Q1 { + public static final String SERIALIZED_NAME_DELIVERY_LIMITATIONS = "deliveryLimitations"; + @SerializedName(SERIALIZED_NAME_DELIVERY_LIMITATIONS) + private AdSetDeliveryLimitationsV24Q1 deliveryLimitations; + + public static final String SERIALIZED_NAME_GEO_LOCATION = "geoLocation"; + @SerializedName(SERIALIZED_NAME_GEO_LOCATION) + private CreateAdSetGeoLocationV24Q1 geoLocation; + + public static final String SERIALIZED_NAME_FREQUENCY_CAPPING = "frequencyCapping"; + @SerializedName(SERIALIZED_NAME_FREQUENCY_CAPPING) + private AdSetFrequencyCappingV24Q1 frequencyCapping; + + public CreateAdSetTargetingV24Q1() { + } + + public CreateAdSetTargetingV24Q1 deliveryLimitations(AdSetDeliveryLimitationsV24Q1 deliveryLimitations) { + + this.deliveryLimitations = deliveryLimitations; + return this; + } + + /** + * Get deliveryLimitations + * @return deliveryLimitations + **/ + @javax.annotation.Nullable + + public AdSetDeliveryLimitationsV24Q1 getDeliveryLimitations() { + return deliveryLimitations; + } + + + public void setDeliveryLimitations(AdSetDeliveryLimitationsV24Q1 deliveryLimitations) { + this.deliveryLimitations = deliveryLimitations; + } + + + public CreateAdSetTargetingV24Q1 geoLocation(CreateAdSetGeoLocationV24Q1 geoLocation) { + + this.geoLocation = geoLocation; + return this; + } + + /** + * Get geoLocation + * @return geoLocation + **/ + @javax.annotation.Nullable + + public CreateAdSetGeoLocationV24Q1 getGeoLocation() { + return geoLocation; + } + + + public void setGeoLocation(CreateAdSetGeoLocationV24Q1 geoLocation) { + this.geoLocation = geoLocation; + } + + + public CreateAdSetTargetingV24Q1 frequencyCapping(AdSetFrequencyCappingV24Q1 frequencyCapping) { + + this.frequencyCapping = frequencyCapping; + return this; + } + + /** + * Get frequencyCapping + * @return frequencyCapping + **/ + @javax.annotation.Nonnull + + public AdSetFrequencyCappingV24Q1 getFrequencyCapping() { + return frequencyCapping; + } + + + public void setFrequencyCapping(AdSetFrequencyCappingV24Q1 frequencyCapping) { + this.frequencyCapping = frequencyCapping; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateAdSetTargetingV24Q1 instance itself + */ + public CreateAdSetTargetingV24Q1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdSetTargetingV24Q1 createAdSetTargetingV24Q1 = (CreateAdSetTargetingV24Q1) o; + return Objects.equals(this.deliveryLimitations, createAdSetTargetingV24Q1.deliveryLimitations) && + Objects.equals(this.geoLocation, createAdSetTargetingV24Q1.geoLocation) && + Objects.equals(this.frequencyCapping, createAdSetTargetingV24Q1.frequencyCapping)&& + Objects.equals(this.additionalProperties, createAdSetTargetingV24Q1.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(deliveryLimitations, geoLocation, frequencyCapping, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAdSetTargetingV24Q1 {\n"); + sb.append(" deliveryLimitations: ").append(toIndentedString(deliveryLimitations)).append("\n"); + sb.append(" geoLocation: ").append(toIndentedString(geoLocation)).append("\n"); + sb.append(" frequencyCapping: ").append(toIndentedString(frequencyCapping)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("deliveryLimitations"); + openapiFields.add("geoLocation"); + openapiFields.add("frequencyCapping"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("frequencyCapping"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateAdSetTargetingV24Q1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateAdSetTargetingV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAdSetTargetingV24Q1 is not found in the empty JSON string", CreateAdSetTargetingV24Q1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateAdSetTargetingV24Q1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // validate the optional field `deliveryLimitations` + if (jsonObj.get("deliveryLimitations") != null && !jsonObj.get("deliveryLimitations").isJsonNull()) { + AdSetDeliveryLimitationsV24Q1.validateJsonObject(jsonObj.getAsJsonObject("deliveryLimitations")); + } + // validate the optional field `geoLocation` + if (jsonObj.get("geoLocation") != null && !jsonObj.get("geoLocation").isJsonNull()) { + CreateAdSetGeoLocationV24Q1.validateJsonObject(jsonObj.getAsJsonObject("geoLocation")); + } + // validate the required field `frequencyCapping` + AdSetFrequencyCappingV24Q1.validateJsonObject(jsonObj.getAsJsonObject("frequencyCapping")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAdSetTargetingV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAdSetTargetingV24Q1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAdSetTargetingV24Q1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAdSetTargetingV24Q1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateAdSetTargetingV24Q1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateAdSetTargetingV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAdSetTargetingV24Q1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAdSetTargetingV24Q1 + * @throws IOException if the JSON string is invalid with respect to CreateAdSetTargetingV24Q1 + */ + public static CreateAdSetTargetingV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAdSetTargetingV24Q1.class); + } + + /** + * Convert an instance of CreateAdSetTargetingV24Q1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1.java new file mode 100644 index 00000000..18780496 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1.java @@ -0,0 +1,697 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetBiddingV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetBudgetV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetScheduleV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetTargetingV24Q1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * ad set create model + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAdSetV24Q1 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DATASET_ID = "datasetId"; + @SerializedName(SERIALIZED_NAME_DATASET_ID) + private String datasetId; + + public static final String SERIALIZED_NAME_CAMPAIGN_ID = "campaignId"; + @SerializedName(SERIALIZED_NAME_CAMPAIGN_ID) + private String campaignId; + + /** + * Objective of the ad set + */ + @JsonAdapter(ObjectiveEnum.Adapter.class) + public enum ObjectiveEnum { + CUSTOMACTION("customAction"), + + CLICKS("clicks"), + + CONVERSIONS("conversions"), + + DISPLAYS("displays"), + + APPPROMOTION("appPromotion"), + + REVENUE("revenue"), + + STORECONVERSIONS("storeConversions"), + + VALUE("value"), + + REACH("reach"), + + VISITS("visits"), + + VIDEOVIEWS("videoViews"); + + private String value; + + ObjectiveEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ObjectiveEnum fromValue(String value) { + for (ObjectiveEnum b : ObjectiveEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ObjectiveEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ObjectiveEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ObjectiveEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_OBJECTIVE = "objective"; + @SerializedName(SERIALIZED_NAME_OBJECTIVE) + private ObjectiveEnum objective; + + public static final String SERIALIZED_NAME_SCHEDULE = "schedule"; + @SerializedName(SERIALIZED_NAME_SCHEDULE) + private CreateAdSetScheduleV24Q1 schedule; + + public static final String SERIALIZED_NAME_BIDDING = "bidding"; + @SerializedName(SERIALIZED_NAME_BIDDING) + private CreateAdSetBiddingV24Q1 bidding; + + public static final String SERIALIZED_NAME_TARGETING = "targeting"; + @SerializedName(SERIALIZED_NAME_TARGETING) + private CreateAdSetTargetingV24Q1 targeting; + + public static final String SERIALIZED_NAME_BUDGET = "budget"; + @SerializedName(SERIALIZED_NAME_BUDGET) + private CreateAdSetBudgetV24Q1 budget; + + public static final String SERIALIZED_NAME_TRACKING_CODE = "trackingCode"; + @SerializedName(SERIALIZED_NAME_TRACKING_CODE) + private String trackingCode; + + /** + * Media type for the ad set + */ + @JsonAdapter(MediaTypeEnum.Adapter.class) + public enum MediaTypeEnum { + DISPLAY("display"), + + VIDEO("video"); + + private String value; + + MediaTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MediaTypeEnum fromValue(String value) { + for (MediaTypeEnum b : MediaTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MediaTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MediaTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MediaTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_MEDIA_TYPE = "mediaType"; + @SerializedName(SERIALIZED_NAME_MEDIA_TYPE) + private MediaTypeEnum mediaType; + + public CreateAdSetV24Q1() { + } + + public CreateAdSetV24Q1 name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the ad set + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public CreateAdSetV24Q1 datasetId(String datasetId) { + + this.datasetId = datasetId; + return this; + } + + /** + * Dataset id of this ad set + * @return datasetId + **/ + @javax.annotation.Nullable + + public String getDatasetId() { + return datasetId; + } + + + public void setDatasetId(String datasetId) { + this.datasetId = datasetId; + } + + + public CreateAdSetV24Q1 campaignId(String campaignId) { + + this.campaignId = campaignId; + return this; + } + + /** + * Campaign id this ad set belongs to + * @return campaignId + **/ + @javax.annotation.Nullable + + public String getCampaignId() { + return campaignId; + } + + + public void setCampaignId(String campaignId) { + this.campaignId = campaignId; + } + + + public CreateAdSetV24Q1 objective(ObjectiveEnum objective) { + + this.objective = objective; + return this; + } + + /** + * Objective of the ad set + * @return objective + **/ + @javax.annotation.Nonnull + + public ObjectiveEnum getObjective() { + return objective; + } + + + public void setObjective(ObjectiveEnum objective) { + this.objective = objective; + } + + + public CreateAdSetV24Q1 schedule(CreateAdSetScheduleV24Q1 schedule) { + + this.schedule = schedule; + return this; + } + + /** + * Get schedule + * @return schedule + **/ + @javax.annotation.Nonnull + + public CreateAdSetScheduleV24Q1 getSchedule() { + return schedule; + } + + + public void setSchedule(CreateAdSetScheduleV24Q1 schedule) { + this.schedule = schedule; + } + + + public CreateAdSetV24Q1 bidding(CreateAdSetBiddingV24Q1 bidding) { + + this.bidding = bidding; + return this; + } + + /** + * Get bidding + * @return bidding + **/ + @javax.annotation.Nonnull + + public CreateAdSetBiddingV24Q1 getBidding() { + return bidding; + } + + + public void setBidding(CreateAdSetBiddingV24Q1 bidding) { + this.bidding = bidding; + } + + + public CreateAdSetV24Q1 targeting(CreateAdSetTargetingV24Q1 targeting) { + + this.targeting = targeting; + return this; + } + + /** + * Get targeting + * @return targeting + **/ + @javax.annotation.Nonnull + + public CreateAdSetTargetingV24Q1 getTargeting() { + return targeting; + } + + + public void setTargeting(CreateAdSetTargetingV24Q1 targeting) { + this.targeting = targeting; + } + + + public CreateAdSetV24Q1 budget(CreateAdSetBudgetV24Q1 budget) { + + this.budget = budget; + return this; + } + + /** + * Get budget + * @return budget + **/ + @javax.annotation.Nonnull + + public CreateAdSetBudgetV24Q1 getBudget() { + return budget; + } + + + public void setBudget(CreateAdSetBudgetV24Q1 budget) { + this.budget = budget; + } + + + public CreateAdSetV24Q1 trackingCode(String trackingCode) { + + this.trackingCode = trackingCode; + return this; + } + + /** + * The click tracking code associated to this Ad Set. + * @return trackingCode + **/ + @javax.annotation.Nullable + + public String getTrackingCode() { + return trackingCode; + } + + + public void setTrackingCode(String trackingCode) { + this.trackingCode = trackingCode; + } + + + public CreateAdSetV24Q1 mediaType(MediaTypeEnum mediaType) { + + this.mediaType = mediaType; + return this; + } + + /** + * Media type for the ad set + * @return mediaType + **/ + @javax.annotation.Nonnull + + public MediaTypeEnum getMediaType() { + return mediaType; + } + + + public void setMediaType(MediaTypeEnum mediaType) { + this.mediaType = mediaType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateAdSetV24Q1 instance itself + */ + public CreateAdSetV24Q1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdSetV24Q1 createAdSetV24Q1 = (CreateAdSetV24Q1) o; + return Objects.equals(this.name, createAdSetV24Q1.name) && + Objects.equals(this.datasetId, createAdSetV24Q1.datasetId) && + Objects.equals(this.campaignId, createAdSetV24Q1.campaignId) && + Objects.equals(this.objective, createAdSetV24Q1.objective) && + Objects.equals(this.schedule, createAdSetV24Q1.schedule) && + Objects.equals(this.bidding, createAdSetV24Q1.bidding) && + Objects.equals(this.targeting, createAdSetV24Q1.targeting) && + Objects.equals(this.budget, createAdSetV24Q1.budget) && + Objects.equals(this.trackingCode, createAdSetV24Q1.trackingCode) && + Objects.equals(this.mediaType, createAdSetV24Q1.mediaType)&& + Objects.equals(this.additionalProperties, createAdSetV24Q1.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, datasetId, campaignId, objective, schedule, bidding, targeting, budget, trackingCode, mediaType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAdSetV24Q1 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n"); + sb.append(" objective: ").append(toIndentedString(objective)).append("\n"); + sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); + sb.append(" bidding: ").append(toIndentedString(bidding)).append("\n"); + sb.append(" targeting: ").append(toIndentedString(targeting)).append("\n"); + sb.append(" budget: ").append(toIndentedString(budget)).append("\n"); + sb.append(" trackingCode: ").append(toIndentedString(trackingCode)).append("\n"); + sb.append(" mediaType: ").append(toIndentedString(mediaType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("datasetId"); + openapiFields.add("campaignId"); + openapiFields.add("objective"); + openapiFields.add("schedule"); + openapiFields.add("bidding"); + openapiFields.add("targeting"); + openapiFields.add("budget"); + openapiFields.add("trackingCode"); + openapiFields.add("mediaType"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("datasetId"); + openapiRequiredFields.add("campaignId"); + openapiRequiredFields.add("objective"); + openapiRequiredFields.add("schedule"); + openapiRequiredFields.add("bidding"); + openapiRequiredFields.add("targeting"); + openapiRequiredFields.add("budget"); + openapiRequiredFields.add("trackingCode"); + openapiRequiredFields.add("mediaType"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateAdSetV24Q1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateAdSetV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAdSetV24Q1 is not found in the empty JSON string", CreateAdSetV24Q1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateAdSetV24Q1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("datasetId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `datasetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("datasetId").toString())); + } + if (!jsonObj.get("campaignId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `campaignId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignId").toString())); + } + if (!jsonObj.get("objective").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `objective` to be a primitive type in the JSON string but got `%s`", jsonObj.get("objective").toString())); + } + // validate the required field `schedule` + CreateAdSetScheduleV24Q1.validateJsonObject(jsonObj.getAsJsonObject("schedule")); + // validate the required field `bidding` + CreateAdSetBiddingV24Q1.validateJsonObject(jsonObj.getAsJsonObject("bidding")); + // validate the required field `targeting` + CreateAdSetTargetingV24Q1.validateJsonObject(jsonObj.getAsJsonObject("targeting")); + // validate the required field `budget` + CreateAdSetBudgetV24Q1.validateJsonObject(jsonObj.getAsJsonObject("budget")); + if (!jsonObj.get("trackingCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `trackingCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trackingCode").toString())); + } + if (!jsonObj.get("mediaType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mediaType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAdSetV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAdSetV24Q1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAdSetV24Q1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAdSetV24Q1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateAdSetV24Q1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateAdSetV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAdSetV24Q1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAdSetV24Q1 + * @throws IOException if the JSON string is invalid with respect to CreateAdSetV24Q1 + */ + public static CreateAdSetV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAdSetV24Q1.class); + } + + /** + * Convert an instance of CreateAdSetV24Q1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1Request.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1Request.java new file mode 100644 index 00000000..d4c50de2 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1Request.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetV24Q1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for an input resources + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAdSetV24Q1Request { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreateAdSetV24Q1Resource data; + + public CreateAdSetV24Q1Request() { + } + + public CreateAdSetV24Q1Request data(CreateAdSetV24Q1Resource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public CreateAdSetV24Q1Resource getData() { + return data; + } + + + public void setData(CreateAdSetV24Q1Resource data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateAdSetV24Q1Request instance itself + */ + public CreateAdSetV24Q1Request putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdSetV24Q1Request createAdSetV24Q1Request = (CreateAdSetV24Q1Request) o; + return Objects.equals(this.data, createAdSetV24Q1Request.data)&& + Objects.equals(this.additionalProperties, createAdSetV24Q1Request.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAdSetV24Q1Request {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateAdSetV24Q1Request + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateAdSetV24Q1Request.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAdSetV24Q1Request is not found in the empty JSON string", CreateAdSetV24Q1Request.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateAdSetV24Q1Resource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAdSetV24Q1Request.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAdSetV24Q1Request' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAdSetV24Q1Request.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAdSetV24Q1Request value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateAdSetV24Q1Request read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateAdSetV24Q1Request instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAdSetV24Q1Request given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAdSetV24Q1Request + * @throws IOException if the JSON string is invalid with respect to CreateAdSetV24Q1Request + */ + public static CreateAdSetV24Q1Request fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAdSetV24Q1Request.class); + } + + /** + * Convert an instance of CreateAdSetV24Q1Request to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1Resource.java new file mode 100644 index 00000000..e8c365e1 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateAdSetV24Q1Resource.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateAdSetV24Q1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateAdSetV24Q1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CreateAdSetV24Q1 attributes; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public CreateAdSetV24Q1Resource() { + } + + public CreateAdSetV24Q1Resource attributes(CreateAdSetV24Q1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public CreateAdSetV24Q1 getAttributes() { + return attributes; + } + + + public void setAttributes(CreateAdSetV24Q1 attributes) { + this.attributes = attributes; + } + + + public CreateAdSetV24Q1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Canonical type name of the entity + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateAdSetV24Q1Resource instance itself + */ + public CreateAdSetV24Q1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAdSetV24Q1Resource createAdSetV24Q1Resource = (CreateAdSetV24Q1Resource) o; + return Objects.equals(this.attributes, createAdSetV24Q1Resource.attributes) && + Objects.equals(this.type, createAdSetV24Q1Resource.type)&& + Objects.equals(this.additionalProperties, createAdSetV24Q1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAdSetV24Q1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateAdSetV24Q1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateAdSetV24Q1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateAdSetV24Q1Resource is not found in the empty JSON string", CreateAdSetV24Q1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + CreateAdSetV24Q1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAdSetV24Q1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAdSetV24Q1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAdSetV24Q1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAdSetV24Q1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateAdSetV24Q1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateAdSetV24Q1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAdSetV24Q1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAdSetV24Q1Resource + * @throws IOException if the JSON string is invalid with respect to CreateAdSetV24Q1Resource + */ + public static CreateAdSetV24Q1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAdSetV24Q1Resource.class); + } + + /** + * Convert an instance of CreateAdSetV24Q1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaign.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaign.java new file mode 100644 index 00000000..8c7ec7a9 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaign.java @@ -0,0 +1,436 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateCampaignSpendLimit; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Campaign create model + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCampaign { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_ADVERTISER_ID = "advertiserId"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_ID) + private String advertiserId; + + /** + * Goal for the marketing campaign + */ + @JsonAdapter(GoalEnum.Adapter.class) + public enum GoalEnum { + UNSPECIFIED("Unspecified"), + + ACQUISITION("Acquisition"), + + RETENTION("Retention"); + + private String value; + + GoalEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GoalEnum fromValue(String value) { + for (GoalEnum b : GoalEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final GoalEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GoalEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return GoalEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_GOAL = "goal"; + @SerializedName(SERIALIZED_NAME_GOAL) + private GoalEnum goal; + + public static final String SERIALIZED_NAME_SPEND_LIMIT = "spendLimit"; + @SerializedName(SERIALIZED_NAME_SPEND_LIMIT) + private CreateCampaignSpendLimit spendLimit; + + public CreateCampaign() { + } + + public CreateCampaign name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the campaign + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public CreateCampaign advertiserId(String advertiserId) { + + this.advertiserId = advertiserId; + return this; + } + + /** + * Advertiser id this campaign belongs to + * @return advertiserId + **/ + @javax.annotation.Nullable + + public String getAdvertiserId() { + return advertiserId; + } + + + public void setAdvertiserId(String advertiserId) { + this.advertiserId = advertiserId; + } + + + public CreateCampaign goal(GoalEnum goal) { + + this.goal = goal; + return this; + } + + /** + * Goal for the marketing campaign + * @return goal + **/ + @javax.annotation.Nonnull + + public GoalEnum getGoal() { + return goal; + } + + + public void setGoal(GoalEnum goal) { + this.goal = goal; + } + + + public CreateCampaign spendLimit(CreateCampaignSpendLimit spendLimit) { + + this.spendLimit = spendLimit; + return this; + } + + /** + * Get spendLimit + * @return spendLimit + **/ + @javax.annotation.Nonnull + + public CreateCampaignSpendLimit getSpendLimit() { + return spendLimit; + } + + + public void setSpendLimit(CreateCampaignSpendLimit spendLimit) { + this.spendLimit = spendLimit; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateCampaign instance itself + */ + public CreateCampaign putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCampaign createCampaign = (CreateCampaign) o; + return Objects.equals(this.name, createCampaign.name) && + Objects.equals(this.advertiserId, createCampaign.advertiserId) && + Objects.equals(this.goal, createCampaign.goal) && + Objects.equals(this.spendLimit, createCampaign.spendLimit)&& + Objects.equals(this.additionalProperties, createCampaign.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, advertiserId, goal, spendLimit, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCampaign {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n"); + sb.append(" goal: ").append(toIndentedString(goal)).append("\n"); + sb.append(" spendLimit: ").append(toIndentedString(spendLimit)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("advertiserId"); + openapiFields.add("goal"); + openapiFields.add("spendLimit"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("advertiserId"); + openapiRequiredFields.add("goal"); + openapiRequiredFields.add("spendLimit"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateCampaign + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateCampaign.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCampaign is not found in the empty JSON string", CreateCampaign.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateCampaign.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("advertiserId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("advertiserId").toString())); + } + if (!jsonObj.get("goal").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `goal` to be a primitive type in the JSON string but got `%s`", jsonObj.get("goal").toString())); + } + // validate the required field `spendLimit` + CreateCampaignSpendLimit.validateJsonObject(jsonObj.getAsJsonObject("spendLimit")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCampaign.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCampaign' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCampaign.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCampaign value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateCampaign read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateCampaign instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateCampaign given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCampaign + * @throws IOException if the JSON string is invalid with respect to CreateCampaign + */ + public static CreateCampaign fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCampaign.class); + } + + /** + * Convert an instance of CreateCampaign to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignRequest.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignRequest.java new file mode 100644 index 00000000..74d6a797 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignRequest.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateCampaignResource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for an input resources + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCampaignRequest { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreateCampaignResource data; + + public CreateCampaignRequest() { + } + + public CreateCampaignRequest data(CreateCampaignResource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public CreateCampaignResource getData() { + return data; + } + + + public void setData(CreateCampaignResource data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateCampaignRequest instance itself + */ + public CreateCampaignRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCampaignRequest createCampaignRequest = (CreateCampaignRequest) o; + return Objects.equals(this.data, createCampaignRequest.data)&& + Objects.equals(this.additionalProperties, createCampaignRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCampaignRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateCampaignRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateCampaignRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCampaignRequest is not found in the empty JSON string", CreateCampaignRequest.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateCampaignResource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCampaignRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCampaignRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCampaignRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCampaignRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateCampaignRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateCampaignRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateCampaignRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCampaignRequest + * @throws IOException if the JSON string is invalid with respect to CreateCampaignRequest + */ + public static CreateCampaignRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCampaignRequest.class); + } + + /** + * Convert an instance of CreateCampaignRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignResource.java new file mode 100644 index 00000000..39538260 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignResource.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateCampaign; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCampaignResource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CreateCampaign attributes; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public CreateCampaignResource() { + } + + public CreateCampaignResource attributes(CreateCampaign attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public CreateCampaign getAttributes() { + return attributes; + } + + + public void setAttributes(CreateCampaign attributes) { + this.attributes = attributes; + } + + + public CreateCampaignResource type(String type) { + + this.type = type; + return this; + } + + /** + * Canonical type name of the entity + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateCampaignResource instance itself + */ + public CreateCampaignResource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCampaignResource createCampaignResource = (CreateCampaignResource) o; + return Objects.equals(this.attributes, createCampaignResource.attributes) && + Objects.equals(this.type, createCampaignResource.type)&& + Objects.equals(this.additionalProperties, createCampaignResource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCampaignResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateCampaignResource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateCampaignResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCampaignResource is not found in the empty JSON string", CreateCampaignResource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + CreateCampaign.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCampaignResource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCampaignResource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCampaignResource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCampaignResource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateCampaignResource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateCampaignResource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateCampaignResource given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCampaignResource + * @throws IOException if the JSON string is invalid with respect to CreateCampaignResource + */ + public static CreateCampaignResource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCampaignResource.class); + } + + /** + * Convert an instance of CreateCampaignResource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignSpendLimit.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignSpendLimit.java new file mode 100644 index 00000000..75d4cb5d --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCampaignSpendLimit.java @@ -0,0 +1,459 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * campaign spend limit create model + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCampaignSpendLimit { + /** + * Whether your spend limit is capped or not + */ + @JsonAdapter(SpendLimitTypeEnum.Adapter.class) + public enum SpendLimitTypeEnum { + CAPPED("capped"), + + UNCAPPED("uncapped"); + + private String value; + + SpendLimitTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SpendLimitTypeEnum fromValue(String value) { + for (SpendLimitTypeEnum b : SpendLimitTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SpendLimitTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SpendLimitTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SpendLimitTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_SPEND_LIMIT_TYPE = "spendLimitType"; + @SerializedName(SERIALIZED_NAME_SPEND_LIMIT_TYPE) + private SpendLimitTypeEnum spendLimitType; + + /** + * The pace of the spend limit renewal + */ + @JsonAdapter(SpendLimitRenewalEnum.Adapter.class) + public enum SpendLimitRenewalEnum { + UNDEFINED("undefined"), + + DAILY("daily"), + + MONTHLY("monthly"), + + LIFETIME("lifetime"); + + private String value; + + SpendLimitRenewalEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SpendLimitRenewalEnum fromValue(String value) { + for (SpendLimitRenewalEnum b : SpendLimitRenewalEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SpendLimitRenewalEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SpendLimitRenewalEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SpendLimitRenewalEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_SPEND_LIMIT_RENEWAL = "spendLimitRenewal"; + @SerializedName(SERIALIZED_NAME_SPEND_LIMIT_RENEWAL) + private SpendLimitRenewalEnum spendLimitRenewal; + + public static final String SERIALIZED_NAME_SPEND_LIMIT_AMOUNT = "spendLimitAmount"; + @SerializedName(SERIALIZED_NAME_SPEND_LIMIT_AMOUNT) + private Double spendLimitAmount; + + public CreateCampaignSpendLimit() { + } + + public CreateCampaignSpendLimit spendLimitType(SpendLimitTypeEnum spendLimitType) { + + this.spendLimitType = spendLimitType; + return this; + } + + /** + * Whether your spend limit is capped or not + * @return spendLimitType + **/ + @javax.annotation.Nonnull + + public SpendLimitTypeEnum getSpendLimitType() { + return spendLimitType; + } + + + public void setSpendLimitType(SpendLimitTypeEnum spendLimitType) { + this.spendLimitType = spendLimitType; + } + + + public CreateCampaignSpendLimit spendLimitRenewal(SpendLimitRenewalEnum spendLimitRenewal) { + + this.spendLimitRenewal = spendLimitRenewal; + return this; + } + + /** + * The pace of the spend limit renewal + * @return spendLimitRenewal + **/ + @javax.annotation.Nullable + + public SpendLimitRenewalEnum getSpendLimitRenewal() { + return spendLimitRenewal; + } + + + public void setSpendLimitRenewal(SpendLimitRenewalEnum spendLimitRenewal) { + this.spendLimitRenewal = spendLimitRenewal; + } + + + public CreateCampaignSpendLimit spendLimitAmount(Double spendLimitAmount) { + + this.spendLimitAmount = spendLimitAmount; + return this; + } + + /** + * The amount of the spend limit. null if spendLimitType is uncapped. + * @return spendLimitAmount + **/ + @javax.annotation.Nullable + + public Double getSpendLimitAmount() { + return spendLimitAmount; + } + + + public void setSpendLimitAmount(Double spendLimitAmount) { + this.spendLimitAmount = spendLimitAmount; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateCampaignSpendLimit instance itself + */ + public CreateCampaignSpendLimit putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCampaignSpendLimit createCampaignSpendLimit = (CreateCampaignSpendLimit) o; + return Objects.equals(this.spendLimitType, createCampaignSpendLimit.spendLimitType) && + Objects.equals(this.spendLimitRenewal, createCampaignSpendLimit.spendLimitRenewal) && + Objects.equals(this.spendLimitAmount, createCampaignSpendLimit.spendLimitAmount)&& + Objects.equals(this.additionalProperties, createCampaignSpendLimit.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(spendLimitType, spendLimitRenewal, spendLimitAmount, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCampaignSpendLimit {\n"); + sb.append(" spendLimitType: ").append(toIndentedString(spendLimitType)).append("\n"); + sb.append(" spendLimitRenewal: ").append(toIndentedString(spendLimitRenewal)).append("\n"); + sb.append(" spendLimitAmount: ").append(toIndentedString(spendLimitAmount)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("spendLimitType"); + openapiFields.add("spendLimitRenewal"); + openapiFields.add("spendLimitAmount"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("spendLimitType"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateCampaignSpendLimit + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateCampaignSpendLimit.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCampaignSpendLimit is not found in the empty JSON string", CreateCampaignSpendLimit.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateCampaignSpendLimit.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("spendLimitType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `spendLimitType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("spendLimitType").toString())); + } + if ((jsonObj.get("spendLimitRenewal") != null && !jsonObj.get("spendLimitRenewal").isJsonNull()) && !jsonObj.get("spendLimitRenewal").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `spendLimitRenewal` to be a primitive type in the JSON string but got `%s`", jsonObj.get("spendLimitRenewal").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCampaignSpendLimit.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCampaignSpendLimit' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCampaignSpendLimit.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCampaignSpendLimit value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateCampaignSpendLimit read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateCampaignSpendLimit instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateCampaignSpendLimit given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCampaignSpendLimit + * @throws IOException if the JSON string is invalid with respect to CreateCampaignSpendLimit + */ + public static CreateCampaignSpendLimit fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCampaignSpendLimit.class); + } + + /** + * Convert an instance of CreateCampaignSpendLimit to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCoupon.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCoupon.java new file mode 100644 index 00000000..ceb463af --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCoupon.java @@ -0,0 +1,687 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateImageSlide; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Entity to create a Coupon + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCoupon { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_AD_SET_ID = "adSetId"; + @SerializedName(SERIALIZED_NAME_AD_SET_ID) + private String adSetId; + + public static final String SERIALIZED_NAME_LANDING_PAGE_URL = "landingPageUrl"; + @SerializedName(SERIALIZED_NAME_LANDING_PAGE_URL) + private String landingPageUrl; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private String endDate; + + /** + * Format of the Coupon, it can have two values: \"FullFrame\" or \"LogoZone\" + */ + @JsonAdapter(FormatEnum.Adapter.class) + public enum FormatEnum { + FULLFRAME("FullFrame"), + + LOGOZONE("LogoZone"); + + private String value; + + FormatEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FormatEnum fromValue(String value) { + for (FormatEnum b : FormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FormatEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_FORMAT = "format"; + @SerializedName(SERIALIZED_NAME_FORMAT) + private FormatEnum format; + + public static final String SERIALIZED_NAME_IMAGES = "images"; + @SerializedName(SERIALIZED_NAME_IMAGES) + private List images = new ArrayList<>(); + + public static final String SERIALIZED_NAME_SHOW_EVERY = "showEvery"; + @SerializedName(SERIALIZED_NAME_SHOW_EVERY) + private Integer showEvery; + + public static final String SERIALIZED_NAME_SHOW_DURATION = "showDuration"; + @SerializedName(SERIALIZED_NAME_SHOW_DURATION) + private Integer showDuration; + + public static final String SERIALIZED_NAME_ROTATIONS_NUMBER = "rotationsNumber"; + @SerializedName(SERIALIZED_NAME_ROTATIONS_NUMBER) + private Integer rotationsNumber; + + public CreateCoupon() { + } + + public CreateCoupon name(String name) { + + this.name = name; + return this; + } + + /** + * The name of the Coupon + * @return name + **/ + @javax.annotation.Nonnull + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public CreateCoupon description(String description) { + + this.description = description; + return this; + } + + /** + * The description of the Coupon + * @return description + **/ + @javax.annotation.Nullable + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public CreateCoupon adSetId(String adSetId) { + + this.adSetId = adSetId; + return this; + } + + /** + * The id of the Ad Set on which the Coupon is applied to + * @return adSetId + **/ + @javax.annotation.Nonnull + + public String getAdSetId() { + return adSetId; + } + + + public void setAdSetId(String adSetId) { + this.adSetId = adSetId; + } + + + public CreateCoupon landingPageUrl(String landingPageUrl) { + + this.landingPageUrl = landingPageUrl; + return this; + } + + /** + * Web redirection of the landing page url + * @return landingPageUrl + **/ + @javax.annotation.Nonnull + + public String getLandingPageUrl() { + return landingPageUrl; + } + + + public void setLandingPageUrl(String landingPageUrl) { + this.landingPageUrl = landingPageUrl; + } + + + public CreateCoupon startDate(String startDate) { + + this.startDate = startDate; + return this; + } + + /** + * The date when the coupon will be launched String must be in ISO8601 format + * @return startDate + **/ + @javax.annotation.Nonnull + + public String getStartDate() { + return startDate; + } + + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + + public CreateCoupon endDate(String endDate) { + + this.endDate = endDate; + return this; + } + + /** + * The date when when we will stop to show this Coupon. If the end date is not specified (i.e. null) then the Coupon will go on forever String must be in ISO8601 format + * @return endDate + **/ + @javax.annotation.Nullable + + public String getEndDate() { + return endDate; + } + + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + + public CreateCoupon format(FormatEnum format) { + + this.format = format; + return this; + } + + /** + * Format of the Coupon, it can have two values: \"FullFrame\" or \"LogoZone\" + * @return format + **/ + @javax.annotation.Nonnull + + public FormatEnum getFormat() { + return format; + } + + + public void setFormat(FormatEnum format) { + this.format = format; + } + + + public CreateCoupon images(List images) { + + this.images = images; + return this; + } + + public CreateCoupon addImagesItem(CreateImageSlide imagesItem) { + this.images.add(imagesItem); + return this; + } + + /** + * List of slides containing the images as a base-64 encoded string + * @return images + **/ + @javax.annotation.Nonnull + + public List getImages() { + return images; + } + + + public void setImages(List images) { + this.images = images; + } + + + public CreateCoupon showEvery(Integer showEvery) { + + this.showEvery = showEvery; + return this; + } + + /** + * Show the Coupon every N seconds (between 1 and 10) + * minimum: 1 + * maximum: 10 + * @return showEvery + **/ + @javax.annotation.Nonnull + + public Integer getShowEvery() { + return showEvery; + } + + + public void setShowEvery(Integer showEvery) { + this.showEvery = showEvery; + } + + + public CreateCoupon showDuration(Integer showDuration) { + + this.showDuration = showDuration; + return this; + } + + /** + * Show Coupon for a duration of N seconds (between 1 and 5) + * minimum: 1 + * maximum: 5 + * @return showDuration + **/ + @javax.annotation.Nonnull + + public Integer getShowDuration() { + return showDuration; + } + + + public void setShowDuration(Integer showDuration) { + this.showDuration = showDuration; + } + + + public CreateCoupon rotationsNumber(Integer rotationsNumber) { + + this.rotationsNumber = rotationsNumber; + return this; + } + + /** + * Number of rotations for the Coupons (from 1 to 10 times) + * minimum: 1 + * maximum: 10 + * @return rotationsNumber + **/ + @javax.annotation.Nonnull + + public Integer getRotationsNumber() { + return rotationsNumber; + } + + + public void setRotationsNumber(Integer rotationsNumber) { + this.rotationsNumber = rotationsNumber; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateCoupon instance itself + */ + public CreateCoupon putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCoupon createCoupon = (CreateCoupon) o; + return Objects.equals(this.name, createCoupon.name) && + Objects.equals(this.description, createCoupon.description) && + Objects.equals(this.adSetId, createCoupon.adSetId) && + Objects.equals(this.landingPageUrl, createCoupon.landingPageUrl) && + Objects.equals(this.startDate, createCoupon.startDate) && + Objects.equals(this.endDate, createCoupon.endDate) && + Objects.equals(this.format, createCoupon.format) && + Objects.equals(this.images, createCoupon.images) && + Objects.equals(this.showEvery, createCoupon.showEvery) && + Objects.equals(this.showDuration, createCoupon.showDuration) && + Objects.equals(this.rotationsNumber, createCoupon.rotationsNumber)&& + Objects.equals(this.additionalProperties, createCoupon.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, adSetId, landingPageUrl, startDate, endDate, format, images, showEvery, showDuration, rotationsNumber, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCoupon {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" adSetId: ").append(toIndentedString(adSetId)).append("\n"); + sb.append(" landingPageUrl: ").append(toIndentedString(landingPageUrl)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" format: ").append(toIndentedString(format)).append("\n"); + sb.append(" images: ").append(toIndentedString(images)).append("\n"); + sb.append(" showEvery: ").append(toIndentedString(showEvery)).append("\n"); + sb.append(" showDuration: ").append(toIndentedString(showDuration)).append("\n"); + sb.append(" rotationsNumber: ").append(toIndentedString(rotationsNumber)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("adSetId"); + openapiFields.add("landingPageUrl"); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + openapiFields.add("format"); + openapiFields.add("images"); + openapiFields.add("showEvery"); + openapiFields.add("showDuration"); + openapiFields.add("rotationsNumber"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("adSetId"); + openapiRequiredFields.add("landingPageUrl"); + openapiRequiredFields.add("startDate"); + openapiRequiredFields.add("format"); + openapiRequiredFields.add("images"); + openapiRequiredFields.add("showEvery"); + openapiRequiredFields.add("showDuration"); + openapiRequiredFields.add("rotationsNumber"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateCoupon + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateCoupon.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCoupon is not found in the empty JSON string", CreateCoupon.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateCoupon.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("adSetId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `adSetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("adSetId").toString())); + } + if (!jsonObj.get("landingPageUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `landingPageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("landingPageUrl").toString())); + } + if (!jsonObj.get("startDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `startDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("startDate").toString())); + } + if ((jsonObj.get("endDate") != null && !jsonObj.get("endDate").isJsonNull()) && !jsonObj.get("endDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); + } + if (!jsonObj.get("format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("images").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `images` to be an array in the JSON string but got `%s`", jsonObj.get("images").toString())); + } + + JsonArray jsonArrayimages = jsonObj.getAsJsonArray("images"); + // validate the required field `images` (array) + for (int i = 0; i < jsonArrayimages.size(); i++) { + CreateImageSlide.validateJsonObject(jsonArrayimages.get(i).getAsJsonObject()); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCoupon.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCoupon' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCoupon.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCoupon value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateCoupon read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateCoupon instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateCoupon given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCoupon + * @throws IOException if the JSON string is invalid with respect to CreateCoupon + */ + public static CreateCoupon fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCoupon.class); + } + + /** + * Convert an instance of CreateCoupon to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCouponRequest.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCouponRequest.java new file mode 100644 index 00000000..31b364e9 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCouponRequest.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateCouponResource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for input resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateCouponRequest { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreateCouponResource data; + + public CreateCouponRequest() { + } + + public CreateCouponRequest data(CreateCouponResource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public CreateCouponResource getData() { + return data; + } + + + public void setData(CreateCouponResource data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateCouponRequest instance itself + */ + public CreateCouponRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCouponRequest createCouponRequest = (CreateCouponRequest) o; + return Objects.equals(this.data, createCouponRequest.data)&& + Objects.equals(this.additionalProperties, createCouponRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCouponRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateCouponRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateCouponRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCouponRequest is not found in the empty JSON string", CreateCouponRequest.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateCouponResource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateCouponRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCouponRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCouponRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateCouponRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateCouponRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateCouponRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateCouponRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateCouponRequest + * @throws IOException if the JSON string is invalid with respect to CreateCouponRequest + */ + public static CreateCouponRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCouponRequest.class); + } + + /** + * Convert an instance of CreateCouponRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignReadResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCouponResource.java similarity index 79% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignReadResource.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCouponResource.java index f675ea57..c0b28828 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignReadResource.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateCouponResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.Campaign; +import com.criteo.api.marketingsolutions.v2024_07.model.CreateCoupon; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +43,17 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** - * read model data for resources + * Data model for a Resource */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CampaignReadResource { +public class CreateCouponResource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CreateCoupon attributes; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) private String id; @@ -58,68 +62,72 @@ public class CampaignReadResource { @SerializedName(SERIALIZED_NAME_TYPE) private String type; - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private Campaign attributes; - - public CampaignReadResource() { + public CreateCouponResource() { } - - public CampaignReadResource( - String id, - String type - ) { - this(); - this.id = id; - this.type = type; + public CreateCouponResource attributes(CreateCoupon attributes) { + + this.attributes = attributes; + return this; } /** - * Id of the entity - * @return id + * Get attributes + * @return attributes **/ @javax.annotation.Nullable - public String getId() { - return id; + public CreateCoupon getAttributes() { + return attributes; } + public void setAttributes(CreateCoupon attributes) { + this.attributes = attributes; + } + public CreateCouponResource id(String id) { + + this.id = id; + return this; + } + /** - * Get type - * @return type + * Get id + * @return id **/ @javax.annotation.Nullable - public String getType() { - return type; + public String getId() { + return id; } + public void setId(String id) { + this.id = id; + } - public CampaignReadResource attributes(Campaign attributes) { + public CreateCouponResource type(String type) { - this.attributes = attributes; + this.type = type; return this; } /** - * Get attributes - * @return attributes + * Get type + * @return type **/ @javax.annotation.Nullable - public Campaign getAttributes() { - return attributes; + public String getType() { + return type; } - public void setAttributes(Campaign attributes) { - this.attributes = attributes; + public void setType(String type) { + this.type = type; } /** @@ -135,9 +143,9 @@ public void setAttributes(Campaign attributes) { * * @param key name of the property * @param value value of the property - * @return the CampaignReadResource instance itself + * @return the CreateCouponResource instance itself */ - public CampaignReadResource putAdditionalProperty(String key, Object value) { + public CreateCouponResource putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -176,11 +184,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CampaignReadResource campaignReadResource = (CampaignReadResource) o; - return Objects.equals(this.id, campaignReadResource.id) && - Objects.equals(this.type, campaignReadResource.type) && - Objects.equals(this.attributes, campaignReadResource.attributes)&& - Objects.equals(this.additionalProperties, campaignReadResource.additionalProperties); + CreateCouponResource createCouponResource = (CreateCouponResource) o; + return Objects.equals(this.attributes, createCouponResource.attributes) && + Objects.equals(this.id, createCouponResource.id) && + Objects.equals(this.type, createCouponResource.type)&& + Objects.equals(this.additionalProperties, createCouponResource.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -189,7 +197,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, type, attributes, additionalProperties); + return Objects.hash(attributes, id, type, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -202,10 +210,10 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CampaignReadResource {\n"); + sb.append("class CreateCouponResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -229,9 +237,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("attributes"); openapiFields.add("id"); openapiFields.add("type"); - openapiFields.add("attributes"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -241,40 +249,40 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CampaignReadResource + * @throws IOException if the JSON Object is invalid with respect to CreateCouponResource */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!CampaignReadResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignReadResource is not found in the empty JSON string", CampaignReadResource.openapiRequiredFields.toString())); + if (!CreateCouponResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCouponResource is not found in the empty JSON string", CreateCouponResource.openapiRequiredFields.toString())); } } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + CreateCoupon.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - Campaign.validateJsonObject(jsonObj.getAsJsonObject("attributes")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CampaignReadResource.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CampaignReadResource' and its subtypes + if (!CreateCouponResource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateCouponResource' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CampaignReadResource.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateCouponResource.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CampaignReadResource value) throws IOException { + public void write(JsonWriter out, CreateCouponResource value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -297,11 +305,11 @@ else if (entry.getValue() instanceof Character) } @Override - public CampaignReadResource read(JsonReader in) throws IOException { + public CreateCouponResource read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - CampaignReadResource instance = thisAdapter.fromJsonTree(jsonObj); + CreateCouponResource instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -328,18 +336,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of CampaignReadResource given an JSON string + * Create an instance of CreateCouponResource given an JSON string * * @param jsonString JSON string - * @return An instance of CampaignReadResource - * @throws IOException if the JSON string is invalid with respect to CampaignReadResource + * @return An instance of CreateCouponResource + * @throws IOException if the JSON string is invalid with respect to CreateCouponResource */ - public static CampaignReadResource fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CampaignReadResource.class); + public static CreateCouponResource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateCouponResource.class); } /** - * Convert an instance of CampaignReadResource to an JSON string + * Convert an instance of CreateCouponResource to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateImageSlide.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateImageSlide.java new file mode 100644 index 00000000..c14b721e --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreateImageSlide.java @@ -0,0 +1,361 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Slide containing the images of the same size as a base-64 encoded string + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateImageSlide { + public static final String SERIALIZED_NAME_WIDTH = "width"; + @SerializedName(SERIALIZED_NAME_WIDTH) + private Integer width; + + public static final String SERIALIZED_NAME_HEIGHT = "height"; + @SerializedName(SERIALIZED_NAME_HEIGHT) + private Integer height; + + public static final String SERIALIZED_NAME_SLIDE_BASE64_STRINGS = "slideBase64Strings"; + @SerializedName(SERIALIZED_NAME_SLIDE_BASE64_STRINGS) + private List slideBase64Strings = null; + + public CreateImageSlide() { + } + + public CreateImageSlide width(Integer width) { + + this.width = width; + return this; + } + + /** + * Width of the Coupon slide + * @return width + **/ + @javax.annotation.Nullable + + public Integer getWidth() { + return width; + } + + + public void setWidth(Integer width) { + this.width = width; + } + + + public CreateImageSlide height(Integer height) { + + this.height = height; + return this; + } + + /** + * Height of the Coupon slide + * @return height + **/ + @javax.annotation.Nullable + + public Integer getHeight() { + return height; + } + + + public void setHeight(Integer height) { + this.height = height; + } + + + public CreateImageSlide slideBase64Strings(List slideBase64Strings) { + + this.slideBase64Strings = slideBase64Strings; + return this; + } + + public CreateImageSlide addSlideBase64StringsItem(String slideBase64StringsItem) { + if (this.slideBase64Strings == null) { + this.slideBase64Strings = null; + } + this.slideBase64Strings.add(slideBase64StringsItem); + return this; + } + + /** + * Array of images of the same size as a base-64 encoded string + * @return slideBase64Strings + **/ + @javax.annotation.Nullable + + public List getSlideBase64Strings() { + return slideBase64Strings; + } + + + public void setSlideBase64Strings(List slideBase64Strings) { + this.slideBase64Strings = slideBase64Strings; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateImageSlide instance itself + */ + public CreateImageSlide putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateImageSlide createImageSlide = (CreateImageSlide) o; + return Objects.equals(this.width, createImageSlide.width) && + Objects.equals(this.height, createImageSlide.height) && + Objects.equals(this.slideBase64Strings, createImageSlide.slideBase64Strings)&& + Objects.equals(this.additionalProperties, createImageSlide.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(width, height, slideBase64Strings, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateImageSlide {\n"); + sb.append(" width: ").append(toIndentedString(width)).append("\n"); + sb.append(" height: ").append(toIndentedString(height)).append("\n"); + sb.append(" slideBase64Strings: ").append(toIndentedString(slideBase64Strings)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("width"); + openapiFields.add("height"); + openapiFields.add("slideBase64Strings"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateImageSlide + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateImageSlide.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateImageSlide is not found in the empty JSON string", CreateImageSlide.openapiRequiredFields.toString())); + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("slideBase64Strings") != null && !jsonObj.get("slideBase64Strings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `slideBase64Strings` to be an array in the JSON string but got `%s`", jsonObj.get("slideBase64Strings").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateImageSlide.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateImageSlide' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateImageSlide.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateImageSlide value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateImageSlide read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateImageSlide instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateImageSlide given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateImageSlide + * @throws IOException if the JSON string is invalid with respect to CreateImageSlide + */ + public static CreateImageSlide fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateImageSlide.class); + } + + /** + * Convert an instance of CreateImageSlide to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Creative.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Creative.java new file mode 100644 index 00000000..27c4ff23 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Creative.java @@ -0,0 +1,631 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AdaptiveAttributes; +import com.criteo.api.marketingsolutions.v2024_07.model.DynamicAttributes; +import com.criteo.api.marketingsolutions.v2024_07.model.HtmlTagAttributes; +import com.criteo.api.marketingsolutions.v2024_07.model.ImageAttributes; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A creative is a project with the necessary information to display a creative + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Creative { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_AUTHOR = "author"; + @SerializedName(SERIALIZED_NAME_AUTHOR) + private String author; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_FORMAT = "format"; + @SerializedName(SERIALIZED_NAME_FORMAT) + private String format; + + public static final String SERIALIZED_NAME_ADVERTISER_ID = "advertiserId"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_ID) + private String advertiserId; + + public static final String SERIALIZED_NAME_DATASET_ID = "datasetId"; + @SerializedName(SERIALIZED_NAME_DATASET_ID) + private String datasetId; + + public static final String SERIALIZED_NAME_IMAGE_ATTRIBUTES = "imageAttributes"; + @SerializedName(SERIALIZED_NAME_IMAGE_ATTRIBUTES) + private ImageAttributes imageAttributes; + + public static final String SERIALIZED_NAME_HTML_TAG_ATTRIBUTES = "htmlTagAttributes"; + @SerializedName(SERIALIZED_NAME_HTML_TAG_ATTRIBUTES) + private HtmlTagAttributes htmlTagAttributes; + + public static final String SERIALIZED_NAME_DYNAMIC_ATTRIBUTES = "dynamicAttributes"; + @SerializedName(SERIALIZED_NAME_DYNAMIC_ATTRIBUTES) + private DynamicAttributes dynamicAttributes; + + public static final String SERIALIZED_NAME_ADAPTIVE_ATTRIBUTES = "adaptiveAttributes"; + @SerializedName(SERIALIZED_NAME_ADAPTIVE_ATTRIBUTES) + private AdaptiveAttributes adaptiveAttributes; + + public Creative() { + } + + public Creative name(String name) { + + this.name = name; + return this; + } + + /** + * The name of the creative + * @return name + **/ + @javax.annotation.Nonnull + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public Creative description(String description) { + + this.description = description; + return this; + } + + /** + * The description of the creative + * @return description + **/ + @javax.annotation.Nullable + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public Creative author(String author) { + + this.author = author; + return this; + } + + /** + * The login of the person who created this creative ( + * @return author + **/ + @javax.annotation.Nonnull + + public String getAuthor() { + return author; + } + + + public void setAuthor(String author) { + this.author = author; + } + + + public Creative status(String status) { + + this.status = status; + return this; + } + + /** + * The status of the creative + * @return status + **/ + @javax.annotation.Nonnull + + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + public Creative format(String format) { + + this.format = format; + return this; + } + + /** + * The format of the creative + * @return format + **/ + @javax.annotation.Nullable + + public String getFormat() { + return format; + } + + + public void setFormat(String format) { + this.format = format; + } + + + public Creative advertiserId(String advertiserId) { + + this.advertiserId = advertiserId; + return this; + } + + /** + * Advertiser linked to the Creative + * @return advertiserId + **/ + @javax.annotation.Nonnull + + public String getAdvertiserId() { + return advertiserId; + } + + + public void setAdvertiserId(String advertiserId) { + this.advertiserId = advertiserId; + } + + + public Creative datasetId(String datasetId) { + + this.datasetId = datasetId; + return this; + } + + /** + * Data set id linked to the Creative + * @return datasetId + **/ + @javax.annotation.Nullable + + public String getDatasetId() { + return datasetId; + } + + + public void setDatasetId(String datasetId) { + this.datasetId = datasetId; + } + + + public Creative imageAttributes(ImageAttributes imageAttributes) { + + this.imageAttributes = imageAttributes; + return this; + } + + /** + * Get imageAttributes + * @return imageAttributes + **/ + @javax.annotation.Nullable + + public ImageAttributes getImageAttributes() { + return imageAttributes; + } + + + public void setImageAttributes(ImageAttributes imageAttributes) { + this.imageAttributes = imageAttributes; + } + + + public Creative htmlTagAttributes(HtmlTagAttributes htmlTagAttributes) { + + this.htmlTagAttributes = htmlTagAttributes; + return this; + } + + /** + * Get htmlTagAttributes + * @return htmlTagAttributes + **/ + @javax.annotation.Nullable + + public HtmlTagAttributes getHtmlTagAttributes() { + return htmlTagAttributes; + } + + + public void setHtmlTagAttributes(HtmlTagAttributes htmlTagAttributes) { + this.htmlTagAttributes = htmlTagAttributes; + } + + + public Creative dynamicAttributes(DynamicAttributes dynamicAttributes) { + + this.dynamicAttributes = dynamicAttributes; + return this; + } + + /** + * Get dynamicAttributes + * @return dynamicAttributes + **/ + @javax.annotation.Nullable + + public DynamicAttributes getDynamicAttributes() { + return dynamicAttributes; + } + + + public void setDynamicAttributes(DynamicAttributes dynamicAttributes) { + this.dynamicAttributes = dynamicAttributes; + } + + + public Creative adaptiveAttributes(AdaptiveAttributes adaptiveAttributes) { + + this.adaptiveAttributes = adaptiveAttributes; + return this; + } + + /** + * Get adaptiveAttributes + * @return adaptiveAttributes + **/ + @javax.annotation.Nullable + + public AdaptiveAttributes getAdaptiveAttributes() { + return adaptiveAttributes; + } + + + public void setAdaptiveAttributes(AdaptiveAttributes adaptiveAttributes) { + this.adaptiveAttributes = adaptiveAttributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Creative instance itself + */ + public Creative putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Creative creative = (Creative) o; + return Objects.equals(this.name, creative.name) && + Objects.equals(this.description, creative.description) && + Objects.equals(this.author, creative.author) && + Objects.equals(this.status, creative.status) && + Objects.equals(this.format, creative.format) && + Objects.equals(this.advertiserId, creative.advertiserId) && + Objects.equals(this.datasetId, creative.datasetId) && + Objects.equals(this.imageAttributes, creative.imageAttributes) && + Objects.equals(this.htmlTagAttributes, creative.htmlTagAttributes) && + Objects.equals(this.dynamicAttributes, creative.dynamicAttributes) && + Objects.equals(this.adaptiveAttributes, creative.adaptiveAttributes)&& + Objects.equals(this.additionalProperties, creative.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, author, status, format, advertiserId, datasetId, imageAttributes, htmlTagAttributes, dynamicAttributes, adaptiveAttributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Creative {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" format: ").append(toIndentedString(format)).append("\n"); + sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" imageAttributes: ").append(toIndentedString(imageAttributes)).append("\n"); + sb.append(" htmlTagAttributes: ").append(toIndentedString(htmlTagAttributes)).append("\n"); + sb.append(" dynamicAttributes: ").append(toIndentedString(dynamicAttributes)).append("\n"); + sb.append(" adaptiveAttributes: ").append(toIndentedString(adaptiveAttributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("author"); + openapiFields.add("status"); + openapiFields.add("format"); + openapiFields.add("advertiserId"); + openapiFields.add("datasetId"); + openapiFields.add("imageAttributes"); + openapiFields.add("htmlTagAttributes"); + openapiFields.add("dynamicAttributes"); + openapiFields.add("adaptiveAttributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("author"); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("advertiserId"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to Creative + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!Creative.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Creative is not found in the empty JSON string", Creative.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Creative.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("author").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `author` to be a primitive type in the JSON string but got `%s`", jsonObj.get("author").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); + } + if (!jsonObj.get("advertiserId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("advertiserId").toString())); + } + if ((jsonObj.get("datasetId") != null && !jsonObj.get("datasetId").isJsonNull()) && !jsonObj.get("datasetId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `datasetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("datasetId").toString())); + } + // validate the optional field `imageAttributes` + if (jsonObj.get("imageAttributes") != null && !jsonObj.get("imageAttributes").isJsonNull()) { + ImageAttributes.validateJsonObject(jsonObj.getAsJsonObject("imageAttributes")); + } + // validate the optional field `htmlTagAttributes` + if (jsonObj.get("htmlTagAttributes") != null && !jsonObj.get("htmlTagAttributes").isJsonNull()) { + HtmlTagAttributes.validateJsonObject(jsonObj.getAsJsonObject("htmlTagAttributes")); + } + // validate the optional field `dynamicAttributes` + if (jsonObj.get("dynamicAttributes") != null && !jsonObj.get("dynamicAttributes").isJsonNull()) { + DynamicAttributes.validateJsonObject(jsonObj.getAsJsonObject("dynamicAttributes")); + } + // validate the optional field `adaptiveAttributes` + if (jsonObj.get("adaptiveAttributes") != null && !jsonObj.get("adaptiveAttributes").isJsonNull()) { + AdaptiveAttributes.validateJsonObject(jsonObj.getAsJsonObject("adaptiveAttributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Creative.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Creative' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Creative.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Creative value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Creative read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + Creative instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Creative given an JSON string + * + * @param jsonString JSON string + * @return An instance of Creative + * @throws IOException if the JSON string is invalid with respect to Creative + */ + public static Creative fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Creative.class); + } + + /** + * Convert an instance of Creative to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeListResponse.java similarity index 82% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignListResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeListResponse.java index 2da0dea6..a6f1bf74 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignListResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.CampaignReadResource; -import com.criteo.api.marketingsolutions.v2023_04.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.CreativeResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,16 +46,16 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** - * List of output resources + * Data model for a list of response resources */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CampaignListResponse { +public class CreativeListResponse { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = null; + private List data = null; public static final String SERIALIZED_NAME_WARNINGS = "warnings"; @SerializedName(SERIALIZED_NAME_WARNINGS) @@ -65,32 +65,47 @@ public class CampaignListResponse { @SerializedName(SERIALIZED_NAME_ERRORS) private List errors = null; - public CampaignListResponse() { + public CreativeListResponse() { } - public CampaignListResponse( - List data, + public CreativeListResponse( List warnings, List errors ) { this(); - this.data = data; this.warnings = warnings; this.errors = errors; } + public CreativeListResponse data(List data) { + + this.data = data; + return this; + } + + public CreativeListResponse addDataItem(CreativeResource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + /** * Get data * @return data **/ @javax.annotation.Nullable - public List getData() { + public List getData() { return data; } + public void setData(List data) { + this.data = data; + } /** @@ -131,9 +146,9 @@ public List getErrors() { * * @param key name of the property * @param value value of the property - * @return the CampaignListResponse instance itself + * @return the CreativeListResponse instance itself */ - public CampaignListResponse putAdditionalProperty(String key, Object value) { + public CreativeListResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -172,11 +187,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CampaignListResponse campaignListResponse = (CampaignListResponse) o; - return Objects.equals(this.data, campaignListResponse.data) && - Objects.equals(this.warnings, campaignListResponse.warnings) && - Objects.equals(this.errors, campaignListResponse.errors)&& - Objects.equals(this.additionalProperties, campaignListResponse.additionalProperties); + CreativeListResponse creativeListResponse = (CreativeListResponse) o; + return Objects.equals(this.data, creativeListResponse.data) && + Objects.equals(this.warnings, creativeListResponse.warnings) && + Objects.equals(this.errors, creativeListResponse.errors)&& + Objects.equals(this.additionalProperties, creativeListResponse.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -198,7 +213,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CampaignListResponse {\n"); + sb.append("class CreativeListResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); @@ -237,12 +252,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CampaignListResponse + * @throws IOException if the JSON Object is invalid with respect to CreativeListResponse */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!CampaignListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignListResponse is not found in the empty JSON string", CampaignListResponse.openapiRequiredFields.toString())); + if (!CreativeListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreativeListResponse is not found in the empty JSON string", CreativeListResponse.openapiRequiredFields.toString())); } } if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { @@ -255,7 +270,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `data` (array) for (int i = 0; i < jsonArraydata.size(); i++) { - CampaignReadResource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + CreativeResource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); }; } } @@ -293,16 +308,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CampaignListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CampaignListResponse' and its subtypes + if (!CreativeListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreativeListResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CampaignListResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreativeListResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CampaignListResponse value) throws IOException { + public void write(JsonWriter out, CreativeListResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -325,11 +340,11 @@ else if (entry.getValue() instanceof Character) } @Override - public CampaignListResponse read(JsonReader in) throws IOException { + public CreativeListResponse read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - CampaignListResponse instance = thisAdapter.fromJsonTree(jsonObj); + CreativeListResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -356,18 +371,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of CampaignListResponse given an JSON string + * Create an instance of CreativeListResponse given an JSON string * * @param jsonString JSON string - * @return An instance of CampaignListResponse - * @throws IOException if the JSON string is invalid with respect to CampaignListResponse + * @return An instance of CreativeListResponse + * @throws IOException if the JSON string is invalid with respect to CreativeListResponse */ - public static CampaignListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CampaignListResponse.class); + public static CreativeListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreativeListResponse.class); } /** - * Convert an instance of CampaignListResponse to an JSON string + * Convert an instance of CreativeListResponse to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeResource.java new file mode 100644 index 00000000..426fa8f1 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeResource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.Creative; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreativeResource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private Creative attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public CreativeResource() { + } + + public CreativeResource attributes(Creative attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public Creative getAttributes() { + return attributes; + } + + + public void setAttributes(Creative attributes) { + this.attributes = attributes; + } + + + public CreativeResource id(String id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public CreativeResource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreativeResource instance itself + */ + public CreativeResource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreativeResource creativeResource = (CreativeResource) o; + return Objects.equals(this.attributes, creativeResource.attributes) && + Objects.equals(this.id, creativeResource.id) && + Objects.equals(this.type, creativeResource.type)&& + Objects.equals(this.additionalProperties, creativeResource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreativeResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreativeResource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreativeResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreativeResource is not found in the empty JSON string", CreativeResource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + Creative.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreativeResource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreativeResource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreativeResource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreativeResource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreativeResource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreativeResource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreativeResource given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreativeResource + * @throws IOException if the JSON string is invalid with respect to CreativeResource + */ + public static CreativeResource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreativeResource.class); + } + + /** + * Convert an instance of CreativeResource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeResponse.java similarity index 83% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeResponse.java index 1ff3584b..9b2f67e4 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CampaignResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.CampaignReadResource; -import com.criteo.api.marketingsolutions.v2023_04.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.CreativeResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,16 +46,16 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** - * output resource + * Data model for response resource */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CampaignResponse { +public class CreativeResponse { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private CampaignReadResource data; + private CreativeResource data; public static final String SERIALIZED_NAME_WARNINGS = "warnings"; @SerializedName(SERIALIZED_NAME_WARNINGS) @@ -65,11 +65,11 @@ public class CampaignResponse { @SerializedName(SERIALIZED_NAME_ERRORS) private List errors = null; - public CampaignResponse() { + public CreativeResponse() { } - public CampaignResponse( + public CreativeResponse( List warnings, List errors ) { @@ -78,7 +78,7 @@ public CampaignResponse( this.errors = errors; } - public CampaignResponse data(CampaignReadResource data) { + public CreativeResponse data(CreativeResource data) { this.data = data; return this; @@ -90,12 +90,12 @@ public CampaignResponse data(CampaignReadResource data) { **/ @javax.annotation.Nullable - public CampaignReadResource getData() { + public CreativeResource getData() { return data; } - public void setData(CampaignReadResource data) { + public void setData(CreativeResource data) { this.data = data; } @@ -138,9 +138,9 @@ public List getErrors() { * * @param key name of the property * @param value value of the property - * @return the CampaignResponse instance itself + * @return the CreativeResponse instance itself */ - public CampaignResponse putAdditionalProperty(String key, Object value) { + public CreativeResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -179,11 +179,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CampaignResponse campaignResponse = (CampaignResponse) o; - return Objects.equals(this.data, campaignResponse.data) && - Objects.equals(this.warnings, campaignResponse.warnings) && - Objects.equals(this.errors, campaignResponse.errors)&& - Objects.equals(this.additionalProperties, campaignResponse.additionalProperties); + CreativeResponse creativeResponse = (CreativeResponse) o; + return Objects.equals(this.data, creativeResponse.data) && + Objects.equals(this.warnings, creativeResponse.warnings) && + Objects.equals(this.errors, creativeResponse.errors)&& + Objects.equals(this.additionalProperties, creativeResponse.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -205,7 +205,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CampaignResponse {\n"); + sb.append("class CreativeResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); @@ -244,17 +244,17 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CampaignResponse + * @throws IOException if the JSON Object is invalid with respect to CreativeResponse */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!CampaignResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignResponse is not found in the empty JSON string", CampaignResponse.openapiRequiredFields.toString())); + if (!CreativeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreativeResponse is not found in the empty JSON string", CreativeResponse.openapiRequiredFields.toString())); } } // validate the optional field `data` if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - CampaignReadResource.validateJsonObject(jsonObj.getAsJsonObject("data")); + CreativeResource.validateJsonObject(jsonObj.getAsJsonObject("data")); } if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); @@ -290,16 +290,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!CampaignResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CampaignResponse' and its subtypes + if (!CreativeResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreativeResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CampaignResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreativeResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CampaignResponse value) throws IOException { + public void write(JsonWriter out, CreativeResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -322,11 +322,11 @@ else if (entry.getValue() instanceof Character) } @Override - public CampaignResponse read(JsonReader in) throws IOException { + public CreativeResponse read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - CampaignResponse instance = thisAdapter.fromJsonTree(jsonObj); + CreativeResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -353,18 +353,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of CampaignResponse given an JSON string + * Create an instance of CreativeResponse given an JSON string * * @param jsonString JSON string - * @return An instance of CampaignResponse - * @throws IOException if the JSON string is invalid with respect to CampaignResponse + * @return An instance of CreativeResponse + * @throws IOException if the JSON string is invalid with respect to CreativeResponse */ - public static CampaignResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CampaignResponse.class); + public static CreativeResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreativeResponse.class); } /** - * Convert an instance of CampaignResponse to an JSON string + * Convert an instance of CreativeResponse to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWrite.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWrite.java new file mode 100644 index 00000000..ae695b30 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWrite.java @@ -0,0 +1,585 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.AdaptiveWriteAttributes; +import com.criteo.api.marketingsolutions.v2024_07.model.DynamicWriteAttributes; +import com.criteo.api.marketingsolutions.v2024_07.model.HtmlTagWriteAttributes; +import com.criteo.api.marketingsolutions.v2024_07.model.ImageWriteAttributes; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Entity to create or update a creative + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreativeWrite { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + /** + * The format of the creative You can use \"Image\", \" HtmlTag\", \"Dynamic\" or \"Adaptive\" + */ + @JsonAdapter(FormatEnum.Adapter.class) + public enum FormatEnum { + IMAGE("Image"), + + HTMLTAG("HtmlTag"), + + DYNAMIC("Dynamic"), + + ADAPTIVE("Adaptive"); + + private String value; + + FormatEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FormatEnum fromValue(String value) { + for (FormatEnum b : FormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FormatEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_FORMAT = "format"; + @SerializedName(SERIALIZED_NAME_FORMAT) + private FormatEnum format; + + public static final String SERIALIZED_NAME_DATASET_ID = "datasetId"; + @SerializedName(SERIALIZED_NAME_DATASET_ID) + private String datasetId; + + public static final String SERIALIZED_NAME_IMAGE_WRITE_ATTRIBUTES = "imageWriteAttributes"; + @SerializedName(SERIALIZED_NAME_IMAGE_WRITE_ATTRIBUTES) + private ImageWriteAttributes imageWriteAttributes; + + public static final String SERIALIZED_NAME_HTML_TAG_WRITE_ATTRIBUTES = "htmlTagWriteAttributes"; + @SerializedName(SERIALIZED_NAME_HTML_TAG_WRITE_ATTRIBUTES) + private HtmlTagWriteAttributes htmlTagWriteAttributes; + + public static final String SERIALIZED_NAME_DYNAMIC_WRITE_ATTRIBUTES = "dynamicWriteAttributes"; + @SerializedName(SERIALIZED_NAME_DYNAMIC_WRITE_ATTRIBUTES) + private DynamicWriteAttributes dynamicWriteAttributes; + + public static final String SERIALIZED_NAME_ADAPTIVE_WRITE_ATTRIBUTES = "adaptiveWriteAttributes"; + @SerializedName(SERIALIZED_NAME_ADAPTIVE_WRITE_ATTRIBUTES) + private AdaptiveWriteAttributes adaptiveWriteAttributes; + + public CreativeWrite() { + } + + public CreativeWrite name(String name) { + + this.name = name; + return this; + } + + /** + * The name of the creative + * @return name + **/ + @javax.annotation.Nonnull + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public CreativeWrite description(String description) { + + this.description = description; + return this; + } + + /** + * The description of the creative + * @return description + **/ + @javax.annotation.Nullable + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public CreativeWrite format(FormatEnum format) { + + this.format = format; + return this; + } + + /** + * The format of the creative You can use \"Image\", \" HtmlTag\", \"Dynamic\" or \"Adaptive\" + * @return format + **/ + @javax.annotation.Nonnull + + public FormatEnum getFormat() { + return format; + } + + + public void setFormat(FormatEnum format) { + this.format = format; + } + + + public CreativeWrite datasetId(String datasetId) { + + this.datasetId = datasetId; + return this; + } + + /** + * Dataset linked to the Creative + * @return datasetId + **/ + @javax.annotation.Nonnull + + public String getDatasetId() { + return datasetId; + } + + + public void setDatasetId(String datasetId) { + this.datasetId = datasetId; + } + + + public CreativeWrite imageWriteAttributes(ImageWriteAttributes imageWriteAttributes) { + + this.imageWriteAttributes = imageWriteAttributes; + return this; + } + + /** + * Get imageWriteAttributes + * @return imageWriteAttributes + **/ + @javax.annotation.Nullable + + public ImageWriteAttributes getImageWriteAttributes() { + return imageWriteAttributes; + } + + + public void setImageWriteAttributes(ImageWriteAttributes imageWriteAttributes) { + this.imageWriteAttributes = imageWriteAttributes; + } + + + public CreativeWrite htmlTagWriteAttributes(HtmlTagWriteAttributes htmlTagWriteAttributes) { + + this.htmlTagWriteAttributes = htmlTagWriteAttributes; + return this; + } + + /** + * Get htmlTagWriteAttributes + * @return htmlTagWriteAttributes + **/ + @javax.annotation.Nullable + + public HtmlTagWriteAttributes getHtmlTagWriteAttributes() { + return htmlTagWriteAttributes; + } + + + public void setHtmlTagWriteAttributes(HtmlTagWriteAttributes htmlTagWriteAttributes) { + this.htmlTagWriteAttributes = htmlTagWriteAttributes; + } + + + public CreativeWrite dynamicWriteAttributes(DynamicWriteAttributes dynamicWriteAttributes) { + + this.dynamicWriteAttributes = dynamicWriteAttributes; + return this; + } + + /** + * Get dynamicWriteAttributes + * @return dynamicWriteAttributes + **/ + @javax.annotation.Nullable + + public DynamicWriteAttributes getDynamicWriteAttributes() { + return dynamicWriteAttributes; + } + + + public void setDynamicWriteAttributes(DynamicWriteAttributes dynamicWriteAttributes) { + this.dynamicWriteAttributes = dynamicWriteAttributes; + } + + + public CreativeWrite adaptiveWriteAttributes(AdaptiveWriteAttributes adaptiveWriteAttributes) { + + this.adaptiveWriteAttributes = adaptiveWriteAttributes; + return this; + } + + /** + * Get adaptiveWriteAttributes + * @return adaptiveWriteAttributes + **/ + @javax.annotation.Nullable + + public AdaptiveWriteAttributes getAdaptiveWriteAttributes() { + return adaptiveWriteAttributes; + } + + + public void setAdaptiveWriteAttributes(AdaptiveWriteAttributes adaptiveWriteAttributes) { + this.adaptiveWriteAttributes = adaptiveWriteAttributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreativeWrite instance itself + */ + public CreativeWrite putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreativeWrite creativeWrite = (CreativeWrite) o; + return Objects.equals(this.name, creativeWrite.name) && + Objects.equals(this.description, creativeWrite.description) && + Objects.equals(this.format, creativeWrite.format) && + Objects.equals(this.datasetId, creativeWrite.datasetId) && + Objects.equals(this.imageWriteAttributes, creativeWrite.imageWriteAttributes) && + Objects.equals(this.htmlTagWriteAttributes, creativeWrite.htmlTagWriteAttributes) && + Objects.equals(this.dynamicWriteAttributes, creativeWrite.dynamicWriteAttributes) && + Objects.equals(this.adaptiveWriteAttributes, creativeWrite.adaptiveWriteAttributes)&& + Objects.equals(this.additionalProperties, creativeWrite.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, format, datasetId, imageWriteAttributes, htmlTagWriteAttributes, dynamicWriteAttributes, adaptiveWriteAttributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreativeWrite {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" format: ").append(toIndentedString(format)).append("\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" imageWriteAttributes: ").append(toIndentedString(imageWriteAttributes)).append("\n"); + sb.append(" htmlTagWriteAttributes: ").append(toIndentedString(htmlTagWriteAttributes)).append("\n"); + sb.append(" dynamicWriteAttributes: ").append(toIndentedString(dynamicWriteAttributes)).append("\n"); + sb.append(" adaptiveWriteAttributes: ").append(toIndentedString(adaptiveWriteAttributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("format"); + openapiFields.add("datasetId"); + openapiFields.add("imageWriteAttributes"); + openapiFields.add("htmlTagWriteAttributes"); + openapiFields.add("dynamicWriteAttributes"); + openapiFields.add("adaptiveWriteAttributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("format"); + openapiRequiredFields.add("datasetId"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreativeWrite + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreativeWrite.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreativeWrite is not found in the empty JSON string", CreativeWrite.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreativeWrite.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if (!jsonObj.get("format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); + } + if (!jsonObj.get("datasetId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `datasetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("datasetId").toString())); + } + // validate the optional field `imageWriteAttributes` + if (jsonObj.get("imageWriteAttributes") != null && !jsonObj.get("imageWriteAttributes").isJsonNull()) { + ImageWriteAttributes.validateJsonObject(jsonObj.getAsJsonObject("imageWriteAttributes")); + } + // validate the optional field `htmlTagWriteAttributes` + if (jsonObj.get("htmlTagWriteAttributes") != null && !jsonObj.get("htmlTagWriteAttributes").isJsonNull()) { + HtmlTagWriteAttributes.validateJsonObject(jsonObj.getAsJsonObject("htmlTagWriteAttributes")); + } + // validate the optional field `dynamicWriteAttributes` + if (jsonObj.get("dynamicWriteAttributes") != null && !jsonObj.get("dynamicWriteAttributes").isJsonNull()) { + DynamicWriteAttributes.validateJsonObject(jsonObj.getAsJsonObject("dynamicWriteAttributes")); + } + // validate the optional field `adaptiveWriteAttributes` + if (jsonObj.get("adaptiveWriteAttributes") != null && !jsonObj.get("adaptiveWriteAttributes").isJsonNull()) { + AdaptiveWriteAttributes.validateJsonObject(jsonObj.getAsJsonObject("adaptiveWriteAttributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreativeWrite.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreativeWrite' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreativeWrite.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreativeWrite value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreativeWrite read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreativeWrite instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreativeWrite given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreativeWrite + * @throws IOException if the JSON string is invalid with respect to CreativeWrite + */ + public static CreativeWrite fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreativeWrite.class); + } + + /** + * Convert an instance of CreativeWrite to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWriteRequest.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWriteRequest.java new file mode 100644 index 00000000..2afb3112 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWriteRequest.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CreativeWriteResource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for input resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreativeWriteRequest { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private CreativeWriteResource data; + + public CreativeWriteRequest() { + } + + public CreativeWriteRequest data(CreativeWriteResource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public CreativeWriteResource getData() { + return data; + } + + + public void setData(CreativeWriteResource data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreativeWriteRequest instance itself + */ + public CreativeWriteRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreativeWriteRequest creativeWriteRequest = (CreativeWriteRequest) o; + return Objects.equals(this.data, creativeWriteRequest.data)&& + Objects.equals(this.additionalProperties, creativeWriteRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreativeWriteRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreativeWriteRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreativeWriteRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreativeWriteRequest is not found in the empty JSON string", CreativeWriteRequest.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreativeWriteResource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreativeWriteRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreativeWriteRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreativeWriteRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreativeWriteRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreativeWriteRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreativeWriteRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreativeWriteRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreativeWriteRequest + * @throws IOException if the JSON string is invalid with respect to CreativeWriteRequest + */ + public static CreativeWriteRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreativeWriteRequest.class); + } + + /** + * Convert an instance of CreativeWriteRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWriteResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWriteResource.java new file mode 100644 index 00000000..00ab067c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CreativeWriteResource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CreativeWrite; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreativeWriteResource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CreativeWrite attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public CreativeWriteResource() { + } + + public CreativeWriteResource attributes(CreativeWrite attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public CreativeWrite getAttributes() { + return attributes; + } + + + public void setAttributes(CreativeWrite attributes) { + this.attributes = attributes; + } + + + public CreativeWriteResource id(String id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public CreativeWriteResource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreativeWriteResource instance itself + */ + public CreativeWriteResource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreativeWriteResource creativeWriteResource = (CreativeWriteResource) o; + return Objects.equals(this.attributes, creativeWriteResource.attributes) && + Objects.equals(this.id, creativeWriteResource.id) && + Objects.equals(this.type, creativeWriteResource.type)&& + Objects.equals(this.additionalProperties, creativeWriteResource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreativeWriteResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreativeWriteResource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreativeWriteResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreativeWriteResource is not found in the empty JSON string", CreativeWriteResource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + CreativeWrite.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreativeWriteResource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreativeWriteResource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreativeWriteResource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreativeWriteResource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreativeWriteResource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreativeWriteResource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreativeWriteResource given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreativeWriteResource + * @throws IOException if the JSON string is invalid with respect to CreativeWriteResource + */ + public static CreativeWriteResource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreativeWriteResource.class); + } + + /** + * Convert an instance of CreativeWriteResource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CriteoApiError.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CriteoApiError.java similarity index 99% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CriteoApiError.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CriteoApiError.java index 53fed12d..45b9f2d7 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CriteoApiError.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CriteoApiError.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Criteo API response error diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CriteoApiWarning.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CriteoApiWarning.java similarity index 99% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CriteoApiWarning.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CriteoApiWarning.java index ba9120d8..b3f74771 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/CriteoApiWarning.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/CriteoApiWarning.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Criteo API response warning diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/DeleteAudienceContactListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DeleteAudienceContactListResponse.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/DeleteAudienceContactListResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DeleteAudienceContactListResponse.java index 28b15d82..26748ecc 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/DeleteAudienceContactListResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DeleteAudienceContactListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceError; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceWarning; -import com.criteo.api.marketingsolutions.v2023_04.model.BasicAudienceDefinition; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceError; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceWarning; +import com.criteo.api.marketingsolutions.v2024_07.model.BasicAudienceDefinition; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Response of a contactlist deletion diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DynamicAttributes.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DynamicAttributes.java new file mode 100644 index 00000000..40812ace --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DynamicAttributes.java @@ -0,0 +1,562 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.ImageShape; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * The attributes specific to Dynamic creatives + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DynamicAttributes { + public static final String SERIALIZED_NAME_LOGOS = "logos"; + @SerializedName(SERIALIZED_NAME_LOGOS) + private List logos = null; + + public static final String SERIALIZED_NAME_CREATIVE_BACKGROUND_COLOR = "creativeBackgroundColor"; + @SerializedName(SERIALIZED_NAME_CREATIVE_BACKGROUND_COLOR) + private String creativeBackgroundColor; + + public static final String SERIALIZED_NAME_BODY_TEXT_COLOR = "bodyTextColor"; + @SerializedName(SERIALIZED_NAME_BODY_TEXT_COLOR) + private String bodyTextColor; + + public static final String SERIALIZED_NAME_PRICES_COLOR = "pricesColor"; + @SerializedName(SERIALIZED_NAME_PRICES_COLOR) + private String pricesColor; + + public static final String SERIALIZED_NAME_PRIMARY_FONT = "primaryFont"; + @SerializedName(SERIALIZED_NAME_PRIMARY_FONT) + private String primaryFont; + + public static final String SERIALIZED_NAME_CALLS_TO_ACTION = "callsToAction"; + @SerializedName(SERIALIZED_NAME_CALLS_TO_ACTION) + private List callsToAction = null; + + /** + * Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your product catalog images should fit inside the allocated space (\"ShowFullImage\") or whether they should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping. + */ + @JsonAdapter(ProductImageDisplayEnum.Adapter.class) + public enum ProductImageDisplayEnum { + SHOWFULLIMAGE("ShowFullImage"), + + ZOOMONIMAGE("ZoomOnImage"); + + private String value; + + ProductImageDisplayEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ProductImageDisplayEnum fromValue(String value) { + for (ProductImageDisplayEnum b : ProductImageDisplayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ProductImageDisplayEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ProductImageDisplayEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ProductImageDisplayEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_PRODUCT_IMAGE_DISPLAY = "productImageDisplay"; + @SerializedName(SERIALIZED_NAME_PRODUCT_IMAGE_DISPLAY) + private ProductImageDisplayEnum productImageDisplay; + + public DynamicAttributes() { + } + + public DynamicAttributes logos(List logos) { + + this.logos = logos; + return this; + } + + public DynamicAttributes addLogosItem(ImageShape logosItem) { + if (this.logos == null) { + this.logos = null; + } + this.logos.add(logosItem); + return this; + } + + /** + * Logo images uploaded on demostatic.criteo.com when deploying and then static.criteo.net + * @return logos + **/ + @javax.annotation.Nullable + + public List getLogos() { + return logos; + } + + + public void setLogos(List logos) { + this.logos = logos; + } + + + public DynamicAttributes creativeBackgroundColor(String creativeBackgroundColor) { + + this.creativeBackgroundColor = creativeBackgroundColor; + return this; + } + + /** + * Color of the creative's background Valid hexadecimal color (e.g. \"AB00FF\") + * @return creativeBackgroundColor + **/ + @javax.annotation.Nullable + + public String getCreativeBackgroundColor() { + return creativeBackgroundColor; + } + + + public void setCreativeBackgroundColor(String creativeBackgroundColor) { + this.creativeBackgroundColor = creativeBackgroundColor; + } + + + public DynamicAttributes bodyTextColor(String bodyTextColor) { + + this.bodyTextColor = bodyTextColor; + return this; + } + + /** + * Color of the creative's body text Valid hexadecimal color (e.g. \"AB00FF\") + * @return bodyTextColor + **/ + @javax.annotation.Nullable + + public String getBodyTextColor() { + return bodyTextColor; + } + + + public void setBodyTextColor(String bodyTextColor) { + this.bodyTextColor = bodyTextColor; + } + + + public DynamicAttributes pricesColor(String pricesColor) { + + this.pricesColor = pricesColor; + return this; + } + + /** + * Color of the creative's prices Valid hexadecimal color (e.g. \"AB00FF\") + * @return pricesColor + **/ + @javax.annotation.Nullable + + public String getPricesColor() { + return pricesColor; + } + + + public void setPricesColor(String pricesColor) { + this.pricesColor = pricesColor; + } + + + public DynamicAttributes primaryFont(String primaryFont) { + + this.primaryFont = primaryFont; + return this; + } + + /** + * Font of the primary font Valid supported font like \"Arial\" + * @return primaryFont + **/ + @javax.annotation.Nullable + + public String getPrimaryFont() { + return primaryFont; + } + + + public void setPrimaryFont(String primaryFont) { + this.primaryFont = primaryFont; + } + + + public DynamicAttributes callsToAction(List callsToAction) { + + this.callsToAction = callsToAction; + return this; + } + + public DynamicAttributes addCallsToActionItem(String callsToActionItem) { + if (this.callsToAction == null) { + this.callsToAction = null; + } + this.callsToAction.add(callsToActionItem); + return this; + } + + /** + * A Call-to-Action (CTA) is an action-driven instruction to your audience intended to provoke an immediate response, such as “Buy now” or “Go!”. + * @return callsToAction + **/ + @javax.annotation.Nullable + + public List getCallsToAction() { + return callsToAction; + } + + + public void setCallsToAction(List callsToAction) { + this.callsToAction = callsToAction; + } + + + public DynamicAttributes productImageDisplay(ProductImageDisplayEnum productImageDisplay) { + + this.productImageDisplay = productImageDisplay; + return this; + } + + /** + * Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your product catalog images should fit inside the allocated space (\"ShowFullImage\") or whether they should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping. + * @return productImageDisplay + **/ + @javax.annotation.Nullable + + public ProductImageDisplayEnum getProductImageDisplay() { + return productImageDisplay; + } + + + public void setProductImageDisplay(ProductImageDisplayEnum productImageDisplay) { + this.productImageDisplay = productImageDisplay; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DynamicAttributes instance itself + */ + public DynamicAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DynamicAttributes dynamicAttributes = (DynamicAttributes) o; + return Objects.equals(this.logos, dynamicAttributes.logos) && + Objects.equals(this.creativeBackgroundColor, dynamicAttributes.creativeBackgroundColor) && + Objects.equals(this.bodyTextColor, dynamicAttributes.bodyTextColor) && + Objects.equals(this.pricesColor, dynamicAttributes.pricesColor) && + Objects.equals(this.primaryFont, dynamicAttributes.primaryFont) && + Objects.equals(this.callsToAction, dynamicAttributes.callsToAction) && + Objects.equals(this.productImageDisplay, dynamicAttributes.productImageDisplay)&& + Objects.equals(this.additionalProperties, dynamicAttributes.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(logos, creativeBackgroundColor, bodyTextColor, pricesColor, primaryFont, callsToAction, productImageDisplay, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DynamicAttributes {\n"); + sb.append(" logos: ").append(toIndentedString(logos)).append("\n"); + sb.append(" creativeBackgroundColor: ").append(toIndentedString(creativeBackgroundColor)).append("\n"); + sb.append(" bodyTextColor: ").append(toIndentedString(bodyTextColor)).append("\n"); + sb.append(" pricesColor: ").append(toIndentedString(pricesColor)).append("\n"); + sb.append(" primaryFont: ").append(toIndentedString(primaryFont)).append("\n"); + sb.append(" callsToAction: ").append(toIndentedString(callsToAction)).append("\n"); + sb.append(" productImageDisplay: ").append(toIndentedString(productImageDisplay)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("logos"); + openapiFields.add("creativeBackgroundColor"); + openapiFields.add("bodyTextColor"); + openapiFields.add("pricesColor"); + openapiFields.add("primaryFont"); + openapiFields.add("callsToAction"); + openapiFields.add("productImageDisplay"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to DynamicAttributes + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!DynamicAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DynamicAttributes is not found in the empty JSON string", DynamicAttributes.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("logos") != null && !jsonObj.get("logos").isJsonNull()) { + JsonArray jsonArraylogos = jsonObj.getAsJsonArray("logos"); + if (jsonArraylogos != null) { + // ensure the json data is an array + if (!jsonObj.get("logos").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `logos` to be an array in the JSON string but got `%s`", jsonObj.get("logos").toString())); + } + + // validate the optional field `logos` (array) + for (int i = 0; i < jsonArraylogos.size(); i++) { + ImageShape.validateJsonObject(jsonArraylogos.get(i).getAsJsonObject()); + }; + } + } + if ((jsonObj.get("creativeBackgroundColor") != null && !jsonObj.get("creativeBackgroundColor").isJsonNull()) && !jsonObj.get("creativeBackgroundColor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `creativeBackgroundColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creativeBackgroundColor").toString())); + } + if ((jsonObj.get("bodyTextColor") != null && !jsonObj.get("bodyTextColor").isJsonNull()) && !jsonObj.get("bodyTextColor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bodyTextColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bodyTextColor").toString())); + } + if ((jsonObj.get("pricesColor") != null && !jsonObj.get("pricesColor").isJsonNull()) && !jsonObj.get("pricesColor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pricesColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pricesColor").toString())); + } + if ((jsonObj.get("primaryFont") != null && !jsonObj.get("primaryFont").isJsonNull()) && !jsonObj.get("primaryFont").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `primaryFont` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryFont").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("callsToAction") != null && !jsonObj.get("callsToAction").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `callsToAction` to be an array in the JSON string but got `%s`", jsonObj.get("callsToAction").toString())); + } + if ((jsonObj.get("productImageDisplay") != null && !jsonObj.get("productImageDisplay").isJsonNull()) && !jsonObj.get("productImageDisplay").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productImageDisplay` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productImageDisplay").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DynamicAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DynamicAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DynamicAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DynamicAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DynamicAttributes read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + DynamicAttributes instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DynamicAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of DynamicAttributes + * @throws IOException if the JSON string is invalid with respect to DynamicAttributes + */ + public static DynamicAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DynamicAttributes.class); + } + + /** + * Convert an instance of DynamicAttributes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DynamicWriteAttributes.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DynamicWriteAttributes.java new file mode 100644 index 00000000..423cd6e5 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/DynamicWriteAttributes.java @@ -0,0 +1,553 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * The attributes specific to create or update a Dynamic creative + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DynamicWriteAttributes { + public static final String SERIALIZED_NAME_LOGO_BASE64_STRING = "logoBase64String"; + @SerializedName(SERIALIZED_NAME_LOGO_BASE64_STRING) + private String logoBase64String; + + public static final String SERIALIZED_NAME_CREATIVE_BACKGROUND_COLOR = "creativeBackgroundColor"; + @SerializedName(SERIALIZED_NAME_CREATIVE_BACKGROUND_COLOR) + private String creativeBackgroundColor; + + public static final String SERIALIZED_NAME_BODY_TEXT_COLOR = "bodyTextColor"; + @SerializedName(SERIALIZED_NAME_BODY_TEXT_COLOR) + private String bodyTextColor; + + public static final String SERIALIZED_NAME_PRICES_COLOR = "pricesColor"; + @SerializedName(SERIALIZED_NAME_PRICES_COLOR) + private String pricesColor; + + public static final String SERIALIZED_NAME_PRIMARY_FONT = "primaryFont"; + @SerializedName(SERIALIZED_NAME_PRIMARY_FONT) + private String primaryFont; + + public static final String SERIALIZED_NAME_CALLS_TO_ACTION = "callsToAction"; + @SerializedName(SERIALIZED_NAME_CALLS_TO_ACTION) + private List callsToAction = new ArrayList<>(); + + /** + * Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your product catalog images should fit inside the allocated space (\"ShowFullImage\") or whether they should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping. + */ + @JsonAdapter(ProductImageDisplayEnum.Adapter.class) + public enum ProductImageDisplayEnum { + SHOWFULLIMAGE("ShowFullImage"), + + ZOOMONIMAGE("ZoomOnImage"); + + private String value; + + ProductImageDisplayEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ProductImageDisplayEnum fromValue(String value) { + for (ProductImageDisplayEnum b : ProductImageDisplayEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ProductImageDisplayEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ProductImageDisplayEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ProductImageDisplayEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_PRODUCT_IMAGE_DISPLAY = "productImageDisplay"; + @SerializedName(SERIALIZED_NAME_PRODUCT_IMAGE_DISPLAY) + private ProductImageDisplayEnum productImageDisplay; + + public DynamicWriteAttributes() { + } + + public DynamicWriteAttributes logoBase64String(String logoBase64String) { + + this.logoBase64String = logoBase64String; + return this; + } + + /** + * Logo image as a base-64 encoded string + * @return logoBase64String + **/ + @javax.annotation.Nonnull + + public String getLogoBase64String() { + return logoBase64String; + } + + + public void setLogoBase64String(String logoBase64String) { + this.logoBase64String = logoBase64String; + } + + + public DynamicWriteAttributes creativeBackgroundColor(String creativeBackgroundColor) { + + this.creativeBackgroundColor = creativeBackgroundColor; + return this; + } + + /** + * Color of the creative's background Valid hexadecimal RGB color (e.g. \"AB00FF\") + * @return creativeBackgroundColor + **/ + @javax.annotation.Nullable + + public String getCreativeBackgroundColor() { + return creativeBackgroundColor; + } + + + public void setCreativeBackgroundColor(String creativeBackgroundColor) { + this.creativeBackgroundColor = creativeBackgroundColor; + } + + + public DynamicWriteAttributes bodyTextColor(String bodyTextColor) { + + this.bodyTextColor = bodyTextColor; + return this; + } + + /** + * Color of the creative's body text Valid hexadecimal RGB color (e.g. \"AB00FF\") + * @return bodyTextColor + **/ + @javax.annotation.Nonnull + + public String getBodyTextColor() { + return bodyTextColor; + } + + + public void setBodyTextColor(String bodyTextColor) { + this.bodyTextColor = bodyTextColor; + } + + + public DynamicWriteAttributes pricesColor(String pricesColor) { + + this.pricesColor = pricesColor; + return this; + } + + /** + * Color of the creative's prices Valid hexadecimal RGB color (e.g. \"AB00FF\") + * @return pricesColor + **/ + @javax.annotation.Nonnull + + public String getPricesColor() { + return pricesColor; + } + + + public void setPricesColor(String pricesColor) { + this.pricesColor = pricesColor; + } + + + public DynamicWriteAttributes primaryFont(String primaryFont) { + + this.primaryFont = primaryFont; + return this; + } + + /** + * Font of the primary font Valid supported font like \"Arial\" + * @return primaryFont + **/ + @javax.annotation.Nullable + + public String getPrimaryFont() { + return primaryFont; + } + + + public void setPrimaryFont(String primaryFont) { + this.primaryFont = primaryFont; + } + + + public DynamicWriteAttributes callsToAction(List callsToAction) { + + this.callsToAction = callsToAction; + return this; + } + + public DynamicWriteAttributes addCallsToActionItem(String callsToActionItem) { + this.callsToAction.add(callsToActionItem); + return this; + } + + /** + * A Call-to-Action (CTA) is an action-driven instruction to your audience intended to provoke an immediate response, such as “Buy now” or “Go!”. + * @return callsToAction + **/ + @javax.annotation.Nonnull + + public List getCallsToAction() { + return callsToAction; + } + + + public void setCallsToAction(List callsToAction) { + this.callsToAction = callsToAction; + } + + + public DynamicWriteAttributes productImageDisplay(ProductImageDisplayEnum productImageDisplay) { + + this.productImageDisplay = productImageDisplay; + return this; + } + + /** + * Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your product catalog images should fit inside the allocated space (\"ShowFullImage\") or whether they should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping. + * @return productImageDisplay + **/ + @javax.annotation.Nonnull + + public ProductImageDisplayEnum getProductImageDisplay() { + return productImageDisplay; + } + + + public void setProductImageDisplay(ProductImageDisplayEnum productImageDisplay) { + this.productImageDisplay = productImageDisplay; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the DynamicWriteAttributes instance itself + */ + public DynamicWriteAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DynamicWriteAttributes dynamicWriteAttributes = (DynamicWriteAttributes) o; + return Objects.equals(this.logoBase64String, dynamicWriteAttributes.logoBase64String) && + Objects.equals(this.creativeBackgroundColor, dynamicWriteAttributes.creativeBackgroundColor) && + Objects.equals(this.bodyTextColor, dynamicWriteAttributes.bodyTextColor) && + Objects.equals(this.pricesColor, dynamicWriteAttributes.pricesColor) && + Objects.equals(this.primaryFont, dynamicWriteAttributes.primaryFont) && + Objects.equals(this.callsToAction, dynamicWriteAttributes.callsToAction) && + Objects.equals(this.productImageDisplay, dynamicWriteAttributes.productImageDisplay)&& + Objects.equals(this.additionalProperties, dynamicWriteAttributes.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(logoBase64String, creativeBackgroundColor, bodyTextColor, pricesColor, primaryFont, callsToAction, productImageDisplay, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DynamicWriteAttributes {\n"); + sb.append(" logoBase64String: ").append(toIndentedString(logoBase64String)).append("\n"); + sb.append(" creativeBackgroundColor: ").append(toIndentedString(creativeBackgroundColor)).append("\n"); + sb.append(" bodyTextColor: ").append(toIndentedString(bodyTextColor)).append("\n"); + sb.append(" pricesColor: ").append(toIndentedString(pricesColor)).append("\n"); + sb.append(" primaryFont: ").append(toIndentedString(primaryFont)).append("\n"); + sb.append(" callsToAction: ").append(toIndentedString(callsToAction)).append("\n"); + sb.append(" productImageDisplay: ").append(toIndentedString(productImageDisplay)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("logoBase64String"); + openapiFields.add("creativeBackgroundColor"); + openapiFields.add("bodyTextColor"); + openapiFields.add("pricesColor"); + openapiFields.add("primaryFont"); + openapiFields.add("callsToAction"); + openapiFields.add("productImageDisplay"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("logoBase64String"); + openapiRequiredFields.add("bodyTextColor"); + openapiRequiredFields.add("pricesColor"); + openapiRequiredFields.add("callsToAction"); + openapiRequiredFields.add("productImageDisplay"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to DynamicWriteAttributes + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!DynamicWriteAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DynamicWriteAttributes is not found in the empty JSON string", DynamicWriteAttributes.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DynamicWriteAttributes.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("logoBase64String").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logoBase64String` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logoBase64String").toString())); + } + if ((jsonObj.get("creativeBackgroundColor") != null && !jsonObj.get("creativeBackgroundColor").isJsonNull()) && !jsonObj.get("creativeBackgroundColor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `creativeBackgroundColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creativeBackgroundColor").toString())); + } + if (!jsonObj.get("bodyTextColor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `bodyTextColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bodyTextColor").toString())); + } + if (!jsonObj.get("pricesColor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `pricesColor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("pricesColor").toString())); + } + if ((jsonObj.get("primaryFont") != null && !jsonObj.get("primaryFont").isJsonNull()) && !jsonObj.get("primaryFont").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `primaryFont` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryFont").toString())); + } + // ensure the required json array is present + if (jsonObj.get("callsToAction") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("callsToAction").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `callsToAction` to be an array in the JSON string but got `%s`", jsonObj.get("callsToAction").toString())); + } + if (!jsonObj.get("productImageDisplay").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productImageDisplay` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productImageDisplay").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DynamicWriteAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DynamicWriteAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DynamicWriteAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DynamicWriteAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DynamicWriteAttributes read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + DynamicWriteAttributes instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DynamicWriteAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of DynamicWriteAttributes + * @throws IOException if the JSON string is invalid with respect to DynamicWriteAttributes + */ + public static DynamicWriteAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DynamicWriteAttributes.class); + } + + /** + * Convert an instance of DynamicWriteAttributes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/EntityOfPortfolioMessage.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/EntityOfPortfolioMessage.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/EntityOfPortfolioMessage.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/EntityOfPortfolioMessage.java index 83728b49..5a23ac46 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/EntityOfPortfolioMessage.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/EntityOfPortfolioMessage.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.PortfolioMessage; +import com.criteo.api.marketingsolutions.v2024_07.model.PortfolioMessage; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Generic Criteo API successful data model diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ErrorCodeResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ErrorCodeResponse.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ErrorCodeResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ErrorCodeResponse.java index 8ebf2c78..f08512af 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ErrorCodeResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ErrorCodeResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceError; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceWarning; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceError; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceWarning; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Definition of the error code diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/GetPortfolioResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/GetPortfolioResponse.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/GetPortfolioResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/GetPortfolioResponse.java index f65d113a..c21b05e1 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/GetPortfolioResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/GetPortfolioResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.CriteoApiError; -import com.criteo.api.marketingsolutions.v2023_04.model.CriteoApiWarning; -import com.criteo.api.marketingsolutions.v2023_04.model.EntityOfPortfolioMessage; +import com.criteo.api.marketingsolutions.v2024_07.model.CriteoApiError; +import com.criteo.api.marketingsolutions.v2024_07.model.CriteoApiWarning; +import com.criteo.api.marketingsolutions.v2024_07.model.EntityOfPortfolioMessage; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -47,7 +47,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Portfolio fetch Response diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/HtmlTagAttributes.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/HtmlTagAttributes.java new file mode 100644 index 00000000..d11a82d9 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/HtmlTagAttributes.java @@ -0,0 +1,314 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.Tag; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * The attributes specific to HtmlTag creatives + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HtmlTagAttributes { + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + private List tags = null; + + public HtmlTagAttributes() { + } + + public HtmlTagAttributes tags(List tags) { + + this.tags = tags; + return this; + } + + public HtmlTagAttributes addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = null; + } + this.tags.add(tagsItem); + return this; + } + + /** + * An array containing the html tags + * @return tags + **/ + @javax.annotation.Nullable + + public List getTags() { + return tags; + } + + + public void setTags(List tags) { + this.tags = tags; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the HtmlTagAttributes instance itself + */ + public HtmlTagAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HtmlTagAttributes htmlTagAttributes = (HtmlTagAttributes) o; + return Objects.equals(this.tags, htmlTagAttributes.tags)&& + Objects.equals(this.additionalProperties, htmlTagAttributes.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(tags, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HtmlTagAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("tags"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to HtmlTagAttributes + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!HtmlTagAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in HtmlTagAttributes is not found in the empty JSON string", HtmlTagAttributes.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) { + JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); + if (jsonArraytags != null) { + // ensure the json data is an array + if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + + // validate the optional field `tags` (array) + for (int i = 0; i < jsonArraytags.size(); i++) { + Tag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!HtmlTagAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'HtmlTagAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(HtmlTagAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, HtmlTagAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public HtmlTagAttributes read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + HtmlTagAttributes instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of HtmlTagAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of HtmlTagAttributes + * @throws IOException if the JSON string is invalid with respect to HtmlTagAttributes + */ + public static HtmlTagAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, HtmlTagAttributes.class); + } + + /** + * Convert an instance of HtmlTagAttributes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudience.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/HtmlTagWriteAttributes.java similarity index 68% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudience.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/HtmlTagWriteAttributes.java index d4399db9..d4d2b762 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudience.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/HtmlTagWriteAttributes.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,17 +11,19 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.NewAudienceAttributes; +import com.criteo.api.marketingsolutions.v2024_07.model.Tag; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -42,65 +44,44 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** - * Body for the creation of a new audience (name, advertiserId, etc) + * The attributes specific to create or update a HtmlTag creative */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NewAudience { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private NewAudienceAttributes attributes; +public class HtmlTagWriteAttributes { + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + private List tags = new ArrayList<>(); - public NewAudience() { + public HtmlTagWriteAttributes() { } - public NewAudience type(String type) { + public HtmlTagWriteAttributes tags(List tags) { - this.type = type; + this.tags = tags; return this; } - /** - * the name of the entity type - * @return type - **/ - @javax.annotation.Nonnull - - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - public NewAudience attributes(NewAudienceAttributes attributes) { - - this.attributes = attributes; + public HtmlTagWriteAttributes addTagsItem(Tag tagsItem) { + this.tags.add(tagsItem); return this; } /** - * Get attributes - * @return attributes + * An array containing the html tags + * @return tags **/ @javax.annotation.Nonnull - public NewAudienceAttributes getAttributes() { - return attributes; + public List getTags() { + return tags; } - public void setAttributes(NewAudienceAttributes attributes) { - this.attributes = attributes; + public void setTags(List tags) { + this.tags = tags; } /** @@ -116,9 +97,9 @@ public void setAttributes(NewAudienceAttributes attributes) { * * @param key name of the property * @param value value of the property - * @return the NewAudience instance itself + * @return the HtmlTagWriteAttributes instance itself */ - public NewAudience putAdditionalProperty(String key, Object value) { + public HtmlTagWriteAttributes putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -157,23 +138,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NewAudience newAudience = (NewAudience) o; - return Objects.equals(this.type, newAudience.type) && - Objects.equals(this.attributes, newAudience.attributes)&& - Objects.equals(this.additionalProperties, newAudience.additionalProperties); + HtmlTagWriteAttributes htmlTagWriteAttributes = (HtmlTagWriteAttributes) o; + return Objects.equals(this.tags, htmlTagWriteAttributes.tags)&& + Objects.equals(this.additionalProperties, htmlTagWriteAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash(type, attributes, additionalProperties); + return Objects.hash(tags, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NewAudience {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("class HtmlTagWriteAttributes {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -197,55 +176,58 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); + openapiFields.add("tags"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); + openapiRequiredFields.add("tags"); } /** * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NewAudience + * @throws IOException if the JSON Object is invalid with respect to HtmlTagWriteAttributes */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!NewAudience.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NewAudience is not found in the empty JSON string", NewAudience.openapiRequiredFields.toString())); + if (!HtmlTagWriteAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in HtmlTagWriteAttributes is not found in the empty JSON string", HtmlTagWriteAttributes.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : NewAudience.openapiRequiredFields) { + for (String requiredField : HtmlTagWriteAttributes.openapiRequiredFields) { if (jsonObj.get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + // ensure the json data is an array + if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } - // validate the required field `attributes` - NewAudienceAttributes.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + + JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); + // validate the required field `tags` (array) + for (int i = 0; i < jsonArraytags.size(); i++) { + Tag.validateJsonObject(jsonArraytags.get(i).getAsJsonObject()); + }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!NewAudience.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NewAudience' and its subtypes + if (!HtmlTagWriteAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'HtmlTagWriteAttributes' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NewAudience.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(HtmlTagWriteAttributes.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, NewAudience value) throws IOException { + public void write(JsonWriter out, HtmlTagWriteAttributes value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -268,11 +250,11 @@ else if (entry.getValue() instanceof Character) } @Override - public NewAudience read(JsonReader in) throws IOException { + public HtmlTagWriteAttributes read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - NewAudience instance = thisAdapter.fromJsonTree(jsonObj); + HtmlTagWriteAttributes instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -299,18 +281,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of NewAudience given an JSON string + * Create an instance of HtmlTagWriteAttributes given an JSON string * * @param jsonString JSON string - * @return An instance of NewAudience - * @throws IOException if the JSON string is invalid with respect to NewAudience + * @return An instance of HtmlTagWriteAttributes + * @throws IOException if the JSON string is invalid with respect to HtmlTagWriteAttributes */ - public static NewAudience fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NewAudience.class); + public static HtmlTagWriteAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, HtmlTagWriteAttributes.class); } /** - * Convert an instance of NewAudience to an JSON string + * Convert an instance of HtmlTagWriteAttributes to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageAttributes.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageAttributes.java new file mode 100644 index 00000000..50d5b063 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageAttributes.java @@ -0,0 +1,335 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * The attributes specific to Image creatives + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ImageAttributes { + public static final String SERIALIZED_NAME_URLS = "urls"; + @SerializedName(SERIALIZED_NAME_URLS) + private List urls = null; + + public static final String SERIALIZED_NAME_LANDING_PAGE_URL = "landingPageUrl"; + @SerializedName(SERIALIZED_NAME_LANDING_PAGE_URL) + private String landingPageUrl; + + public ImageAttributes() { + } + + public ImageAttributes urls(List urls) { + + this.urls = urls; + return this; + } + + public ImageAttributes addUrlsItem(String urlsItem) { + if (this.urls == null) { + this.urls = null; + } + this.urls.add(urlsItem); + return this; + } + + /** + * Array of images uploaded on demostatic.criteo.com when deploying and then static.criteo.net + * @return urls + **/ + @javax.annotation.Nullable + + public List getUrls() { + return urls; + } + + + public void setUrls(List urls) { + this.urls = urls; + } + + + public ImageAttributes landingPageUrl(String landingPageUrl) { + + this.landingPageUrl = landingPageUrl; + return this; + } + + /** + * Web redirection of the landing page url + * @return landingPageUrl + **/ + @javax.annotation.Nullable + + public String getLandingPageUrl() { + return landingPageUrl; + } + + + public void setLandingPageUrl(String landingPageUrl) { + this.landingPageUrl = landingPageUrl; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImageAttributes instance itself + */ + public ImageAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImageAttributes imageAttributes = (ImageAttributes) o; + return Objects.equals(this.urls, imageAttributes.urls) && + Objects.equals(this.landingPageUrl, imageAttributes.landingPageUrl)&& + Objects.equals(this.additionalProperties, imageAttributes.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(urls, landingPageUrl, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImageAttributes {\n"); + sb.append(" urls: ").append(toIndentedString(urls)).append("\n"); + sb.append(" landingPageUrl: ").append(toIndentedString(landingPageUrl)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("urls"); + openapiFields.add("landingPageUrl"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ImageAttributes + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ImageAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImageAttributes is not found in the empty JSON string", ImageAttributes.openapiRequiredFields.toString())); + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("urls") != null && !jsonObj.get("urls").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `urls` to be an array in the JSON string but got `%s`", jsonObj.get("urls").toString())); + } + if ((jsonObj.get("landingPageUrl") != null && !jsonObj.get("landingPageUrl").isJsonNull()) && !jsonObj.get("landingPageUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `landingPageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("landingPageUrl").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImageAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImageAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImageAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImageAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImageAttributes read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ImageAttributes instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ImageAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImageAttributes + * @throws IOException if the JSON string is invalid with respect to ImageAttributes + */ + public static ImageAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImageAttributes.class); + } + + /** + * Convert an instance of ImageAttributes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSet.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSet.java new file mode 100644 index 00000000..1bc8b608 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSet.java @@ -0,0 +1,347 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.ImageShape; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Entity consists of multiple images in different ratios and a headline text. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ImageSet { + public static final String SERIALIZED_NAME_IMAGES = "images"; + @SerializedName(SERIALIZED_NAME_IMAGES) + private List images = new ArrayList<>(); + + public static final String SERIALIZED_NAME_HEADLINE_TEXT = "headlineText"; + @SerializedName(SERIALIZED_NAME_HEADLINE_TEXT) + private String headlineText; + + public ImageSet() { + } + + public ImageSet images(List images) { + + this.images = images; + return this; + } + + public ImageSet addImagesItem(ImageShape imagesItem) { + this.images.add(imagesItem); + return this; + } + + /** + * The images' urls with their shapes. + * @return images + **/ + @javax.annotation.Nonnull + + public List getImages() { + return images; + } + + + public void setImages(List images) { + this.images = images; + } + + + public ImageSet headlineText(String headlineText) { + + this.headlineText = headlineText; + return this; + } + + /** + * The headline of the image set + * @return headlineText + **/ + @javax.annotation.Nullable + + public String getHeadlineText() { + return headlineText; + } + + + public void setHeadlineText(String headlineText) { + this.headlineText = headlineText; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImageSet instance itself + */ + public ImageSet putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImageSet imageSet = (ImageSet) o; + return Objects.equals(this.images, imageSet.images) && + Objects.equals(this.headlineText, imageSet.headlineText)&& + Objects.equals(this.additionalProperties, imageSet.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(images, headlineText, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImageSet {\n"); + sb.append(" images: ").append(toIndentedString(images)).append("\n"); + sb.append(" headlineText: ").append(toIndentedString(headlineText)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("images"); + openapiFields.add("headlineText"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("images"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ImageSet + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ImageSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImageSet is not found in the empty JSON string", ImageSet.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImageSet.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the json data is an array + if (!jsonObj.get("images").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `images` to be an array in the JSON string but got `%s`", jsonObj.get("images").toString())); + } + + JsonArray jsonArrayimages = jsonObj.getAsJsonArray("images"); + // validate the required field `images` (array) + for (int i = 0; i < jsonArrayimages.size(); i++) { + ImageShape.validateJsonObject(jsonArrayimages.get(i).getAsJsonObject()); + }; + if ((jsonObj.get("headlineText") != null && !jsonObj.get("headlineText").isJsonNull()) && !jsonObj.get("headlineText").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `headlineText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("headlineText").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImageSet.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImageSet' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImageSet.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImageSet value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImageSet read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ImageSet instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ImageSet given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImageSet + * @throws IOException if the JSON string is invalid with respect to ImageSet + */ + public static ImageSet fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImageSet.class); + } + + /** + * Convert an instance of ImageSet to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSetBase64.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSetBase64.java new file mode 100644 index 00000000..6f8f60d4 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSetBase64.java @@ -0,0 +1,342 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Entity consists of multiple images in different ratios as a base-64 encoded and a headline text. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ImageSetBase64 { + public static final String SERIALIZED_NAME_IMAGE_BASE64_STRINGS = "imageBase64Strings"; + @SerializedName(SERIALIZED_NAME_IMAGE_BASE64_STRINGS) + private List imageBase64Strings = new ArrayList<>(); + + public static final String SERIALIZED_NAME_HEADLINE_TEXT = "headlineText"; + @SerializedName(SERIALIZED_NAME_HEADLINE_TEXT) + private String headlineText; + + public ImageSetBase64() { + } + + public ImageSetBase64 imageBase64Strings(List imageBase64Strings) { + + this.imageBase64Strings = imageBase64Strings; + return this; + } + + public ImageSetBase64 addImageBase64StringsItem(String imageBase64StringsItem) { + this.imageBase64Strings.add(imageBase64StringsItem); + return this; + } + + /** + * Multiple images potentially in different shapes, each image is a base-64 encoded string. + * @return imageBase64Strings + **/ + @javax.annotation.Nonnull + + public List getImageBase64Strings() { + return imageBase64Strings; + } + + + public void setImageBase64Strings(List imageBase64Strings) { + this.imageBase64Strings = imageBase64Strings; + } + + + public ImageSetBase64 headlineText(String headlineText) { + + this.headlineText = headlineText; + return this; + } + + /** + * The headline of the image set + * @return headlineText + **/ + @javax.annotation.Nullable + + public String getHeadlineText() { + return headlineText; + } + + + public void setHeadlineText(String headlineText) { + this.headlineText = headlineText; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImageSetBase64 instance itself + */ + public ImageSetBase64 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImageSetBase64 imageSetBase64 = (ImageSetBase64) o; + return Objects.equals(this.imageBase64Strings, imageSetBase64.imageBase64Strings) && + Objects.equals(this.headlineText, imageSetBase64.headlineText)&& + Objects.equals(this.additionalProperties, imageSetBase64.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(imageBase64Strings, headlineText, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImageSetBase64 {\n"); + sb.append(" imageBase64Strings: ").append(toIndentedString(imageBase64Strings)).append("\n"); + sb.append(" headlineText: ").append(toIndentedString(headlineText)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("imageBase64Strings"); + openapiFields.add("headlineText"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("imageBase64Strings"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ImageSetBase64 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ImageSetBase64.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImageSetBase64 is not found in the empty JSON string", ImageSetBase64.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImageSetBase64.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the required json array is present + if (jsonObj.get("imageBase64Strings") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("imageBase64Strings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `imageBase64Strings` to be an array in the JSON string but got `%s`", jsonObj.get("imageBase64Strings").toString())); + } + if ((jsonObj.get("headlineText") != null && !jsonObj.get("headlineText").isJsonNull()) && !jsonObj.get("headlineText").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `headlineText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("headlineText").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImageSetBase64.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImageSetBase64' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImageSetBase64.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImageSetBase64 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImageSetBase64 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ImageSetBase64 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ImageSetBase64 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImageSetBase64 + * @throws IOException if the JSON string is invalid with respect to ImageSetBase64 + */ + public static ImageSetBase64 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImageSetBase64.class); + } + + /** + * Convert an instance of ImageSetBase64 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageShape.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageShape.java new file mode 100644 index 00000000..487bbec6 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageShape.java @@ -0,0 +1,371 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Entity containing the shape and url of the image + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ImageShape { + /** + * Ratio of the image + */ + @JsonAdapter(ShapeEnum.Adapter.class) + public enum ShapeEnum { + HORIZONTAL("Horizontal"), + + VERTICAL("Vertical"), + + SQUARE("Square"); + + private String value; + + ShapeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ShapeEnum fromValue(String value) { + for (ShapeEnum b : ShapeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ShapeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ShapeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ShapeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_SHAPE = "shape"; + @SerializedName(SERIALIZED_NAME_SHAPE) + private ShapeEnum shape; + + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + private URI url; + + public ImageShape() { + } + + public ImageShape shape(ShapeEnum shape) { + + this.shape = shape; + return this; + } + + /** + * Ratio of the image + * @return shape + **/ + @javax.annotation.Nonnull + + public ShapeEnum getShape() { + return shape; + } + + + public void setShape(ShapeEnum shape) { + this.shape = shape; + } + + + public ImageShape url(URI url) { + + this.url = url; + return this; + } + + /** + * URL of the image uploaded on demostatic.criteo.com when deploying and then static.criteo.net + * @return url + **/ + @javax.annotation.Nonnull + + public URI getUrl() { + return url; + } + + + public void setUrl(URI url) { + this.url = url; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImageShape instance itself + */ + public ImageShape putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImageShape imageShape = (ImageShape) o; + return Objects.equals(this.shape, imageShape.shape) && + Objects.equals(this.url, imageShape.url)&& + Objects.equals(this.additionalProperties, imageShape.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(shape, url, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImageShape {\n"); + sb.append(" shape: ").append(toIndentedString(shape)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("shape"); + openapiFields.add("url"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("shape"); + openapiRequiredFields.add("url"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ImageShape + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ImageShape.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImageShape is not found in the empty JSON string", ImageShape.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImageShape.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("shape").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shape` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shape").toString())); + } + if (!jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImageShape.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImageShape' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImageShape.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImageShape value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImageShape read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ImageShape instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ImageShape given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImageShape + * @throws IOException if the JSON string is invalid with respect to ImageShape + */ + public static ImageShape fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImageShape.class); + } + + /** + * Convert an instance of ImageShape to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSlide.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSlide.java new file mode 100644 index 00000000..3537c84c --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageSlide.java @@ -0,0 +1,361 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Slide containing the image URLs + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ImageSlide { + public static final String SERIALIZED_NAME_WIDTH = "width"; + @SerializedName(SERIALIZED_NAME_WIDTH) + private Integer width; + + public static final String SERIALIZED_NAME_HEIGHT = "height"; + @SerializedName(SERIALIZED_NAME_HEIGHT) + private Integer height; + + public static final String SERIALIZED_NAME_SLIDE_URLS = "slideUrls"; + @SerializedName(SERIALIZED_NAME_SLIDE_URLS) + private List slideUrls = null; + + public ImageSlide() { + } + + public ImageSlide width(Integer width) { + + this.width = width; + return this; + } + + /** + * Width of the Coupon slide + * @return width + **/ + @javax.annotation.Nullable + + public Integer getWidth() { + return width; + } + + + public void setWidth(Integer width) { + this.width = width; + } + + + public ImageSlide height(Integer height) { + + this.height = height; + return this; + } + + /** + * Height of the Coupon slide + * @return height + **/ + @javax.annotation.Nullable + + public Integer getHeight() { + return height; + } + + + public void setHeight(Integer height) { + this.height = height; + } + + + public ImageSlide slideUrls(List slideUrls) { + + this.slideUrls = slideUrls; + return this; + } + + public ImageSlide addSlideUrlsItem(String slideUrlsItem) { + if (this.slideUrls == null) { + this.slideUrls = null; + } + this.slideUrls.add(slideUrlsItem); + return this; + } + + /** + * Array of images of the same size uploaded on demostatic.criteo.com when deploying and then static.criteo.net + * @return slideUrls + **/ + @javax.annotation.Nullable + + public List getSlideUrls() { + return slideUrls; + } + + + public void setSlideUrls(List slideUrls) { + this.slideUrls = slideUrls; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImageSlide instance itself + */ + public ImageSlide putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImageSlide imageSlide = (ImageSlide) o; + return Objects.equals(this.width, imageSlide.width) && + Objects.equals(this.height, imageSlide.height) && + Objects.equals(this.slideUrls, imageSlide.slideUrls)&& + Objects.equals(this.additionalProperties, imageSlide.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(width, height, slideUrls, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImageSlide {\n"); + sb.append(" width: ").append(toIndentedString(width)).append("\n"); + sb.append(" height: ").append(toIndentedString(height)).append("\n"); + sb.append(" slideUrls: ").append(toIndentedString(slideUrls)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("width"); + openapiFields.add("height"); + openapiFields.add("slideUrls"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ImageSlide + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ImageSlide.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImageSlide is not found in the empty JSON string", ImageSlide.openapiRequiredFields.toString())); + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("slideUrls") != null && !jsonObj.get("slideUrls").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `slideUrls` to be an array in the JSON string but got `%s`", jsonObj.get("slideUrls").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImageSlide.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImageSlide' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImageSlide.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImageSlide value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImageSlide read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ImageSlide instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ImageSlide given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImageSlide + * @throws IOException if the JSON string is invalid with respect to ImageSlide + */ + public static ImageSlide fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImageSlide.class); + } + + /** + * Convert an instance of ImageSlide to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageWriteAttributes.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageWriteAttributes.java new file mode 100644 index 00000000..3733bf8f --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ImageWriteAttributes.java @@ -0,0 +1,332 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * The attributes specific to create or update an Image creative + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ImageWriteAttributes { + public static final String SERIALIZED_NAME_BASE64_STRINGS = "base64Strings"; + @SerializedName(SERIALIZED_NAME_BASE64_STRINGS) + private List base64Strings = new ArrayList<>(); + + public static final String SERIALIZED_NAME_LANDING_PAGE_URL = "landingPageUrl"; + @SerializedName(SERIALIZED_NAME_LANDING_PAGE_URL) + private URI landingPageUrl; + + public ImageWriteAttributes() { + } + + public ImageWriteAttributes base64Strings(List base64Strings) { + + this.base64Strings = base64Strings; + return this; + } + + public ImageWriteAttributes addBase64StringsItem(String base64StringsItem) { + this.base64Strings.add(base64StringsItem); + return this; + } + + /** + * Array of images as a base-64 encoded string + * @return base64Strings + **/ + @javax.annotation.Nonnull + + public List getBase64Strings() { + return base64Strings; + } + + + public void setBase64Strings(List base64Strings) { + this.base64Strings = base64Strings; + } + + + public ImageWriteAttributes landingPageUrl(URI landingPageUrl) { + + this.landingPageUrl = landingPageUrl; + return this; + } + + /** + * Web redirection of the landing page url + * @return landingPageUrl + **/ + @javax.annotation.Nonnull + + public URI getLandingPageUrl() { + return landingPageUrl; + } + + + public void setLandingPageUrl(URI landingPageUrl) { + this.landingPageUrl = landingPageUrl; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ImageWriteAttributes instance itself + */ + public ImageWriteAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ImageWriteAttributes imageWriteAttributes = (ImageWriteAttributes) o; + return Objects.equals(this.base64Strings, imageWriteAttributes.base64Strings) && + Objects.equals(this.landingPageUrl, imageWriteAttributes.landingPageUrl)&& + Objects.equals(this.additionalProperties, imageWriteAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(base64Strings, landingPageUrl, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ImageWriteAttributes {\n"); + sb.append(" base64Strings: ").append(toIndentedString(base64Strings)).append("\n"); + sb.append(" landingPageUrl: ").append(toIndentedString(landingPageUrl)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("base64Strings"); + openapiFields.add("landingPageUrl"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("base64Strings"); + openapiRequiredFields.add("landingPageUrl"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ImageWriteAttributes + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ImageWriteAttributes.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ImageWriteAttributes is not found in the empty JSON string", ImageWriteAttributes.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ImageWriteAttributes.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the required json array is present + if (jsonObj.get("base64Strings") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("base64Strings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `base64Strings` to be an array in the JSON string but got `%s`", jsonObj.get("base64Strings").toString())); + } + if (!jsonObj.get("landingPageUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `landingPageUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("landingPageUrl").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ImageWriteAttributes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ImageWriteAttributes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ImageWriteAttributes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ImageWriteAttributes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ImageWriteAttributes read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ImageWriteAttributes instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ImageWriteAttributes given an JSON string + * + * @param jsonString JSON string + * @return An instance of ImageWriteAttributes + * @throws IOException if the JSON string is invalid with respect to ImageWriteAttributes + */ + public static ImageWriteAttributes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ImageWriteAttributes.class); + } + + /** + * Convert an instance of ImageWriteAttributes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1.java new file mode 100644 index 00000000..fb6177f9 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1.java @@ -0,0 +1,321 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * In-market segment brand entity + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InMarketAudienceSegmentBrandEntityV1 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_SIZE = "size"; + @SerializedName(SERIALIZED_NAME_SIZE) + private Integer size; + + public InMarketAudienceSegmentBrandEntityV1() { + } + + public InMarketAudienceSegmentBrandEntityV1 name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the in-market segment brand + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public InMarketAudienceSegmentBrandEntityV1 size(Integer size) { + + this.size = size; + return this; + } + + /** + * Size of the in-market segment brand + * @return size + **/ + @javax.annotation.Nullable + + public Integer getSize() { + return size; + } + + + public void setSize(Integer size) { + this.size = size; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InMarketAudienceSegmentBrandEntityV1 instance itself + */ + public InMarketAudienceSegmentBrandEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InMarketAudienceSegmentBrandEntityV1 inMarketAudienceSegmentBrandEntityV1 = (InMarketAudienceSegmentBrandEntityV1) o; + return Objects.equals(this.name, inMarketAudienceSegmentBrandEntityV1.name) && + Objects.equals(this.size, inMarketAudienceSegmentBrandEntityV1.size)&& + Objects.equals(this.additionalProperties, inMarketAudienceSegmentBrandEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, size, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InMarketAudienceSegmentBrandEntityV1 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("size"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InMarketAudienceSegmentBrandEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InMarketAudienceSegmentBrandEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InMarketAudienceSegmentBrandEntityV1 is not found in the empty JSON string", InMarketAudienceSegmentBrandEntityV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InMarketAudienceSegmentBrandEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InMarketAudienceSegmentBrandEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InMarketAudienceSegmentBrandEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InMarketAudienceSegmentBrandEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InMarketAudienceSegmentBrandEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InMarketAudienceSegmentBrandEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InMarketAudienceSegmentBrandEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of InMarketAudienceSegmentBrandEntityV1 + * @throws IOException if the JSON string is invalid with respect to InMarketAudienceSegmentBrandEntityV1 + */ + public static InMarketAudienceSegmentBrandEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InMarketAudienceSegmentBrandEntityV1.class); + } + + /** + * Convert an instance of InMarketAudienceSegmentBrandEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1ListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1ListResponse.java new file mode 100644 index 00000000..3c65b6be --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1ListResponse.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.InMarketAudienceSegmentBrandEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several entities + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InMarketAudienceSegmentBrandEntityV1ListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public InMarketAudienceSegmentBrandEntityV1ListResponse() { + } + + + public InMarketAudienceSegmentBrandEntityV1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public InMarketAudienceSegmentBrandEntityV1ListResponse data(List data) { + + this.data = data; + return this; + } + + public InMarketAudienceSegmentBrandEntityV1ListResponse addDataItem(InMarketAudienceSegmentBrandEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InMarketAudienceSegmentBrandEntityV1ListResponse instance itself + */ + public InMarketAudienceSegmentBrandEntityV1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InMarketAudienceSegmentBrandEntityV1ListResponse inMarketAudienceSegmentBrandEntityV1ListResponse = (InMarketAudienceSegmentBrandEntityV1ListResponse) o; + return Objects.equals(this.data, inMarketAudienceSegmentBrandEntityV1ListResponse.data) && + Objects.equals(this.warnings, inMarketAudienceSegmentBrandEntityV1ListResponse.warnings) && + Objects.equals(this.errors, inMarketAudienceSegmentBrandEntityV1ListResponse.errors)&& + Objects.equals(this.additionalProperties, inMarketAudienceSegmentBrandEntityV1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InMarketAudienceSegmentBrandEntityV1ListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InMarketAudienceSegmentBrandEntityV1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InMarketAudienceSegmentBrandEntityV1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InMarketAudienceSegmentBrandEntityV1ListResponse is not found in the empty JSON string", InMarketAudienceSegmentBrandEntityV1ListResponse.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + InMarketAudienceSegmentBrandEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InMarketAudienceSegmentBrandEntityV1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InMarketAudienceSegmentBrandEntityV1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InMarketAudienceSegmentBrandEntityV1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InMarketAudienceSegmentBrandEntityV1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InMarketAudienceSegmentBrandEntityV1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InMarketAudienceSegmentBrandEntityV1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InMarketAudienceSegmentBrandEntityV1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of InMarketAudienceSegmentBrandEntityV1ListResponse + * @throws IOException if the JSON string is invalid with respect to InMarketAudienceSegmentBrandEntityV1ListResponse + */ + public static InMarketAudienceSegmentBrandEntityV1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InMarketAudienceSegmentBrandEntityV1ListResponse.class); + } + + /** + * Convert an instance of InMarketAudienceSegmentBrandEntityV1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1Resource.java new file mode 100644 index 00000000..83cebd11 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentBrandEntityV1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.InMarketAudienceSegmentBrandEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InMarketAudienceSegmentBrandEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private InMarketAudienceSegmentBrandEntityV1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public InMarketAudienceSegmentBrandEntityV1Resource() { + } + + public InMarketAudienceSegmentBrandEntityV1Resource attributes(InMarketAudienceSegmentBrandEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public InMarketAudienceSegmentBrandEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(InMarketAudienceSegmentBrandEntityV1 attributes) { + this.attributes = attributes; + } + + + public InMarketAudienceSegmentBrandEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public InMarketAudienceSegmentBrandEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InMarketAudienceSegmentBrandEntityV1Resource instance itself + */ + public InMarketAudienceSegmentBrandEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InMarketAudienceSegmentBrandEntityV1Resource inMarketAudienceSegmentBrandEntityV1Resource = (InMarketAudienceSegmentBrandEntityV1Resource) o; + return Objects.equals(this.attributes, inMarketAudienceSegmentBrandEntityV1Resource.attributes) && + Objects.equals(this.id, inMarketAudienceSegmentBrandEntityV1Resource.id) && + Objects.equals(this.type, inMarketAudienceSegmentBrandEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, inMarketAudienceSegmentBrandEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InMarketAudienceSegmentBrandEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InMarketAudienceSegmentBrandEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InMarketAudienceSegmentBrandEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InMarketAudienceSegmentBrandEntityV1Resource is not found in the empty JSON string", InMarketAudienceSegmentBrandEntityV1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + InMarketAudienceSegmentBrandEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InMarketAudienceSegmentBrandEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InMarketAudienceSegmentBrandEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InMarketAudienceSegmentBrandEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InMarketAudienceSegmentBrandEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InMarketAudienceSegmentBrandEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InMarketAudienceSegmentBrandEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InMarketAudienceSegmentBrandEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of InMarketAudienceSegmentBrandEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to InMarketAudienceSegmentBrandEntityV1Resource + */ + public static InMarketAudienceSegmentBrandEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InMarketAudienceSegmentBrandEntityV1Resource.class); + } + + /** + * Convert an instance of InMarketAudienceSegmentBrandEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1.java new file mode 100644 index 00000000..0c1e3984 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1.java @@ -0,0 +1,292 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * In-market segment interest entity + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InMarketAudienceSegmentInterestEntityV1 { + public static final String SERIALIZED_NAME_PARENT_ID = "parentId"; + @SerializedName(SERIALIZED_NAME_PARENT_ID) + private String parentId; + + public InMarketAudienceSegmentInterestEntityV1() { + } + + public InMarketAudienceSegmentInterestEntityV1 parentId(String parentId) { + + this.parentId = parentId; + return this; + } + + /** + * Id of the parent in-market segment interest + * @return parentId + **/ + @javax.annotation.Nullable + + public String getParentId() { + return parentId; + } + + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InMarketAudienceSegmentInterestEntityV1 instance itself + */ + public InMarketAudienceSegmentInterestEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InMarketAudienceSegmentInterestEntityV1 inMarketAudienceSegmentInterestEntityV1 = (InMarketAudienceSegmentInterestEntityV1) o; + return Objects.equals(this.parentId, inMarketAudienceSegmentInterestEntityV1.parentId)&& + Objects.equals(this.additionalProperties, inMarketAudienceSegmentInterestEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(parentId, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InMarketAudienceSegmentInterestEntityV1 {\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("parentId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InMarketAudienceSegmentInterestEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InMarketAudienceSegmentInterestEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InMarketAudienceSegmentInterestEntityV1 is not found in the empty JSON string", InMarketAudienceSegmentInterestEntityV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("parentId") != null && !jsonObj.get("parentId").isJsonNull()) && !jsonObj.get("parentId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `parentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InMarketAudienceSegmentInterestEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InMarketAudienceSegmentInterestEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InMarketAudienceSegmentInterestEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InMarketAudienceSegmentInterestEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InMarketAudienceSegmentInterestEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InMarketAudienceSegmentInterestEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InMarketAudienceSegmentInterestEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of InMarketAudienceSegmentInterestEntityV1 + * @throws IOException if the JSON string is invalid with respect to InMarketAudienceSegmentInterestEntityV1 + */ + public static InMarketAudienceSegmentInterestEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InMarketAudienceSegmentInterestEntityV1.class); + } + + /** + * Convert an instance of InMarketAudienceSegmentInterestEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1ListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1ListResponse.java new file mode 100644 index 00000000..87b7997a --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1ListResponse.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.InMarketAudienceSegmentInterestEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several entities + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InMarketAudienceSegmentInterestEntityV1ListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public InMarketAudienceSegmentInterestEntityV1ListResponse() { + } + + + public InMarketAudienceSegmentInterestEntityV1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public InMarketAudienceSegmentInterestEntityV1ListResponse data(List data) { + + this.data = data; + return this; + } + + public InMarketAudienceSegmentInterestEntityV1ListResponse addDataItem(InMarketAudienceSegmentInterestEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InMarketAudienceSegmentInterestEntityV1ListResponse instance itself + */ + public InMarketAudienceSegmentInterestEntityV1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InMarketAudienceSegmentInterestEntityV1ListResponse inMarketAudienceSegmentInterestEntityV1ListResponse = (InMarketAudienceSegmentInterestEntityV1ListResponse) o; + return Objects.equals(this.data, inMarketAudienceSegmentInterestEntityV1ListResponse.data) && + Objects.equals(this.warnings, inMarketAudienceSegmentInterestEntityV1ListResponse.warnings) && + Objects.equals(this.errors, inMarketAudienceSegmentInterestEntityV1ListResponse.errors)&& + Objects.equals(this.additionalProperties, inMarketAudienceSegmentInterestEntityV1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InMarketAudienceSegmentInterestEntityV1ListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InMarketAudienceSegmentInterestEntityV1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InMarketAudienceSegmentInterestEntityV1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InMarketAudienceSegmentInterestEntityV1ListResponse is not found in the empty JSON string", InMarketAudienceSegmentInterestEntityV1ListResponse.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + InMarketAudienceSegmentInterestEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InMarketAudienceSegmentInterestEntityV1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InMarketAudienceSegmentInterestEntityV1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InMarketAudienceSegmentInterestEntityV1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InMarketAudienceSegmentInterestEntityV1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InMarketAudienceSegmentInterestEntityV1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InMarketAudienceSegmentInterestEntityV1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InMarketAudienceSegmentInterestEntityV1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of InMarketAudienceSegmentInterestEntityV1ListResponse + * @throws IOException if the JSON string is invalid with respect to InMarketAudienceSegmentInterestEntityV1ListResponse + */ + public static InMarketAudienceSegmentInterestEntityV1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InMarketAudienceSegmentInterestEntityV1ListResponse.class); + } + + /** + * Convert an instance of InMarketAudienceSegmentInterestEntityV1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1Resource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1Resource.java new file mode 100644 index 00000000..97d4b987 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketAudienceSegmentInterestEntityV1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.InMarketAudienceSegmentInterestEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InMarketAudienceSegmentInterestEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private InMarketAudienceSegmentInterestEntityV1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public InMarketAudienceSegmentInterestEntityV1Resource() { + } + + public InMarketAudienceSegmentInterestEntityV1Resource attributes(InMarketAudienceSegmentInterestEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public InMarketAudienceSegmentInterestEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(InMarketAudienceSegmentInterestEntityV1 attributes) { + this.attributes = attributes; + } + + + public InMarketAudienceSegmentInterestEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public InMarketAudienceSegmentInterestEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InMarketAudienceSegmentInterestEntityV1Resource instance itself + */ + public InMarketAudienceSegmentInterestEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InMarketAudienceSegmentInterestEntityV1Resource inMarketAudienceSegmentInterestEntityV1Resource = (InMarketAudienceSegmentInterestEntityV1Resource) o; + return Objects.equals(this.attributes, inMarketAudienceSegmentInterestEntityV1Resource.attributes) && + Objects.equals(this.id, inMarketAudienceSegmentInterestEntityV1Resource.id) && + Objects.equals(this.type, inMarketAudienceSegmentInterestEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, inMarketAudienceSegmentInterestEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InMarketAudienceSegmentInterestEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InMarketAudienceSegmentInterestEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InMarketAudienceSegmentInterestEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InMarketAudienceSegmentInterestEntityV1Resource is not found in the empty JSON string", InMarketAudienceSegmentInterestEntityV1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + InMarketAudienceSegmentInterestEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InMarketAudienceSegmentInterestEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InMarketAudienceSegmentInterestEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InMarketAudienceSegmentInterestEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InMarketAudienceSegmentInterestEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InMarketAudienceSegmentInterestEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InMarketAudienceSegmentInterestEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InMarketAudienceSegmentInterestEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of InMarketAudienceSegmentInterestEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to InMarketAudienceSegmentInterestEntityV1Resource + */ + public static InMarketAudienceSegmentInterestEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InMarketAudienceSegmentInterestEntityV1Resource.class); + } + + /** + * Convert an instance of InMarketAudienceSegmentInterestEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketCreateV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketCreateV1.java new file mode 100644 index 00000000..4dd528ca --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketCreateV1.java @@ -0,0 +1,645 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.Set; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target users based on high shopping intents and demographics. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InMarketCreateV1 { + public static final String SERIALIZED_NAME_COUNTRY = "country"; + @SerializedName(SERIALIZED_NAME_COUNTRY) + private String country; + + /** + * Gets or Sets buyingPower + */ + @JsonAdapter(BuyingPowerEnum.Adapter.class) + public enum BuyingPowerEnum { + LOW("Low"), + + MEDIUM("Medium"), + + HIGH("High"), + + VERYHIGH("VeryHigh"); + + private String value; + + BuyingPowerEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BuyingPowerEnum fromValue(String value) { + for (BuyingPowerEnum b : BuyingPowerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BuyingPowerEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BuyingPowerEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BuyingPowerEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_BUYING_POWER = "buyingPower"; + @SerializedName(SERIALIZED_NAME_BUYING_POWER) + private Set buyingPower = null; + + /** + * Reach people who’ve shown interest in products made for a specific gender + */ + @JsonAdapter(GenderEnum.Adapter.class) + public enum GenderEnum { + MALE("Male"), + + FEMALE("Female"); + + private String value; + + GenderEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GenderEnum fromValue(String value) { + for (GenderEnum b : GenderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final GenderEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GenderEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return GenderEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_GENDER = "gender"; + @SerializedName(SERIALIZED_NAME_GENDER) + private GenderEnum gender; + + public static final String SERIALIZED_NAME_INTEREST_IDS = "interestIds"; + @SerializedName(SERIALIZED_NAME_INTEREST_IDS) + private Set interestIds = null; + + public static final String SERIALIZED_NAME_BRAND_IDS = "brandIds"; + @SerializedName(SERIALIZED_NAME_BRAND_IDS) + private Set brandIds = null; + + /** + * Gets or Sets priceRange + */ + @JsonAdapter(PriceRangeEnum.Adapter.class) + public enum PriceRangeEnum { + LOW("Low"), + + MEDIUM("Medium"), + + HIGH("High"); + + private String value; + + PriceRangeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PriceRangeEnum fromValue(String value) { + for (PriceRangeEnum b : PriceRangeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PriceRangeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PriceRangeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PriceRangeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_PRICE_RANGE = "priceRange"; + @SerializedName(SERIALIZED_NAME_PRICE_RANGE) + private Set priceRange = null; + + public InMarketCreateV1() { + } + + public InMarketCreateV1 country(String country) { + + this.country = country; + return this; + } + + /** + * Reach people of a specific country + * @return country + **/ + @javax.annotation.Nonnull + + public String getCountry() { + return country; + } + + + public void setCountry(String country) { + this.country = country; + } + + + public InMarketCreateV1 buyingPower(Set buyingPower) { + + this.buyingPower = buyingPower; + return this; + } + + public InMarketCreateV1 addBuyingPowerItem(BuyingPowerEnum buyingPowerItem) { + if (this.buyingPower == null) { + this.buyingPower = null; + } + this.buyingPower.add(buyingPowerItem); + return this; + } + + /** + * Reach people who frequently purchase high price range items to lower price range items + * @return buyingPower + **/ + @javax.annotation.Nullable + + public Set getBuyingPower() { + return buyingPower; + } + + + public void setBuyingPower(Set buyingPower) { + this.buyingPower = buyingPower; + } + + + public InMarketCreateV1 gender(GenderEnum gender) { + + this.gender = gender; + return this; + } + + /** + * Reach people who’ve shown interest in products made for a specific gender + * @return gender + **/ + @javax.annotation.Nullable + + public GenderEnum getGender() { + return gender; + } + + + public void setGender(GenderEnum gender) { + this.gender = gender; + } + + + public InMarketCreateV1 interestIds(Set interestIds) { + + this.interestIds = interestIds; + return this; + } + + public InMarketCreateV1 addInterestIdsItem(String interestIdsItem) { + if (this.interestIds == null) { + this.interestIds = null; + } + this.interestIds.add(interestIdsItem); + return this; + } + + /** + * Reach new people based on their interests + * @return interestIds + **/ + @javax.annotation.Nullable + + public Set getInterestIds() { + return interestIds; + } + + + public void setInterestIds(Set interestIds) { + this.interestIds = interestIds; + } + + + public InMarketCreateV1 brandIds(Set brandIds) { + + this.brandIds = brandIds; + return this; + } + + public InMarketCreateV1 addBrandIdsItem(String brandIdsItem) { + if (this.brandIds == null) { + this.brandIds = null; + } + this.brandIds.add(brandIdsItem); + return this; + } + + /** + * Choose the brands your segment might be interested in + * @return brandIds + **/ + @javax.annotation.Nullable + + public Set getBrandIds() { + return brandIds; + } + + + public void setBrandIds(Set brandIds) { + this.brandIds = brandIds; + } + + + public InMarketCreateV1 priceRange(Set priceRange) { + + this.priceRange = priceRange; + return this; + } + + public InMarketCreateV1 addPriceRangeItem(PriceRangeEnum priceRangeItem) { + if (this.priceRange == null) { + this.priceRange = null; + } + this.priceRange.add(priceRangeItem); + return this; + } + + /** + * Reach people who’ve shown interest in products within a specific price range + * @return priceRange + **/ + @javax.annotation.Nullable + + public Set getPriceRange() { + return priceRange; + } + + + public void setPriceRange(Set priceRange) { + this.priceRange = priceRange; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InMarketCreateV1 instance itself + */ + public InMarketCreateV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InMarketCreateV1 inMarketCreateV1 = (InMarketCreateV1) o; + return Objects.equals(this.country, inMarketCreateV1.country) && + Objects.equals(this.buyingPower, inMarketCreateV1.buyingPower) && + Objects.equals(this.gender, inMarketCreateV1.gender) && + Objects.equals(this.interestIds, inMarketCreateV1.interestIds) && + Objects.equals(this.brandIds, inMarketCreateV1.brandIds) && + Objects.equals(this.priceRange, inMarketCreateV1.priceRange)&& + Objects.equals(this.additionalProperties, inMarketCreateV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(country, buyingPower, gender, interestIds, brandIds, priceRange, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InMarketCreateV1 {\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" buyingPower: ").append(toIndentedString(buyingPower)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" interestIds: ").append(toIndentedString(interestIds)).append("\n"); + sb.append(" brandIds: ").append(toIndentedString(brandIds)).append("\n"); + sb.append(" priceRange: ").append(toIndentedString(priceRange)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("country"); + openapiFields.add("buyingPower"); + openapiFields.add("gender"); + openapiFields.add("interestIds"); + openapiFields.add("brandIds"); + openapiFields.add("priceRange"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("country"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InMarketCreateV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InMarketCreateV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InMarketCreateV1 is not found in the empty JSON string", InMarketCreateV1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InMarketCreateV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("country").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("buyingPower") != null && !jsonObj.get("buyingPower").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `buyingPower` to be an array in the JSON string but got `%s`", jsonObj.get("buyingPower").toString())); + } + if ((jsonObj.get("gender") != null && !jsonObj.get("gender").isJsonNull()) && !jsonObj.get("gender").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `gender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gender").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("interestIds") != null && !jsonObj.get("interestIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `interestIds` to be an array in the JSON string but got `%s`", jsonObj.get("interestIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("brandIds") != null && !jsonObj.get("brandIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `brandIds` to be an array in the JSON string but got `%s`", jsonObj.get("brandIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("priceRange") != null && !jsonObj.get("priceRange").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `priceRange` to be an array in the JSON string but got `%s`", jsonObj.get("priceRange").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InMarketCreateV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InMarketCreateV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InMarketCreateV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InMarketCreateV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InMarketCreateV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InMarketCreateV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InMarketCreateV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of InMarketCreateV1 + * @throws IOException if the JSON string is invalid with respect to InMarketCreateV1 + */ + public static InMarketCreateV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InMarketCreateV1.class); + } + + /** + * Convert an instance of InMarketCreateV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketSizeEstimationV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketSizeEstimationV1.java new file mode 100644 index 00000000..2730eda2 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketSizeEstimationV1.java @@ -0,0 +1,645 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.Set; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target users based on high shopping intents and demographics. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InMarketSizeEstimationV1 { + public static final String SERIALIZED_NAME_COUNTRY = "country"; + @SerializedName(SERIALIZED_NAME_COUNTRY) + private String country; + + /** + * Gets or Sets buyingPower + */ + @JsonAdapter(BuyingPowerEnum.Adapter.class) + public enum BuyingPowerEnum { + LOW("Low"), + + MEDIUM("Medium"), + + HIGH("High"), + + VERYHIGH("VeryHigh"); + + private String value; + + BuyingPowerEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BuyingPowerEnum fromValue(String value) { + for (BuyingPowerEnum b : BuyingPowerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BuyingPowerEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BuyingPowerEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BuyingPowerEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_BUYING_POWER = "buyingPower"; + @SerializedName(SERIALIZED_NAME_BUYING_POWER) + private Set buyingPower = null; + + /** + * Gets or Sets gender + */ + @JsonAdapter(GenderEnum.Adapter.class) + public enum GenderEnum { + MALE("Male"), + + FEMALE("Female"); + + private String value; + + GenderEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GenderEnum fromValue(String value) { + for (GenderEnum b : GenderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final GenderEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GenderEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return GenderEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_GENDER = "gender"; + @SerializedName(SERIALIZED_NAME_GENDER) + private GenderEnum gender; + + public static final String SERIALIZED_NAME_INTEREST_IDS = "interestIds"; + @SerializedName(SERIALIZED_NAME_INTEREST_IDS) + private Set interestIds = null; + + public static final String SERIALIZED_NAME_BRAND_IDS = "brandIds"; + @SerializedName(SERIALIZED_NAME_BRAND_IDS) + private Set brandIds = null; + + /** + * Gets or Sets priceRange + */ + @JsonAdapter(PriceRangeEnum.Adapter.class) + public enum PriceRangeEnum { + LOW("Low"), + + MEDIUM("Medium"), + + HIGH("High"); + + private String value; + + PriceRangeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PriceRangeEnum fromValue(String value) { + for (PriceRangeEnum b : PriceRangeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PriceRangeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PriceRangeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PriceRangeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_PRICE_RANGE = "priceRange"; + @SerializedName(SERIALIZED_NAME_PRICE_RANGE) + private Set priceRange = null; + + public InMarketSizeEstimationV1() { + } + + public InMarketSizeEstimationV1 country(String country) { + + this.country = country; + return this; + } + + /** + * Get country + * @return country + **/ + @javax.annotation.Nonnull + + public String getCountry() { + return country; + } + + + public void setCountry(String country) { + this.country = country; + } + + + public InMarketSizeEstimationV1 buyingPower(Set buyingPower) { + + this.buyingPower = buyingPower; + return this; + } + + public InMarketSizeEstimationV1 addBuyingPowerItem(BuyingPowerEnum buyingPowerItem) { + if (this.buyingPower == null) { + this.buyingPower = null; + } + this.buyingPower.add(buyingPowerItem); + return this; + } + + /** + * Get buyingPower + * @return buyingPower + **/ + @javax.annotation.Nullable + + public Set getBuyingPower() { + return buyingPower; + } + + + public void setBuyingPower(Set buyingPower) { + this.buyingPower = buyingPower; + } + + + public InMarketSizeEstimationV1 gender(GenderEnum gender) { + + this.gender = gender; + return this; + } + + /** + * Get gender + * @return gender + **/ + @javax.annotation.Nullable + + public GenderEnum getGender() { + return gender; + } + + + public void setGender(GenderEnum gender) { + this.gender = gender; + } + + + public InMarketSizeEstimationV1 interestIds(Set interestIds) { + + this.interestIds = interestIds; + return this; + } + + public InMarketSizeEstimationV1 addInterestIdsItem(String interestIdsItem) { + if (this.interestIds == null) { + this.interestIds = null; + } + this.interestIds.add(interestIdsItem); + return this; + } + + /** + * Get interestIds + * @return interestIds + **/ + @javax.annotation.Nullable + + public Set getInterestIds() { + return interestIds; + } + + + public void setInterestIds(Set interestIds) { + this.interestIds = interestIds; + } + + + public InMarketSizeEstimationV1 brandIds(Set brandIds) { + + this.brandIds = brandIds; + return this; + } + + public InMarketSizeEstimationV1 addBrandIdsItem(String brandIdsItem) { + if (this.brandIds == null) { + this.brandIds = null; + } + this.brandIds.add(brandIdsItem); + return this; + } + + /** + * Get brandIds + * @return brandIds + **/ + @javax.annotation.Nullable + + public Set getBrandIds() { + return brandIds; + } + + + public void setBrandIds(Set brandIds) { + this.brandIds = brandIds; + } + + + public InMarketSizeEstimationV1 priceRange(Set priceRange) { + + this.priceRange = priceRange; + return this; + } + + public InMarketSizeEstimationV1 addPriceRangeItem(PriceRangeEnum priceRangeItem) { + if (this.priceRange == null) { + this.priceRange = null; + } + this.priceRange.add(priceRangeItem); + return this; + } + + /** + * Get priceRange + * @return priceRange + **/ + @javax.annotation.Nullable + + public Set getPriceRange() { + return priceRange; + } + + + public void setPriceRange(Set priceRange) { + this.priceRange = priceRange; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InMarketSizeEstimationV1 instance itself + */ + public InMarketSizeEstimationV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InMarketSizeEstimationV1 inMarketSizeEstimationV1 = (InMarketSizeEstimationV1) o; + return Objects.equals(this.country, inMarketSizeEstimationV1.country) && + Objects.equals(this.buyingPower, inMarketSizeEstimationV1.buyingPower) && + Objects.equals(this.gender, inMarketSizeEstimationV1.gender) && + Objects.equals(this.interestIds, inMarketSizeEstimationV1.interestIds) && + Objects.equals(this.brandIds, inMarketSizeEstimationV1.brandIds) && + Objects.equals(this.priceRange, inMarketSizeEstimationV1.priceRange)&& + Objects.equals(this.additionalProperties, inMarketSizeEstimationV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(country, buyingPower, gender, interestIds, brandIds, priceRange, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InMarketSizeEstimationV1 {\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" buyingPower: ").append(toIndentedString(buyingPower)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" interestIds: ").append(toIndentedString(interestIds)).append("\n"); + sb.append(" brandIds: ").append(toIndentedString(brandIds)).append("\n"); + sb.append(" priceRange: ").append(toIndentedString(priceRange)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("country"); + openapiFields.add("buyingPower"); + openapiFields.add("gender"); + openapiFields.add("interestIds"); + openapiFields.add("brandIds"); + openapiFields.add("priceRange"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("country"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InMarketSizeEstimationV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InMarketSizeEstimationV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InMarketSizeEstimationV1 is not found in the empty JSON string", InMarketSizeEstimationV1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : InMarketSizeEstimationV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("country").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("buyingPower") != null && !jsonObj.get("buyingPower").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `buyingPower` to be an array in the JSON string but got `%s`", jsonObj.get("buyingPower").toString())); + } + if ((jsonObj.get("gender") != null && !jsonObj.get("gender").isJsonNull()) && !jsonObj.get("gender").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `gender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gender").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("interestIds") != null && !jsonObj.get("interestIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `interestIds` to be an array in the JSON string but got `%s`", jsonObj.get("interestIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("brandIds") != null && !jsonObj.get("brandIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `brandIds` to be an array in the JSON string but got `%s`", jsonObj.get("brandIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("priceRange") != null && !jsonObj.get("priceRange").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `priceRange` to be an array in the JSON string but got `%s`", jsonObj.get("priceRange").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InMarketSizeEstimationV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InMarketSizeEstimationV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InMarketSizeEstimationV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InMarketSizeEstimationV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InMarketSizeEstimationV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InMarketSizeEstimationV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InMarketSizeEstimationV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of InMarketSizeEstimationV1 + * @throws IOException if the JSON string is invalid with respect to InMarketSizeEstimationV1 + */ + public static InMarketSizeEstimationV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InMarketSizeEstimationV1.class); + } + + /** + * Convert an instance of InMarketSizeEstimationV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketUpdateV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketUpdateV1.java new file mode 100644 index 00000000..148799c3 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketUpdateV1.java @@ -0,0 +1,592 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.NillableGenderV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.Set; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target users based on high shopping intents and demographics. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InMarketUpdateV1 { + public static final String SERIALIZED_NAME_COUNTRY = "country"; + @SerializedName(SERIALIZED_NAME_COUNTRY) + private String country; + + /** + * Gets or Sets buyingPower + */ + @JsonAdapter(BuyingPowerEnum.Adapter.class) + public enum BuyingPowerEnum { + LOW("Low"), + + MEDIUM("Medium"), + + HIGH("High"), + + VERYHIGH("VeryHigh"); + + private String value; + + BuyingPowerEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BuyingPowerEnum fromValue(String value) { + for (BuyingPowerEnum b : BuyingPowerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BuyingPowerEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BuyingPowerEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BuyingPowerEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_BUYING_POWER = "buyingPower"; + @SerializedName(SERIALIZED_NAME_BUYING_POWER) + private Set buyingPower = null; + + public static final String SERIALIZED_NAME_GENDER = "gender"; + @SerializedName(SERIALIZED_NAME_GENDER) + private NillableGenderV1 gender; + + public static final String SERIALIZED_NAME_INTEREST_IDS = "interestIds"; + @SerializedName(SERIALIZED_NAME_INTEREST_IDS) + private Set interestIds = null; + + public static final String SERIALIZED_NAME_BRAND_IDS = "brandIds"; + @SerializedName(SERIALIZED_NAME_BRAND_IDS) + private Set brandIds = null; + + /** + * Gets or Sets priceRange + */ + @JsonAdapter(PriceRangeEnum.Adapter.class) + public enum PriceRangeEnum { + LOW("Low"), + + MEDIUM("Medium"), + + HIGH("High"); + + private String value; + + PriceRangeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PriceRangeEnum fromValue(String value) { + for (PriceRangeEnum b : PriceRangeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PriceRangeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PriceRangeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PriceRangeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_PRICE_RANGE = "priceRange"; + @SerializedName(SERIALIZED_NAME_PRICE_RANGE) + private Set priceRange = null; + + public InMarketUpdateV1() { + } + + public InMarketUpdateV1 country(String country) { + + this.country = country; + return this; + } + + /** + * Reach people of a specific country + * @return country + **/ + @javax.annotation.Nullable + + public String getCountry() { + return country; + } + + + public void setCountry(String country) { + this.country = country; + } + + + public InMarketUpdateV1 buyingPower(Set buyingPower) { + + this.buyingPower = buyingPower; + return this; + } + + public InMarketUpdateV1 addBuyingPowerItem(BuyingPowerEnum buyingPowerItem) { + if (this.buyingPower == null) { + this.buyingPower = null; + } + this.buyingPower.add(buyingPowerItem); + return this; + } + + /** + * Reach people who frequently purchase high price range items to lower price range items + * @return buyingPower + **/ + @javax.annotation.Nullable + + public Set getBuyingPower() { + return buyingPower; + } + + + public void setBuyingPower(Set buyingPower) { + this.buyingPower = buyingPower; + } + + + public InMarketUpdateV1 gender(NillableGenderV1 gender) { + + this.gender = gender; + return this; + } + + /** + * Get gender + * @return gender + **/ + @javax.annotation.Nullable + + public NillableGenderV1 getGender() { + return gender; + } + + + public void setGender(NillableGenderV1 gender) { + this.gender = gender; + } + + + public InMarketUpdateV1 interestIds(Set interestIds) { + + this.interestIds = interestIds; + return this; + } + + public InMarketUpdateV1 addInterestIdsItem(String interestIdsItem) { + if (this.interestIds == null) { + this.interestIds = null; + } + this.interestIds.add(interestIdsItem); + return this; + } + + /** + * Reach new people based on their interests + * @return interestIds + **/ + @javax.annotation.Nullable + + public Set getInterestIds() { + return interestIds; + } + + + public void setInterestIds(Set interestIds) { + this.interestIds = interestIds; + } + + + public InMarketUpdateV1 brandIds(Set brandIds) { + + this.brandIds = brandIds; + return this; + } + + public InMarketUpdateV1 addBrandIdsItem(String brandIdsItem) { + if (this.brandIds == null) { + this.brandIds = null; + } + this.brandIds.add(brandIdsItem); + return this; + } + + /** + * Choose the brands your segment might be interested in + * @return brandIds + **/ + @javax.annotation.Nullable + + public Set getBrandIds() { + return brandIds; + } + + + public void setBrandIds(Set brandIds) { + this.brandIds = brandIds; + } + + + public InMarketUpdateV1 priceRange(Set priceRange) { + + this.priceRange = priceRange; + return this; + } + + public InMarketUpdateV1 addPriceRangeItem(PriceRangeEnum priceRangeItem) { + if (this.priceRange == null) { + this.priceRange = null; + } + this.priceRange.add(priceRangeItem); + return this; + } + + /** + * Reach people who’ve shown interest in products within a specific price range + * @return priceRange + **/ + @javax.annotation.Nullable + + public Set getPriceRange() { + return priceRange; + } + + + public void setPriceRange(Set priceRange) { + this.priceRange = priceRange; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InMarketUpdateV1 instance itself + */ + public InMarketUpdateV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InMarketUpdateV1 inMarketUpdateV1 = (InMarketUpdateV1) o; + return Objects.equals(this.country, inMarketUpdateV1.country) && + Objects.equals(this.buyingPower, inMarketUpdateV1.buyingPower) && + Objects.equals(this.gender, inMarketUpdateV1.gender) && + Objects.equals(this.interestIds, inMarketUpdateV1.interestIds) && + Objects.equals(this.brandIds, inMarketUpdateV1.brandIds) && + Objects.equals(this.priceRange, inMarketUpdateV1.priceRange)&& + Objects.equals(this.additionalProperties, inMarketUpdateV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(country, buyingPower, gender, interestIds, brandIds, priceRange, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InMarketUpdateV1 {\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" buyingPower: ").append(toIndentedString(buyingPower)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" interestIds: ").append(toIndentedString(interestIds)).append("\n"); + sb.append(" brandIds: ").append(toIndentedString(brandIds)).append("\n"); + sb.append(" priceRange: ").append(toIndentedString(priceRange)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("country"); + openapiFields.add("buyingPower"); + openapiFields.add("gender"); + openapiFields.add("interestIds"); + openapiFields.add("brandIds"); + openapiFields.add("priceRange"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InMarketUpdateV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InMarketUpdateV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InMarketUpdateV1 is not found in the empty JSON string", InMarketUpdateV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("buyingPower") != null && !jsonObj.get("buyingPower").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `buyingPower` to be an array in the JSON string but got `%s`", jsonObj.get("buyingPower").toString())); + } + // validate the optional field `gender` + if (jsonObj.get("gender") != null && !jsonObj.get("gender").isJsonNull()) { + NillableGenderV1.validateJsonObject(jsonObj.getAsJsonObject("gender")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("interestIds") != null && !jsonObj.get("interestIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `interestIds` to be an array in the JSON string but got `%s`", jsonObj.get("interestIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("brandIds") != null && !jsonObj.get("brandIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `brandIds` to be an array in the JSON string but got `%s`", jsonObj.get("brandIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("priceRange") != null && !jsonObj.get("priceRange").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `priceRange` to be an array in the JSON string but got `%s`", jsonObj.get("priceRange").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InMarketUpdateV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InMarketUpdateV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InMarketUpdateV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InMarketUpdateV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InMarketUpdateV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InMarketUpdateV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InMarketUpdateV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of InMarketUpdateV1 + * @throws IOException if the JSON string is invalid with respect to InMarketUpdateV1 + */ + public static InMarketUpdateV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InMarketUpdateV1.class); + } + + /** + * Convert an instance of InMarketUpdateV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketV1.java new file mode 100644 index 00000000..a5697542 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/InMarketV1.java @@ -0,0 +1,643 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.Set; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target users based on high shopping intents and demographics. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class InMarketV1 { + public static final String SERIALIZED_NAME_COUNTRY = "country"; + @SerializedName(SERIALIZED_NAME_COUNTRY) + private String country; + + /** + * Gets or Sets buyingPower + */ + @JsonAdapter(BuyingPowerEnum.Adapter.class) + public enum BuyingPowerEnum { + UNKNOWN("Unknown"), + + LOW("Low"), + + MEDIUM("Medium"), + + HIGH("High"), + + VERYHIGH("VeryHigh"); + + private String value; + + BuyingPowerEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BuyingPowerEnum fromValue(String value) { + for (BuyingPowerEnum b : BuyingPowerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BuyingPowerEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BuyingPowerEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BuyingPowerEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_BUYING_POWER = "buyingPower"; + @SerializedName(SERIALIZED_NAME_BUYING_POWER) + private Set buyingPower = null; + + /** + * Reach people who’ve shown interest in products made for a specific gender + */ + @JsonAdapter(GenderEnum.Adapter.class) + public enum GenderEnum { + UNKNOWN("Unknown"), + + MALE("Male"), + + FEMALE("Female"); + + private String value; + + GenderEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static GenderEnum fromValue(String value) { + for (GenderEnum b : GenderEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final GenderEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public GenderEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return GenderEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_GENDER = "gender"; + @SerializedName(SERIALIZED_NAME_GENDER) + private GenderEnum gender; + + public static final String SERIALIZED_NAME_INTEREST_IDS = "interestIds"; + @SerializedName(SERIALIZED_NAME_INTEREST_IDS) + private Set interestIds = null; + + public static final String SERIALIZED_NAME_BRAND_IDS = "brandIds"; + @SerializedName(SERIALIZED_NAME_BRAND_IDS) + private Set brandIds = null; + + /** + * Gets or Sets priceRange + */ + @JsonAdapter(PriceRangeEnum.Adapter.class) + public enum PriceRangeEnum { + UNKNOWN("Unknown"), + + LOW("Low"), + + MEDIUM("Medium"), + + HIGH("High"); + + private String value; + + PriceRangeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PriceRangeEnum fromValue(String value) { + for (PriceRangeEnum b : PriceRangeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PriceRangeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PriceRangeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PriceRangeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_PRICE_RANGE = "priceRange"; + @SerializedName(SERIALIZED_NAME_PRICE_RANGE) + private Set priceRange = null; + + public InMarketV1() { + } + + public InMarketV1 country(String country) { + + this.country = country; + return this; + } + + /** + * Reach people of a specific country + * @return country + **/ + @javax.annotation.Nullable + + public String getCountry() { + return country; + } + + + public void setCountry(String country) { + this.country = country; + } + + + public InMarketV1 buyingPower(Set buyingPower) { + + this.buyingPower = buyingPower; + return this; + } + + public InMarketV1 addBuyingPowerItem(BuyingPowerEnum buyingPowerItem) { + if (this.buyingPower == null) { + this.buyingPower = null; + } + this.buyingPower.add(buyingPowerItem); + return this; + } + + /** + * Reach people who frequently purchase high price range items to lower price range items + * @return buyingPower + **/ + @javax.annotation.Nullable + + public Set getBuyingPower() { + return buyingPower; + } + + + public void setBuyingPower(Set buyingPower) { + this.buyingPower = buyingPower; + } + + + public InMarketV1 gender(GenderEnum gender) { + + this.gender = gender; + return this; + } + + /** + * Reach people who’ve shown interest in products made for a specific gender + * @return gender + **/ + @javax.annotation.Nullable + + public GenderEnum getGender() { + return gender; + } + + + public void setGender(GenderEnum gender) { + this.gender = gender; + } + + + public InMarketV1 interestIds(Set interestIds) { + + this.interestIds = interestIds; + return this; + } + + public InMarketV1 addInterestIdsItem(String interestIdsItem) { + if (this.interestIds == null) { + this.interestIds = null; + } + this.interestIds.add(interestIdsItem); + return this; + } + + /** + * Reach new people based on their interests + * @return interestIds + **/ + @javax.annotation.Nullable + + public Set getInterestIds() { + return interestIds; + } + + + public void setInterestIds(Set interestIds) { + this.interestIds = interestIds; + } + + + public InMarketV1 brandIds(Set brandIds) { + + this.brandIds = brandIds; + return this; + } + + public InMarketV1 addBrandIdsItem(String brandIdsItem) { + if (this.brandIds == null) { + this.brandIds = null; + } + this.brandIds.add(brandIdsItem); + return this; + } + + /** + * Choose the brands your segment might be interested in + * @return brandIds + **/ + @javax.annotation.Nullable + + public Set getBrandIds() { + return brandIds; + } + + + public void setBrandIds(Set brandIds) { + this.brandIds = brandIds; + } + + + public InMarketV1 priceRange(Set priceRange) { + + this.priceRange = priceRange; + return this; + } + + public InMarketV1 addPriceRangeItem(PriceRangeEnum priceRangeItem) { + if (this.priceRange == null) { + this.priceRange = null; + } + this.priceRange.add(priceRangeItem); + return this; + } + + /** + * Reach people who’ve shown interest in products within a specific price range + * @return priceRange + **/ + @javax.annotation.Nullable + + public Set getPriceRange() { + return priceRange; + } + + + public void setPriceRange(Set priceRange) { + this.priceRange = priceRange; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the InMarketV1 instance itself + */ + public InMarketV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InMarketV1 inMarketV1 = (InMarketV1) o; + return Objects.equals(this.country, inMarketV1.country) && + Objects.equals(this.buyingPower, inMarketV1.buyingPower) && + Objects.equals(this.gender, inMarketV1.gender) && + Objects.equals(this.interestIds, inMarketV1.interestIds) && + Objects.equals(this.brandIds, inMarketV1.brandIds) && + Objects.equals(this.priceRange, inMarketV1.priceRange)&& + Objects.equals(this.additionalProperties, inMarketV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(country, buyingPower, gender, interestIds, brandIds, priceRange, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InMarketV1 {\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" buyingPower: ").append(toIndentedString(buyingPower)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" interestIds: ").append(toIndentedString(interestIds)).append("\n"); + sb.append(" brandIds: ").append(toIndentedString(brandIds)).append("\n"); + sb.append(" priceRange: ").append(toIndentedString(priceRange)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("country"); + openapiFields.add("buyingPower"); + openapiFields.add("gender"); + openapiFields.add("interestIds"); + openapiFields.add("brandIds"); + openapiFields.add("priceRange"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to InMarketV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!InMarketV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InMarketV1 is not found in the empty JSON string", InMarketV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("country") != null && !jsonObj.get("country").isJsonNull()) && !jsonObj.get("country").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("buyingPower") != null && !jsonObj.get("buyingPower").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `buyingPower` to be an array in the JSON string but got `%s`", jsonObj.get("buyingPower").toString())); + } + if ((jsonObj.get("gender") != null && !jsonObj.get("gender").isJsonNull()) && !jsonObj.get("gender").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `gender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gender").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("interestIds") != null && !jsonObj.get("interestIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `interestIds` to be an array in the JSON string but got `%s`", jsonObj.get("interestIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("brandIds") != null && !jsonObj.get("brandIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `brandIds` to be an array in the JSON string but got `%s`", jsonObj.get("brandIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("priceRange") != null && !jsonObj.get("priceRange").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `priceRange` to be an array in the JSON string but got `%s`", jsonObj.get("priceRange").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!InMarketV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InMarketV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InMarketV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, InMarketV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public InMarketV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + InMarketV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of InMarketV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of InMarketV1 + * @throws IOException if the JSON string is invalid with respect to InMarketV1 + */ + public static InMarketV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InMarketV1.class); + } + + /** + * Convert an instance of InMarketV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationCreateV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationCreateV1.java new file mode 100644 index 00000000..7455a830 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationCreateV1.java @@ -0,0 +1,333 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.PointOfInterestV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target users based on their location. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LocationCreateV1 { + public static final String SERIALIZED_NAME_POINTS_OF_INTEREST = "pointsOfInterest"; + @SerializedName(SERIALIZED_NAME_POINTS_OF_INTEREST) + private List pointsOfInterest = new ArrayList<>(); + + public static final String SERIALIZED_NAME_RADIUS_IN_KM = "radiusInKm"; + @SerializedName(SERIALIZED_NAME_RADIUS_IN_KM) + private Integer radiusInKm; + + public LocationCreateV1() { + } + + public LocationCreateV1 pointsOfInterest(List pointsOfInterest) { + + this.pointsOfInterest = pointsOfInterest; + return this; + } + + public LocationCreateV1 addPointsOfInterestItem(PointOfInterestV1 pointsOfInterestItem) { + this.pointsOfInterest.add(pointsOfInterestItem); + return this; + } + + /** + * Reach users which have been historically located in the given coordinates + * @return pointsOfInterest + **/ + @javax.annotation.Nonnull + + public List getPointsOfInterest() { + return pointsOfInterest; + } + + + public void setPointsOfInterest(List pointsOfInterest) { + this.pointsOfInterest = pointsOfInterest; + } + + + public LocationCreateV1 radiusInKm(Integer radiusInKm) { + + this.radiusInKm = radiusInKm; + return this; + } + + /** + * The expected maximum distance in kilometers between a user and a point of interest + * @return radiusInKm + **/ + @javax.annotation.Nonnull + + public Integer getRadiusInKm() { + return radiusInKm; + } + + + public void setRadiusInKm(Integer radiusInKm) { + this.radiusInKm = radiusInKm; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LocationCreateV1 instance itself + */ + public LocationCreateV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LocationCreateV1 locationCreateV1 = (LocationCreateV1) o; + return Objects.equals(this.pointsOfInterest, locationCreateV1.pointsOfInterest) && + Objects.equals(this.radiusInKm, locationCreateV1.radiusInKm)&& + Objects.equals(this.additionalProperties, locationCreateV1.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pointsOfInterest, radiusInKm, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LocationCreateV1 {\n"); + sb.append(" pointsOfInterest: ").append(toIndentedString(pointsOfInterest)).append("\n"); + sb.append(" radiusInKm: ").append(toIndentedString(radiusInKm)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("pointsOfInterest"); + openapiFields.add("radiusInKm"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("pointsOfInterest"); + openapiRequiredFields.add("radiusInKm"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to LocationCreateV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!LocationCreateV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LocationCreateV1 is not found in the empty JSON string", LocationCreateV1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LocationCreateV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the json data is an array + if (!jsonObj.get("pointsOfInterest").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `pointsOfInterest` to be an array in the JSON string but got `%s`", jsonObj.get("pointsOfInterest").toString())); + } + + JsonArray jsonArraypointsOfInterest = jsonObj.getAsJsonArray("pointsOfInterest"); + // validate the required field `pointsOfInterest` (array) + for (int i = 0; i < jsonArraypointsOfInterest.size(); i++) { + PointOfInterestV1.validateJsonObject(jsonArraypointsOfInterest.get(i).getAsJsonObject()); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LocationCreateV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LocationCreateV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LocationCreateV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LocationCreateV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LocationCreateV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + LocationCreateV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LocationCreateV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of LocationCreateV1 + * @throws IOException if the JSON string is invalid with respect to LocationCreateV1 + */ + public static LocationCreateV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LocationCreateV1.class); + } + + /** + * Convert an instance of LocationCreateV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationSizeEstimationV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationSizeEstimationV1.java new file mode 100644 index 00000000..9870f380 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationSizeEstimationV1.java @@ -0,0 +1,333 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.PointOfInterestV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to define your audience based on their location. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LocationSizeEstimationV1 { + public static final String SERIALIZED_NAME_POINTS_OF_INTEREST = "pointsOfInterest"; + @SerializedName(SERIALIZED_NAME_POINTS_OF_INTEREST) + private List pointsOfInterest = new ArrayList<>(); + + public static final String SERIALIZED_NAME_RADIUS_IN_KM = "radiusInKm"; + @SerializedName(SERIALIZED_NAME_RADIUS_IN_KM) + private Integer radiusInKm; + + public LocationSizeEstimationV1() { + } + + public LocationSizeEstimationV1 pointsOfInterest(List pointsOfInterest) { + + this.pointsOfInterest = pointsOfInterest; + return this; + } + + public LocationSizeEstimationV1 addPointsOfInterestItem(PointOfInterestV1 pointsOfInterestItem) { + this.pointsOfInterest.add(pointsOfInterestItem); + return this; + } + + /** + * Get pointsOfInterest + * @return pointsOfInterest + **/ + @javax.annotation.Nonnull + + public List getPointsOfInterest() { + return pointsOfInterest; + } + + + public void setPointsOfInterest(List pointsOfInterest) { + this.pointsOfInterest = pointsOfInterest; + } + + + public LocationSizeEstimationV1 radiusInKm(Integer radiusInKm) { + + this.radiusInKm = radiusInKm; + return this; + } + + /** + * Get radiusInKm + * @return radiusInKm + **/ + @javax.annotation.Nonnull + + public Integer getRadiusInKm() { + return radiusInKm; + } + + + public void setRadiusInKm(Integer radiusInKm) { + this.radiusInKm = radiusInKm; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LocationSizeEstimationV1 instance itself + */ + public LocationSizeEstimationV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LocationSizeEstimationV1 locationSizeEstimationV1 = (LocationSizeEstimationV1) o; + return Objects.equals(this.pointsOfInterest, locationSizeEstimationV1.pointsOfInterest) && + Objects.equals(this.radiusInKm, locationSizeEstimationV1.radiusInKm)&& + Objects.equals(this.additionalProperties, locationSizeEstimationV1.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pointsOfInterest, radiusInKm, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LocationSizeEstimationV1 {\n"); + sb.append(" pointsOfInterest: ").append(toIndentedString(pointsOfInterest)).append("\n"); + sb.append(" radiusInKm: ").append(toIndentedString(radiusInKm)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("pointsOfInterest"); + openapiFields.add("radiusInKm"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("pointsOfInterest"); + openapiRequiredFields.add("radiusInKm"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to LocationSizeEstimationV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!LocationSizeEstimationV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LocationSizeEstimationV1 is not found in the empty JSON string", LocationSizeEstimationV1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LocationSizeEstimationV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the json data is an array + if (!jsonObj.get("pointsOfInterest").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `pointsOfInterest` to be an array in the JSON string but got `%s`", jsonObj.get("pointsOfInterest").toString())); + } + + JsonArray jsonArraypointsOfInterest = jsonObj.getAsJsonArray("pointsOfInterest"); + // validate the required field `pointsOfInterest` (array) + for (int i = 0; i < jsonArraypointsOfInterest.size(); i++) { + PointOfInterestV1.validateJsonObject(jsonArraypointsOfInterest.get(i).getAsJsonObject()); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LocationSizeEstimationV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LocationSizeEstimationV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LocationSizeEstimationV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LocationSizeEstimationV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LocationSizeEstimationV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + LocationSizeEstimationV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LocationSizeEstimationV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of LocationSizeEstimationV1 + * @throws IOException if the JSON string is invalid with respect to LocationSizeEstimationV1 + */ + public static LocationSizeEstimationV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LocationSizeEstimationV1.class); + } + + /** + * Convert an instance of LocationSizeEstimationV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationUpdateV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationUpdateV1.java new file mode 100644 index 00000000..44eee851 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationUpdateV1.java @@ -0,0 +1,420 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.PointOfInterestV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target users based on their location. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LocationUpdateV1 { + public static final String SERIALIZED_NAME_POINTS_OF_INTEREST = "pointsOfInterest"; + @SerializedName(SERIALIZED_NAME_POINTS_OF_INTEREST) + private List pointsOfInterest = null; + + public static final String SERIALIZED_NAME_RADIUS_IN_KM = "radiusInKm"; + @SerializedName(SERIALIZED_NAME_RADIUS_IN_KM) + private Integer radiusInKm; + + /** + * The kind of Location audience + */ + @JsonAdapter(RegistryTypeEnum.Adapter.class) + public enum RegistryTypeEnum { + POINTOFINTEREST("PointOfInterest"); + + private String value; + + RegistryTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static RegistryTypeEnum fromValue(String value) { + for (RegistryTypeEnum b : RegistryTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RegistryTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RegistryTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return RegistryTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_REGISTRY_TYPE = "registryType"; + @SerializedName(SERIALIZED_NAME_REGISTRY_TYPE) + private RegistryTypeEnum registryType; + + public LocationUpdateV1() { + } + + public LocationUpdateV1 pointsOfInterest(List pointsOfInterest) { + + this.pointsOfInterest = pointsOfInterest; + return this; + } + + public LocationUpdateV1 addPointsOfInterestItem(PointOfInterestV1 pointsOfInterestItem) { + if (this.pointsOfInterest == null) { + this.pointsOfInterest = null; + } + this.pointsOfInterest.add(pointsOfInterestItem); + return this; + } + + /** + * Reach users which have been historically located in the given coordinates + * @return pointsOfInterest + **/ + @javax.annotation.Nullable + + public List getPointsOfInterest() { + return pointsOfInterest; + } + + + public void setPointsOfInterest(List pointsOfInterest) { + this.pointsOfInterest = pointsOfInterest; + } + + + public LocationUpdateV1 radiusInKm(Integer radiusInKm) { + + this.radiusInKm = radiusInKm; + return this; + } + + /** + * Radius in kilometers + * @return radiusInKm + **/ + @javax.annotation.Nullable + + public Integer getRadiusInKm() { + return radiusInKm; + } + + + public void setRadiusInKm(Integer radiusInKm) { + this.radiusInKm = radiusInKm; + } + + + public LocationUpdateV1 registryType(RegistryTypeEnum registryType) { + + this.registryType = registryType; + return this; + } + + /** + * The kind of Location audience + * @return registryType + **/ + @javax.annotation.Nullable + + public RegistryTypeEnum getRegistryType() { + return registryType; + } + + + public void setRegistryType(RegistryTypeEnum registryType) { + this.registryType = registryType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LocationUpdateV1 instance itself + */ + public LocationUpdateV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LocationUpdateV1 locationUpdateV1 = (LocationUpdateV1) o; + return Objects.equals(this.pointsOfInterest, locationUpdateV1.pointsOfInterest) && + Objects.equals(this.radiusInKm, locationUpdateV1.radiusInKm) && + Objects.equals(this.registryType, locationUpdateV1.registryType)&& + Objects.equals(this.additionalProperties, locationUpdateV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(pointsOfInterest, radiusInKm, registryType, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LocationUpdateV1 {\n"); + sb.append(" pointsOfInterest: ").append(toIndentedString(pointsOfInterest)).append("\n"); + sb.append(" radiusInKm: ").append(toIndentedString(radiusInKm)).append("\n"); + sb.append(" registryType: ").append(toIndentedString(registryType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("pointsOfInterest"); + openapiFields.add("radiusInKm"); + openapiFields.add("registryType"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to LocationUpdateV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!LocationUpdateV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LocationUpdateV1 is not found in the empty JSON string", LocationUpdateV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("pointsOfInterest") != null && !jsonObj.get("pointsOfInterest").isJsonNull()) { + JsonArray jsonArraypointsOfInterest = jsonObj.getAsJsonArray("pointsOfInterest"); + if (jsonArraypointsOfInterest != null) { + // ensure the json data is an array + if (!jsonObj.get("pointsOfInterest").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `pointsOfInterest` to be an array in the JSON string but got `%s`", jsonObj.get("pointsOfInterest").toString())); + } + + // validate the optional field `pointsOfInterest` (array) + for (int i = 0; i < jsonArraypointsOfInterest.size(); i++) { + PointOfInterestV1.validateJsonObject(jsonArraypointsOfInterest.get(i).getAsJsonObject()); + }; + } + } + if ((jsonObj.get("registryType") != null && !jsonObj.get("registryType").isJsonNull()) && !jsonObj.get("registryType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `registryType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("registryType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LocationUpdateV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LocationUpdateV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LocationUpdateV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LocationUpdateV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LocationUpdateV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + LocationUpdateV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LocationUpdateV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of LocationUpdateV1 + * @throws IOException if the JSON string is invalid with respect to LocationUpdateV1 + */ + public static LocationUpdateV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LocationUpdateV1.class); + } + + /** + * Convert an instance of LocationUpdateV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationV1.java new file mode 100644 index 00000000..4a325d62 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LocationV1.java @@ -0,0 +1,422 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.PointOfInterestV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target users based on their location. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LocationV1 { + public static final String SERIALIZED_NAME_POINTS_OF_INTEREST = "pointsOfInterest"; + @SerializedName(SERIALIZED_NAME_POINTS_OF_INTEREST) + private List pointsOfInterest = null; + + public static final String SERIALIZED_NAME_RADIUS_IN_KM = "radiusInKm"; + @SerializedName(SERIALIZED_NAME_RADIUS_IN_KM) + private Integer radiusInKm; + + /** + * The kind of Location audience + */ + @JsonAdapter(RegistryTypeEnum.Adapter.class) + public enum RegistryTypeEnum { + UNKNOWN("Unknown"), + + POINTOFINTEREST("PointOfInterest"); + + private String value; + + RegistryTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static RegistryTypeEnum fromValue(String value) { + for (RegistryTypeEnum b : RegistryTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RegistryTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RegistryTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return RegistryTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_REGISTRY_TYPE = "registryType"; + @SerializedName(SERIALIZED_NAME_REGISTRY_TYPE) + private RegistryTypeEnum registryType; + + public LocationV1() { + } + + public LocationV1 pointsOfInterest(List pointsOfInterest) { + + this.pointsOfInterest = pointsOfInterest; + return this; + } + + public LocationV1 addPointsOfInterestItem(PointOfInterestV1 pointsOfInterestItem) { + if (this.pointsOfInterest == null) { + this.pointsOfInterest = null; + } + this.pointsOfInterest.add(pointsOfInterestItem); + return this; + } + + /** + * Reach users which have been historically located in the given coordinates + * @return pointsOfInterest + **/ + @javax.annotation.Nullable + + public List getPointsOfInterest() { + return pointsOfInterest; + } + + + public void setPointsOfInterest(List pointsOfInterest) { + this.pointsOfInterest = pointsOfInterest; + } + + + public LocationV1 radiusInKm(Integer radiusInKm) { + + this.radiusInKm = radiusInKm; + return this; + } + + /** + * The expected maximum distance in kilometers between a user and a point of interest + * @return radiusInKm + **/ + @javax.annotation.Nullable + + public Integer getRadiusInKm() { + return radiusInKm; + } + + + public void setRadiusInKm(Integer radiusInKm) { + this.radiusInKm = radiusInKm; + } + + + public LocationV1 registryType(RegistryTypeEnum registryType) { + + this.registryType = registryType; + return this; + } + + /** + * The kind of Location audience + * @return registryType + **/ + @javax.annotation.Nullable + + public RegistryTypeEnum getRegistryType() { + return registryType; + } + + + public void setRegistryType(RegistryTypeEnum registryType) { + this.registryType = registryType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LocationV1 instance itself + */ + public LocationV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LocationV1 locationV1 = (LocationV1) o; + return Objects.equals(this.pointsOfInterest, locationV1.pointsOfInterest) && + Objects.equals(this.radiusInKm, locationV1.radiusInKm) && + Objects.equals(this.registryType, locationV1.registryType)&& + Objects.equals(this.additionalProperties, locationV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(pointsOfInterest, radiusInKm, registryType, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LocationV1 {\n"); + sb.append(" pointsOfInterest: ").append(toIndentedString(pointsOfInterest)).append("\n"); + sb.append(" radiusInKm: ").append(toIndentedString(radiusInKm)).append("\n"); + sb.append(" registryType: ").append(toIndentedString(registryType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("pointsOfInterest"); + openapiFields.add("radiusInKm"); + openapiFields.add("registryType"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to LocationV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!LocationV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LocationV1 is not found in the empty JSON string", LocationV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("pointsOfInterest") != null && !jsonObj.get("pointsOfInterest").isJsonNull()) { + JsonArray jsonArraypointsOfInterest = jsonObj.getAsJsonArray("pointsOfInterest"); + if (jsonArraypointsOfInterest != null) { + // ensure the json data is an array + if (!jsonObj.get("pointsOfInterest").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `pointsOfInterest` to be an array in the JSON string but got `%s`", jsonObj.get("pointsOfInterest").toString())); + } + + // validate the optional field `pointsOfInterest` (array) + for (int i = 0; i < jsonArraypointsOfInterest.size(); i++) { + PointOfInterestV1.validateJsonObject(jsonArraypointsOfInterest.get(i).getAsJsonObject()); + }; + } + } + if ((jsonObj.get("registryType") != null && !jsonObj.get("registryType").isJsonNull()) && !jsonObj.get("registryType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `registryType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("registryType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LocationV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LocationV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LocationV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LocationV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LocationV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + LocationV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LocationV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of LocationV1 + * @throws IOException if the JSON string is invalid with respect to LocationV1 + */ + public static LocationV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LocationV1.class); + } + + /** + * Convert an instance of LocationV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeCreateV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeCreateV1.java new file mode 100644 index 00000000..9205a1e6 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeCreateV1.java @@ -0,0 +1,329 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target users close to a given seed segment. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LookalikeCreateV1 { + public static final String SERIALIZED_NAME_SEED_SEGMENT_ID = "seedSegmentId"; + @SerializedName(SERIALIZED_NAME_SEED_SEGMENT_ID) + private String seedSegmentId; + + public static final String SERIALIZED_NAME_TARGET_SIZE = "targetSize"; + @SerializedName(SERIALIZED_NAME_TARGET_SIZE) + private Long targetSize; + + public LookalikeCreateV1() { + } + + public LookalikeCreateV1 seedSegmentId(String seedSegmentId) { + + this.seedSegmentId = seedSegmentId; + return this; + } + + /** + * Segment from which the Lookalike segment will be generated + * @return seedSegmentId + **/ + @javax.annotation.Nonnull + + public String getSeedSegmentId() { + return seedSegmentId; + } + + + public void setSeedSegmentId(String seedSegmentId) { + this.seedSegmentId = seedSegmentId; + } + + + public LookalikeCreateV1 targetSize(Long targetSize) { + + this.targetSize = targetSize; + return this; + } + + /** + * Desired size of the generated Lookalike segment + * @return targetSize + **/ + @javax.annotation.Nullable + + public Long getTargetSize() { + return targetSize; + } + + + public void setTargetSize(Long targetSize) { + this.targetSize = targetSize; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LookalikeCreateV1 instance itself + */ + public LookalikeCreateV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LookalikeCreateV1 lookalikeCreateV1 = (LookalikeCreateV1) o; + return Objects.equals(this.seedSegmentId, lookalikeCreateV1.seedSegmentId) && + Objects.equals(this.targetSize, lookalikeCreateV1.targetSize)&& + Objects.equals(this.additionalProperties, lookalikeCreateV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(seedSegmentId, targetSize, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LookalikeCreateV1 {\n"); + sb.append(" seedSegmentId: ").append(toIndentedString(seedSegmentId)).append("\n"); + sb.append(" targetSize: ").append(toIndentedString(targetSize)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("seedSegmentId"); + openapiFields.add("targetSize"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("seedSegmentId"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to LookalikeCreateV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!LookalikeCreateV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LookalikeCreateV1 is not found in the empty JSON string", LookalikeCreateV1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LookalikeCreateV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("seedSegmentId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `seedSegmentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("seedSegmentId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LookalikeCreateV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LookalikeCreateV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LookalikeCreateV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LookalikeCreateV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LookalikeCreateV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + LookalikeCreateV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LookalikeCreateV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of LookalikeCreateV1 + * @throws IOException if the JSON string is invalid with respect to LookalikeCreateV1 + */ + public static LookalikeCreateV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LookalikeCreateV1.class); + } + + /** + * Convert an instance of LookalikeCreateV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeUpdateV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeUpdateV1.java new file mode 100644 index 00000000..42be9145 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeUpdateV1.java @@ -0,0 +1,289 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target users that behave like a given seed segment + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LookalikeUpdateV1 { + public static final String SERIALIZED_NAME_TARGET_SIZE = "targetSize"; + @SerializedName(SERIALIZED_NAME_TARGET_SIZE) + private Long targetSize; + + public LookalikeUpdateV1() { + } + + public LookalikeUpdateV1 targetSize(Long targetSize) { + + this.targetSize = targetSize; + return this; + } + + /** + * Desired size of the generated Lookalike segment + * @return targetSize + **/ + @javax.annotation.Nullable + + public Long getTargetSize() { + return targetSize; + } + + + public void setTargetSize(Long targetSize) { + this.targetSize = targetSize; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LookalikeUpdateV1 instance itself + */ + public LookalikeUpdateV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LookalikeUpdateV1 lookalikeUpdateV1 = (LookalikeUpdateV1) o; + return Objects.equals(this.targetSize, lookalikeUpdateV1.targetSize)&& + Objects.equals(this.additionalProperties, lookalikeUpdateV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(targetSize, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LookalikeUpdateV1 {\n"); + sb.append(" targetSize: ").append(toIndentedString(targetSize)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("targetSize"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to LookalikeUpdateV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!LookalikeUpdateV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LookalikeUpdateV1 is not found in the empty JSON string", LookalikeUpdateV1.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LookalikeUpdateV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LookalikeUpdateV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LookalikeUpdateV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LookalikeUpdateV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LookalikeUpdateV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + LookalikeUpdateV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LookalikeUpdateV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of LookalikeUpdateV1 + * @throws IOException if the JSON string is invalid with respect to LookalikeUpdateV1 + */ + public static LookalikeUpdateV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LookalikeUpdateV1.class); + } + + /** + * Convert an instance of LookalikeUpdateV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeV1.java new file mode 100644 index 00000000..b9ebcc08 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/LookalikeV1.java @@ -0,0 +1,321 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target users that behave like a given seed segment + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LookalikeV1 { + public static final String SERIALIZED_NAME_SEED_SEGMENT_ID = "seedSegmentId"; + @SerializedName(SERIALIZED_NAME_SEED_SEGMENT_ID) + private String seedSegmentId; + + public static final String SERIALIZED_NAME_TARGET_SIZE = "targetSize"; + @SerializedName(SERIALIZED_NAME_TARGET_SIZE) + private Long targetSize; + + public LookalikeV1() { + } + + public LookalikeV1 seedSegmentId(String seedSegmentId) { + + this.seedSegmentId = seedSegmentId; + return this; + } + + /** + * Segment from which the Lookalike segment will be generated + * @return seedSegmentId + **/ + @javax.annotation.Nullable + + public String getSeedSegmentId() { + return seedSegmentId; + } + + + public void setSeedSegmentId(String seedSegmentId) { + this.seedSegmentId = seedSegmentId; + } + + + public LookalikeV1 targetSize(Long targetSize) { + + this.targetSize = targetSize; + return this; + } + + /** + * Desired size of the generated Lookalike segment + * @return targetSize + **/ + @javax.annotation.Nullable + + public Long getTargetSize() { + return targetSize; + } + + + public void setTargetSize(Long targetSize) { + this.targetSize = targetSize; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LookalikeV1 instance itself + */ + public LookalikeV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LookalikeV1 lookalikeV1 = (LookalikeV1) o; + return Objects.equals(this.seedSegmentId, lookalikeV1.seedSegmentId) && + Objects.equals(this.targetSize, lookalikeV1.targetSize)&& + Objects.equals(this.additionalProperties, lookalikeV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(seedSegmentId, targetSize, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LookalikeV1 {\n"); + sb.append(" seedSegmentId: ").append(toIndentedString(seedSegmentId)).append("\n"); + sb.append(" targetSize: ").append(toIndentedString(targetSize)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("seedSegmentId"); + openapiFields.add("targetSize"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to LookalikeV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!LookalikeV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LookalikeV1 is not found in the empty JSON string", LookalikeV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("seedSegmentId") != null && !jsonObj.get("seedSegmentId").isJsonNull()) && !jsonObj.get("seedSegmentId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `seedSegmentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("seedSegmentId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LookalikeV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LookalikeV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LookalikeV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LookalikeV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LookalikeV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + LookalikeV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LookalikeV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of LookalikeV1 + * @throws IOException if the JSON string is invalid with respect to LookalikeV1 + */ + public static LookalikeV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LookalikeV1.class); + } + + /** + * Convert an instance of LookalikeV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ModifyAudienceResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ModifyAudienceResponse.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ModifyAudienceResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ModifyAudienceResponse.java index d3bd6f21..9b2ddbf7 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ModifyAudienceResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ModifyAudienceResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceError; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceWarning; -import com.criteo.api.marketingsolutions.v2023_04.model.ContactlistOperation; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceError; +import com.criteo.api.marketingsolutions.v2024_07.model.AudienceWarning; +import com.criteo.api.marketingsolutions.v2024_07.model.ContactlistOperation; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Parameters to modify an audience diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableAdSetTargetingRule.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableAdSetTargetingRuleV24Q1.java similarity index 79% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableAdSetTargetingRule.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableAdSetTargetingRuleV24Q1.java index 128f7605..2fd20ad8 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableAdSetTargetingRule.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableAdSetTargetingRuleV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.NillableAdSetTargetingRuleValue; +import com.criteo.api.marketingsolutions.v2024_07.model.NillableAdSetTargetingRuleV24Q1Value; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,21 +43,21 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * structure that encapsulates an object that have valid business null values. If the structure is provided (i.e. not null), then the value in it, even null, is provided. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NillableAdSetTargetingRule { +public class NillableAdSetTargetingRuleV24Q1 { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) - private NillableAdSetTargetingRuleValue value; + private NillableAdSetTargetingRuleV24Q1Value value; - public NillableAdSetTargetingRule() { + public NillableAdSetTargetingRuleV24Q1() { } - public NillableAdSetTargetingRule value(NillableAdSetTargetingRuleValue value) { + public NillableAdSetTargetingRuleV24Q1 value(NillableAdSetTargetingRuleV24Q1Value value) { this.value = value; return this; @@ -69,12 +69,12 @@ public NillableAdSetTargetingRule value(NillableAdSetTargetingRuleValue value) { **/ @javax.annotation.Nullable - public NillableAdSetTargetingRuleValue getValue() { + public NillableAdSetTargetingRuleV24Q1Value getValue() { return value; } - public void setValue(NillableAdSetTargetingRuleValue value) { + public void setValue(NillableAdSetTargetingRuleV24Q1Value value) { this.value = value; } @@ -91,9 +91,9 @@ public void setValue(NillableAdSetTargetingRuleValue value) { * * @param key name of the property * @param value value of the property - * @return the NillableAdSetTargetingRule instance itself + * @return the NillableAdSetTargetingRuleV24Q1 instance itself */ - public NillableAdSetTargetingRule putAdditionalProperty(String key, Object value) { + public NillableAdSetTargetingRuleV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -132,9 +132,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NillableAdSetTargetingRule nillableAdSetTargetingRule = (NillableAdSetTargetingRule) o; - return Objects.equals(this.value, nillableAdSetTargetingRule.value)&& - Objects.equals(this.additionalProperties, nillableAdSetTargetingRule.additionalProperties); + NillableAdSetTargetingRuleV24Q1 nillableAdSetTargetingRuleV24Q1 = (NillableAdSetTargetingRuleV24Q1) o; + return Objects.equals(this.value, nillableAdSetTargetingRuleV24Q1.value)&& + Objects.equals(this.additionalProperties, nillableAdSetTargetingRuleV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -156,7 +156,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NillableAdSetTargetingRule {\n"); + sb.append("class NillableAdSetTargetingRuleV24Q1 {\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -191,17 +191,17 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NillableAdSetTargetingRule + * @throws IOException if the JSON Object is invalid with respect to NillableAdSetTargetingRuleV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!NillableAdSetTargetingRule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NillableAdSetTargetingRule is not found in the empty JSON string", NillableAdSetTargetingRule.openapiRequiredFields.toString())); + if (!NillableAdSetTargetingRuleV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in NillableAdSetTargetingRuleV24Q1 is not found in the empty JSON string", NillableAdSetTargetingRuleV24Q1.openapiRequiredFields.toString())); } } // validate the optional field `value` if (jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) { - NillableAdSetTargetingRuleValue.validateJsonObject(jsonObj.getAsJsonObject("value")); + NillableAdSetTargetingRuleV24Q1Value.validateJsonObject(jsonObj.getAsJsonObject("value")); } } @@ -209,16 +209,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!NillableAdSetTargetingRule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NillableAdSetTargetingRule' and its subtypes + if (!NillableAdSetTargetingRuleV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NillableAdSetTargetingRuleV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NillableAdSetTargetingRule.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NillableAdSetTargetingRuleV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, NillableAdSetTargetingRule value) throws IOException { + public void write(JsonWriter out, NillableAdSetTargetingRuleV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -241,11 +241,11 @@ else if (entry.getValue() instanceof Character) } @Override - public NillableAdSetTargetingRule read(JsonReader in) throws IOException { + public NillableAdSetTargetingRuleV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - NillableAdSetTargetingRule instance = thisAdapter.fromJsonTree(jsonObj); + NillableAdSetTargetingRuleV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -272,18 +272,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of NillableAdSetTargetingRule given an JSON string + * Create an instance of NillableAdSetTargetingRuleV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of NillableAdSetTargetingRule - * @throws IOException if the JSON string is invalid with respect to NillableAdSetTargetingRule + * @return An instance of NillableAdSetTargetingRuleV24Q1 + * @throws IOException if the JSON string is invalid with respect to NillableAdSetTargetingRuleV24Q1 */ - public static NillableAdSetTargetingRule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NillableAdSetTargetingRule.class); + public static NillableAdSetTargetingRuleV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NillableAdSetTargetingRuleV24Q1.class); } /** - * Convert an instance of NillableAdSetTargetingRule to an JSON string + * Convert an instance of NillableAdSetTargetingRuleV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableAdSetTargetingRuleValue.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableAdSetTargetingRuleV24Q1Value.java similarity index 82% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableAdSetTargetingRuleValue.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableAdSetTargetingRuleV24Q1Value.java index a82e6ae5..1493cdfe 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableAdSetTargetingRuleValue.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableAdSetTargetingRuleV24Q1Value.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,13 +44,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** - * NillableAdSetTargetingRuleValue + * NillableAdSetTargetingRuleV24Q1Value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NillableAdSetTargetingRuleValue { +public class NillableAdSetTargetingRuleV24Q1Value { /** * Gets or Sets operand */ @@ -108,10 +108,10 @@ public OperandEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_VALUES) private List values = null; - public NillableAdSetTargetingRuleValue() { + public NillableAdSetTargetingRuleV24Q1Value() { } - public NillableAdSetTargetingRuleValue operand(OperandEnum operand) { + public NillableAdSetTargetingRuleV24Q1Value operand(OperandEnum operand) { this.operand = operand; return this; @@ -133,13 +133,13 @@ public void setOperand(OperandEnum operand) { } - public NillableAdSetTargetingRuleValue values(List values) { + public NillableAdSetTargetingRuleV24Q1Value values(List values) { this.values = values; return this; } - public NillableAdSetTargetingRuleValue addValuesItem(String valuesItem) { + public NillableAdSetTargetingRuleV24Q1Value addValuesItem(String valuesItem) { if (this.values == null) { this.values = null; } @@ -175,9 +175,9 @@ public void setValues(List values) { * * @param key name of the property * @param value value of the property - * @return the NillableAdSetTargetingRuleValue instance itself + * @return the NillableAdSetTargetingRuleV24Q1Value instance itself */ - public NillableAdSetTargetingRuleValue putAdditionalProperty(String key, Object value) { + public NillableAdSetTargetingRuleV24Q1Value putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -216,10 +216,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NillableAdSetTargetingRuleValue nillableAdSetTargetingRuleValue = (NillableAdSetTargetingRuleValue) o; - return Objects.equals(this.operand, nillableAdSetTargetingRuleValue.operand) && - Objects.equals(this.values, nillableAdSetTargetingRuleValue.values)&& - Objects.equals(this.additionalProperties, nillableAdSetTargetingRuleValue.additionalProperties); + NillableAdSetTargetingRuleV24Q1Value nillableAdSetTargetingRuleV24Q1Value = (NillableAdSetTargetingRuleV24Q1Value) o; + return Objects.equals(this.operand, nillableAdSetTargetingRuleV24Q1Value.operand) && + Objects.equals(this.values, nillableAdSetTargetingRuleV24Q1Value.values)&& + Objects.equals(this.additionalProperties, nillableAdSetTargetingRuleV24Q1Value.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -241,7 +241,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NillableAdSetTargetingRuleValue {\n"); + sb.append("class NillableAdSetTargetingRuleV24Q1Value {\n"); sb.append(" operand: ").append(toIndentedString(operand)).append("\n"); sb.append(" values: ").append(toIndentedString(values)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -278,12 +278,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NillableAdSetTargetingRuleValue + * @throws IOException if the JSON Object is invalid with respect to NillableAdSetTargetingRuleV24Q1Value */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!NillableAdSetTargetingRuleValue.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NillableAdSetTargetingRuleValue is not found in the empty JSON string", NillableAdSetTargetingRuleValue.openapiRequiredFields.toString())); + if (!NillableAdSetTargetingRuleV24Q1Value.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in NillableAdSetTargetingRuleV24Q1Value is not found in the empty JSON string", NillableAdSetTargetingRuleV24Q1Value.openapiRequiredFields.toString())); } } if ((jsonObj.get("operand") != null && !jsonObj.get("operand").isJsonNull()) && !jsonObj.get("operand").isJsonPrimitive()) { @@ -299,16 +299,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!NillableAdSetTargetingRuleValue.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NillableAdSetTargetingRuleValue' and its subtypes + if (!NillableAdSetTargetingRuleV24Q1Value.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NillableAdSetTargetingRuleV24Q1Value' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NillableAdSetTargetingRuleValue.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NillableAdSetTargetingRuleV24Q1Value.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, NillableAdSetTargetingRuleValue value) throws IOException { + public void write(JsonWriter out, NillableAdSetTargetingRuleV24Q1Value value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -331,11 +331,11 @@ else if (entry.getValue() instanceof Character) } @Override - public NillableAdSetTargetingRuleValue read(JsonReader in) throws IOException { + public NillableAdSetTargetingRuleV24Q1Value read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - NillableAdSetTargetingRuleValue instance = thisAdapter.fromJsonTree(jsonObj); + NillableAdSetTargetingRuleV24Q1Value instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -362,18 +362,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of NillableAdSetTargetingRuleValue given an JSON string + * Create an instance of NillableAdSetTargetingRuleV24Q1Value given an JSON string * * @param jsonString JSON string - * @return An instance of NillableAdSetTargetingRuleValue - * @throws IOException if the JSON string is invalid with respect to NillableAdSetTargetingRuleValue + * @return An instance of NillableAdSetTargetingRuleV24Q1Value + * @throws IOException if the JSON string is invalid with respect to NillableAdSetTargetingRuleV24Q1Value */ - public static NillableAdSetTargetingRuleValue fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NillableAdSetTargetingRuleValue.class); + public static NillableAdSetTargetingRuleV24Q1Value fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NillableAdSetTargetingRuleV24Q1Value.class); } /** - * Convert an instance of NillableAdSetTargetingRuleValue to an JSON string + * Convert an instance of NillableAdSetTargetingRuleV24Q1Value to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableDateTime.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableDateTime.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableDateTime.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableDateTime.java index c6fcd709..dc1036f0 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableDateTime.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableDateTime.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * structure that encapsulates an object that have valid business null values. If the structure is provided (i.e. not null), then the value in it, even null, is provided. diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableDecimal.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableDecimal.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableDecimal.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableDecimal.java index 12fe6d72..36f58699 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NillableDecimal.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableDecimal.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * structure that encapsulates an object that have valid business null values. If the structure is provided (i.e. not null), then the value in it, even null, is provided. diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableGenderV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableGenderV1.java new file mode 100644 index 00000000..bad2d708 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableGenderV1.java @@ -0,0 +1,339 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Placeholder object for value for which \"null\" is a valid business value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NillableGenderV1 { + /** + * The value. If missing or null the value is set to \"null\" + */ + @JsonAdapter(ValueEnum.Adapter.class) + public enum ValueEnum { + MALE("Male"), + + FEMALE("Female"); + + private String value; + + ValueEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ValueEnum fromValue(String value) { + for (ValueEnum b : ValueEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ValueEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ValueEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ValueEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private ValueEnum value; + + public NillableGenderV1() { + } + + public NillableGenderV1 value(ValueEnum value) { + + this.value = value; + return this; + } + + /** + * The value. If missing or null the value is set to \"null\" + * @return value + **/ + @javax.annotation.Nullable + + public ValueEnum getValue() { + return value; + } + + + public void setValue(ValueEnum value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the NillableGenderV1 instance itself + */ + public NillableGenderV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NillableGenderV1 nillableGenderV1 = (NillableGenderV1) o; + return Objects.equals(this.value, nillableGenderV1.value)&& + Objects.equals(this.additionalProperties, nillableGenderV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(value, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NillableGenderV1 {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to NillableGenderV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!NillableGenderV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in NillableGenderV1 is not found in the empty JSON string", NillableGenderV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NillableGenderV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NillableGenderV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NillableGenderV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NillableGenderV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public NillableGenderV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + NillableGenderV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NillableGenderV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of NillableGenderV1 + * @throws IOException if the JSON string is invalid with respect to NillableGenderV1 + */ + public static NillableGenderV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NillableGenderV1.class); + } + + /** + * Convert an instance of NillableGenderV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableInt32.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableInt32.java new file mode 100644 index 00000000..65dc138f --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableInt32.java @@ -0,0 +1,289 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Placeholder object for value for which \"null\" is a valid business value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NillableInt32 { + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private Integer value; + + public NillableInt32() { + } + + public NillableInt32 value(Integer value) { + + this.value = value; + return this; + } + + /** + * The value. If missing or null the value is set to \"null\" + * @return value + **/ + @javax.annotation.Nullable + + public Integer getValue() { + return value; + } + + + public void setValue(Integer value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the NillableInt32 instance itself + */ + public NillableInt32 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NillableInt32 nillableInt32 = (NillableInt32) o; + return Objects.equals(this.value, nillableInt32.value)&& + Objects.equals(this.additionalProperties, nillableInt32.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(value, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NillableInt32 {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to NillableInt32 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!NillableInt32.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in NillableInt32 is not found in the empty JSON string", NillableInt32.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NillableInt32.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NillableInt32' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NillableInt32.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NillableInt32 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public NillableInt32 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + NillableInt32 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NillableInt32 given an JSON string + * + * @param jsonString JSON string + * @return An instance of NillableInt32 + * @throws IOException if the JSON string is invalid with respect to NillableInt32 + */ + public static NillableInt32 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NillableInt32.class); + } + + /** + * Convert an instance of NillableInt32 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableString.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableString.java new file mode 100644 index 00000000..a5f2fba7 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/NillableString.java @@ -0,0 +1,292 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Placeholder object for string value for which \"null\" is a valid business value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NillableString { + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public NillableString() { + } + + public NillableString value(String value) { + + this.value = value; + return this; + } + + /** + * The string's value. If missing or null the string's value is set to \"null\" + * @return value + **/ + @javax.annotation.Nullable + + public String getValue() { + return value; + } + + + public void setValue(String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the NillableString instance itself + */ + public NillableString putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NillableString nillableString = (NillableString) o; + return Objects.equals(this.value, nillableString.value)&& + Objects.equals(this.additionalProperties, nillableString.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(value, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NillableString {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to NillableString + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!NillableString.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in NillableString is not found in the empty JSON string", NillableString.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NillableString.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NillableString' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NillableString.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NillableString value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public NillableString read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + NillableString instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NillableString given an JSON string + * + * @param jsonString JSON string + * @return An instance of NillableString + * @throws IOException if the JSON string is invalid with respect to NillableString + */ + public static NillableString fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NillableString.class); + } + + /** + * Convert an instance of NillableString to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetBidding.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetBiddingV24Q1.java similarity index 82% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetBidding.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetBiddingV24Q1.java index 39ece10f..3d2b8c22 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetBidding.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetBiddingV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.NillableDecimal; +import com.criteo.api.marketingsolutions.v2024_07.model.NillableDecimal; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,21 +43,21 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * ad set bidding patch model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchAdSetBidding { +public class PatchAdSetBiddingV24Q1 { public static final String SERIALIZED_NAME_BID_AMOUNT = "bidAmount"; @SerializedName(SERIALIZED_NAME_BID_AMOUNT) private NillableDecimal bidAmount; - public PatchAdSetBidding() { + public PatchAdSetBiddingV24Q1() { } - public PatchAdSetBidding bidAmount(NillableDecimal bidAmount) { + public PatchAdSetBiddingV24Q1 bidAmount(NillableDecimal bidAmount) { this.bidAmount = bidAmount; return this; @@ -91,9 +91,9 @@ public void setBidAmount(NillableDecimal bidAmount) { * * @param key name of the property * @param value value of the property - * @return the PatchAdSetBidding instance itself + * @return the PatchAdSetBiddingV24Q1 instance itself */ - public PatchAdSetBidding putAdditionalProperty(String key, Object value) { + public PatchAdSetBiddingV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -132,9 +132,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PatchAdSetBidding patchAdSetBidding = (PatchAdSetBidding) o; - return Objects.equals(this.bidAmount, patchAdSetBidding.bidAmount)&& - Objects.equals(this.additionalProperties, patchAdSetBidding.additionalProperties); + PatchAdSetBiddingV24Q1 patchAdSetBiddingV24Q1 = (PatchAdSetBiddingV24Q1) o; + return Objects.equals(this.bidAmount, patchAdSetBiddingV24Q1.bidAmount)&& + Objects.equals(this.additionalProperties, patchAdSetBiddingV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -156,7 +156,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PatchAdSetBidding {\n"); + sb.append("class PatchAdSetBiddingV24Q1 {\n"); sb.append(" bidAmount: ").append(toIndentedString(bidAmount)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -191,12 +191,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PatchAdSetBidding + * @throws IOException if the JSON Object is invalid with respect to PatchAdSetBiddingV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!PatchAdSetBidding.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchAdSetBidding is not found in the empty JSON string", PatchAdSetBidding.openapiRequiredFields.toString())); + if (!PatchAdSetBiddingV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PatchAdSetBiddingV24Q1 is not found in the empty JSON string", PatchAdSetBiddingV24Q1.openapiRequiredFields.toString())); } } // validate the optional field `bidAmount` @@ -209,16 +209,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchAdSetBidding.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchAdSetBidding' and its subtypes + if (!PatchAdSetBiddingV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PatchAdSetBiddingV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchAdSetBidding.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PatchAdSetBiddingV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PatchAdSetBidding value) throws IOException { + public void write(JsonWriter out, PatchAdSetBiddingV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -241,11 +241,11 @@ else if (entry.getValue() instanceof Character) } @Override - public PatchAdSetBidding read(JsonReader in) throws IOException { + public PatchAdSetBiddingV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - PatchAdSetBidding instance = thisAdapter.fromJsonTree(jsonObj); + PatchAdSetBiddingV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -272,18 +272,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of PatchAdSetBidding given an JSON string + * Create an instance of PatchAdSetBiddingV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of PatchAdSetBidding - * @throws IOException if the JSON string is invalid with respect to PatchAdSetBidding + * @return An instance of PatchAdSetBiddingV24Q1 + * @throws IOException if the JSON string is invalid with respect to PatchAdSetBiddingV24Q1 */ - public static PatchAdSetBidding fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchAdSetBidding.class); + public static PatchAdSetBiddingV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PatchAdSetBiddingV24Q1.class); } /** - * Convert an instance of PatchAdSetBidding to an JSON string + * Convert an instance of PatchAdSetBiddingV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetBudget.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetBudgetV24Q1.java similarity index 87% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetBudget.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetBudgetV24Q1.java index b059bc0f..97fec23e 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetBudget.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetBudgetV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.NillableDecimal; +import com.criteo.api.marketingsolutions.v2024_07.model.NillableDecimal; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +43,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * ad set budget patch model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchAdSetBudget { +public class PatchAdSetBudgetV24Q1 { /** * Gets or Sets budgetStrategy */ @@ -112,7 +112,9 @@ public enum BudgetRenewalEnum { MONTHLY("monthly"), - LIFETIME("lifetime"); + LIFETIME("lifetime"), + + WEEKLY("weekly"); private String value; @@ -274,10 +276,10 @@ public BudgetDeliveryWeekEnum read(final JsonReader jsonReader) throws IOExcepti @SerializedName(SERIALIZED_NAME_BUDGET_AMOUNT) private NillableDecimal budgetAmount; - public PatchAdSetBudget() { + public PatchAdSetBudgetV24Q1() { } - public PatchAdSetBudget budgetStrategy(BudgetStrategyEnum budgetStrategy) { + public PatchAdSetBudgetV24Q1 budgetStrategy(BudgetStrategyEnum budgetStrategy) { this.budgetStrategy = budgetStrategy; return this; @@ -299,7 +301,7 @@ public void setBudgetStrategy(BudgetStrategyEnum budgetStrategy) { } - public PatchAdSetBudget budgetRenewal(BudgetRenewalEnum budgetRenewal) { + public PatchAdSetBudgetV24Q1 budgetRenewal(BudgetRenewalEnum budgetRenewal) { this.budgetRenewal = budgetRenewal; return this; @@ -321,7 +323,7 @@ public void setBudgetRenewal(BudgetRenewalEnum budgetRenewal) { } - public PatchAdSetBudget budgetDeliverySmoothing(BudgetDeliverySmoothingEnum budgetDeliverySmoothing) { + public PatchAdSetBudgetV24Q1 budgetDeliverySmoothing(BudgetDeliverySmoothingEnum budgetDeliverySmoothing) { this.budgetDeliverySmoothing = budgetDeliverySmoothing; return this; @@ -343,7 +345,7 @@ public void setBudgetDeliverySmoothing(BudgetDeliverySmoothingEnum budgetDeliver } - public PatchAdSetBudget budgetDeliveryWeek(BudgetDeliveryWeekEnum budgetDeliveryWeek) { + public PatchAdSetBudgetV24Q1 budgetDeliveryWeek(BudgetDeliveryWeekEnum budgetDeliveryWeek) { this.budgetDeliveryWeek = budgetDeliveryWeek; return this; @@ -365,7 +367,7 @@ public void setBudgetDeliveryWeek(BudgetDeliveryWeekEnum budgetDeliveryWeek) { } - public PatchAdSetBudget budgetAmount(NillableDecimal budgetAmount) { + public PatchAdSetBudgetV24Q1 budgetAmount(NillableDecimal budgetAmount) { this.budgetAmount = budgetAmount; return this; @@ -399,9 +401,9 @@ public void setBudgetAmount(NillableDecimal budgetAmount) { * * @param key name of the property * @param value value of the property - * @return the PatchAdSetBudget instance itself + * @return the PatchAdSetBudgetV24Q1 instance itself */ - public PatchAdSetBudget putAdditionalProperty(String key, Object value) { + public PatchAdSetBudgetV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -440,13 +442,13 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PatchAdSetBudget patchAdSetBudget = (PatchAdSetBudget) o; - return Objects.equals(this.budgetStrategy, patchAdSetBudget.budgetStrategy) && - Objects.equals(this.budgetRenewal, patchAdSetBudget.budgetRenewal) && - Objects.equals(this.budgetDeliverySmoothing, patchAdSetBudget.budgetDeliverySmoothing) && - Objects.equals(this.budgetDeliveryWeek, patchAdSetBudget.budgetDeliveryWeek) && - Objects.equals(this.budgetAmount, patchAdSetBudget.budgetAmount)&& - Objects.equals(this.additionalProperties, patchAdSetBudget.additionalProperties); + PatchAdSetBudgetV24Q1 patchAdSetBudgetV24Q1 = (PatchAdSetBudgetV24Q1) o; + return Objects.equals(this.budgetStrategy, patchAdSetBudgetV24Q1.budgetStrategy) && + Objects.equals(this.budgetRenewal, patchAdSetBudgetV24Q1.budgetRenewal) && + Objects.equals(this.budgetDeliverySmoothing, patchAdSetBudgetV24Q1.budgetDeliverySmoothing) && + Objects.equals(this.budgetDeliveryWeek, patchAdSetBudgetV24Q1.budgetDeliveryWeek) && + Objects.equals(this.budgetAmount, patchAdSetBudgetV24Q1.budgetAmount)&& + Objects.equals(this.additionalProperties, patchAdSetBudgetV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -468,7 +470,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PatchAdSetBudget {\n"); + sb.append("class PatchAdSetBudgetV24Q1 {\n"); sb.append(" budgetStrategy: ").append(toIndentedString(budgetStrategy)).append("\n"); sb.append(" budgetRenewal: ").append(toIndentedString(budgetRenewal)).append("\n"); sb.append(" budgetDeliverySmoothing: ").append(toIndentedString(budgetDeliverySmoothing)).append("\n"); @@ -511,12 +513,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PatchAdSetBudget + * @throws IOException if the JSON Object is invalid with respect to PatchAdSetBudgetV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!PatchAdSetBudget.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchAdSetBudget is not found in the empty JSON string", PatchAdSetBudget.openapiRequiredFields.toString())); + if (!PatchAdSetBudgetV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PatchAdSetBudgetV24Q1 is not found in the empty JSON string", PatchAdSetBudgetV24Q1.openapiRequiredFields.toString())); } } if ((jsonObj.get("budgetStrategy") != null && !jsonObj.get("budgetStrategy").isJsonNull()) && !jsonObj.get("budgetStrategy").isJsonPrimitive()) { @@ -541,16 +543,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchAdSetBudget.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchAdSetBudget' and its subtypes + if (!PatchAdSetBudgetV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PatchAdSetBudgetV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchAdSetBudget.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PatchAdSetBudgetV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PatchAdSetBudget value) throws IOException { + public void write(JsonWriter out, PatchAdSetBudgetV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -573,11 +575,11 @@ else if (entry.getValue() instanceof Character) } @Override - public PatchAdSetBudget read(JsonReader in) throws IOException { + public PatchAdSetBudgetV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - PatchAdSetBudget instance = thisAdapter.fromJsonTree(jsonObj); + PatchAdSetBudgetV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -604,18 +606,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of PatchAdSetBudget given an JSON string + * Create an instance of PatchAdSetBudgetV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of PatchAdSetBudget - * @throws IOException if the JSON string is invalid with respect to PatchAdSetBudget + * @return An instance of PatchAdSetBudgetV24Q1 + * @throws IOException if the JSON string is invalid with respect to PatchAdSetBudgetV24Q1 */ - public static PatchAdSetBudget fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchAdSetBudget.class); + public static PatchAdSetBudgetV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PatchAdSetBudgetV24Q1.class); } /** - * Convert an instance of PatchAdSetBudget to an JSON string + * Convert an instance of PatchAdSetBudgetV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBid.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBid.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBid.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBid.java index 7e0ae77c..24d7e678 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBid.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBid.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Category Bid to update for a given combination of Ad Set and Category. diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidListRequest.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidListRequest.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidListRequest.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidListRequest.java index 8e55b8ec..55971fbd 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidListRequest.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidListRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetCategoryBidResource; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetCategoryBidResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Data model for a list of input resources diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidResource.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidResource.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidResource.java index a9432653..df81c9db 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidResource.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetCategoryBid; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetCategoryBid; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidResultListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidResultListResponse.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidResultListResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidResultListResponse.java index ad4442ff..35b3c55d 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidResultListResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidResultListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.CommonProblem; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetCategoryBidResultResource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetCategoryBidResultResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Data model for a list of response resources diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidResultResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidResultResource.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidResultResource.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidResultResource.java index 971ece1e..8c8411fd 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetCategoryBidResultResource.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetCategoryBidResultResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplier.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplier.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplier.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplier.java index aea6a58f..1489afbe 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplier.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplier.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Display Multiplier to update for a given combination of Ad Set and Category. diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierListRequest.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierListRequest.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierListRequest.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierListRequest.java index a4190aa9..d16a05cb 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierListRequest.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierListRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetDisplayMultiplierResource; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetDisplayMultiplierResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Data model for a list of input resources diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierResource.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierResource.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierResource.java index fb129b7a..f6b61d2f 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierResource.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetDisplayMultiplier; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetDisplayMultiplier; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierResultListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierResultListResponse.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierResultListResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierResultListResponse.java index 8f633340..886cfe0b 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierResultListResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierResultListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.CommonProblem; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetDisplayMultiplierResultResource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetDisplayMultiplierResultResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Data model for a list of response resources diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierResultResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierResultResource.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierResultResource.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierResultResource.java index 6607d9ce..6cd2e1db 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetDisplayMultiplierResultResource.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetDisplayMultiplierResultResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetScheduling.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetSchedulingV24Q1.java similarity index 82% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetScheduling.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetSchedulingV24Q1.java index ad95344e..2e539a25 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSetScheduling.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetSchedulingV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.NillableDateTime; +import com.criteo.api.marketingsolutions.v2024_07.model.NillableDateTime; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +42,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * ad set schedule patch model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchAdSetScheduling { +public class PatchAdSetSchedulingV24Q1 { public static final String SERIALIZED_NAME_START_DATE = "startDate"; @SerializedName(SERIALIZED_NAME_START_DATE) private NillableDateTime startDate; @@ -57,10 +57,10 @@ public class PatchAdSetScheduling { @SerializedName(SERIALIZED_NAME_END_DATE) private NillableDateTime endDate; - public PatchAdSetScheduling() { + public PatchAdSetSchedulingV24Q1() { } - public PatchAdSetScheduling startDate(NillableDateTime startDate) { + public PatchAdSetSchedulingV24Q1 startDate(NillableDateTime startDate) { this.startDate = startDate; return this; @@ -82,7 +82,7 @@ public void setStartDate(NillableDateTime startDate) { } - public PatchAdSetScheduling endDate(NillableDateTime endDate) { + public PatchAdSetSchedulingV24Q1 endDate(NillableDateTime endDate) { this.endDate = endDate; return this; @@ -116,9 +116,9 @@ public void setEndDate(NillableDateTime endDate) { * * @param key name of the property * @param value value of the property - * @return the PatchAdSetScheduling instance itself + * @return the PatchAdSetSchedulingV24Q1 instance itself */ - public PatchAdSetScheduling putAdditionalProperty(String key, Object value) { + public PatchAdSetSchedulingV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -157,10 +157,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PatchAdSetScheduling patchAdSetScheduling = (PatchAdSetScheduling) o; - return Objects.equals(this.startDate, patchAdSetScheduling.startDate) && - Objects.equals(this.endDate, patchAdSetScheduling.endDate)&& - Objects.equals(this.additionalProperties, patchAdSetScheduling.additionalProperties); + PatchAdSetSchedulingV24Q1 patchAdSetSchedulingV24Q1 = (PatchAdSetSchedulingV24Q1) o; + return Objects.equals(this.startDate, patchAdSetSchedulingV24Q1.startDate) && + Objects.equals(this.endDate, patchAdSetSchedulingV24Q1.endDate)&& + Objects.equals(this.additionalProperties, patchAdSetSchedulingV24Q1.additionalProperties); } @Override @@ -171,7 +171,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PatchAdSetScheduling {\n"); + sb.append("class PatchAdSetSchedulingV24Q1 {\n"); sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -208,12 +208,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PatchAdSetScheduling + * @throws IOException if the JSON Object is invalid with respect to PatchAdSetSchedulingV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!PatchAdSetScheduling.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchAdSetScheduling is not found in the empty JSON string", PatchAdSetScheduling.openapiRequiredFields.toString())); + if (!PatchAdSetSchedulingV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PatchAdSetSchedulingV24Q1 is not found in the empty JSON string", PatchAdSetSchedulingV24Q1.openapiRequiredFields.toString())); } } // validate the optional field `startDate` @@ -230,16 +230,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchAdSetScheduling.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchAdSetScheduling' and its subtypes + if (!PatchAdSetSchedulingV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PatchAdSetSchedulingV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchAdSetScheduling.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PatchAdSetSchedulingV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PatchAdSetScheduling value) throws IOException { + public void write(JsonWriter out, PatchAdSetSchedulingV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -262,11 +262,11 @@ else if (entry.getValue() instanceof Character) } @Override - public PatchAdSetScheduling read(JsonReader in) throws IOException { + public PatchAdSetSchedulingV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - PatchAdSetScheduling instance = thisAdapter.fromJsonTree(jsonObj); + PatchAdSetSchedulingV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -293,18 +293,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of PatchAdSetScheduling given an JSON string + * Create an instance of PatchAdSetSchedulingV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of PatchAdSetScheduling - * @throws IOException if the JSON string is invalid with respect to PatchAdSetScheduling + * @return An instance of PatchAdSetSchedulingV24Q1 + * @throws IOException if the JSON string is invalid with respect to PatchAdSetSchedulingV24Q1 */ - public static PatchAdSetScheduling fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchAdSetScheduling.class); + public static PatchAdSetSchedulingV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PatchAdSetSchedulingV24Q1.class); } /** - * Convert an instance of PatchAdSetScheduling to an JSON string + * Convert an instance of PatchAdSetSchedulingV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSet.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetV24Q1.java similarity index 75% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSet.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetV24Q1.java index d4050e78..a9fc1b18 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchAdSet.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchAdSetV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,14 +11,14 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AdSetTargeting; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetBidding; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetBudget; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSetScheduling; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetTargetingV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetBiddingV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetBudgetV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetSchedulingV24Q1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,37 +46,37 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * ad set patch model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PatchAdSet { +public class PatchAdSetV24Q1 { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; public static final String SERIALIZED_NAME_SCHEDULING = "scheduling"; @SerializedName(SERIALIZED_NAME_SCHEDULING) - private PatchAdSetScheduling scheduling; + private PatchAdSetSchedulingV24Q1 scheduling; public static final String SERIALIZED_NAME_BIDDING = "bidding"; @SerializedName(SERIALIZED_NAME_BIDDING) - private PatchAdSetBidding bidding; + private PatchAdSetBiddingV24Q1 bidding; public static final String SERIALIZED_NAME_TARGETING = "targeting"; @SerializedName(SERIALIZED_NAME_TARGETING) - private AdSetTargeting targeting; + private AdSetTargetingV24Q1 targeting; public static final String SERIALIZED_NAME_BUDGET = "budget"; @SerializedName(SERIALIZED_NAME_BUDGET) - private PatchAdSetBudget budget; + private PatchAdSetBudgetV24Q1 budget; - public PatchAdSet() { + public PatchAdSetV24Q1() { } - public PatchAdSet name(String name) { + public PatchAdSetV24Q1 name(String name) { this.name = name; return this; @@ -98,7 +98,7 @@ public void setName(String name) { } - public PatchAdSet scheduling(PatchAdSetScheduling scheduling) { + public PatchAdSetV24Q1 scheduling(PatchAdSetSchedulingV24Q1 scheduling) { this.scheduling = scheduling; return this; @@ -110,17 +110,17 @@ public PatchAdSet scheduling(PatchAdSetScheduling scheduling) { **/ @javax.annotation.Nullable - public PatchAdSetScheduling getScheduling() { + public PatchAdSetSchedulingV24Q1 getScheduling() { return scheduling; } - public void setScheduling(PatchAdSetScheduling scheduling) { + public void setScheduling(PatchAdSetSchedulingV24Q1 scheduling) { this.scheduling = scheduling; } - public PatchAdSet bidding(PatchAdSetBidding bidding) { + public PatchAdSetV24Q1 bidding(PatchAdSetBiddingV24Q1 bidding) { this.bidding = bidding; return this; @@ -132,17 +132,17 @@ public PatchAdSet bidding(PatchAdSetBidding bidding) { **/ @javax.annotation.Nullable - public PatchAdSetBidding getBidding() { + public PatchAdSetBiddingV24Q1 getBidding() { return bidding; } - public void setBidding(PatchAdSetBidding bidding) { + public void setBidding(PatchAdSetBiddingV24Q1 bidding) { this.bidding = bidding; } - public PatchAdSet targeting(AdSetTargeting targeting) { + public PatchAdSetV24Q1 targeting(AdSetTargetingV24Q1 targeting) { this.targeting = targeting; return this; @@ -154,17 +154,17 @@ public PatchAdSet targeting(AdSetTargeting targeting) { **/ @javax.annotation.Nullable - public AdSetTargeting getTargeting() { + public AdSetTargetingV24Q1 getTargeting() { return targeting; } - public void setTargeting(AdSetTargeting targeting) { + public void setTargeting(AdSetTargetingV24Q1 targeting) { this.targeting = targeting; } - public PatchAdSet budget(PatchAdSetBudget budget) { + public PatchAdSetV24Q1 budget(PatchAdSetBudgetV24Q1 budget) { this.budget = budget; return this; @@ -176,12 +176,12 @@ public PatchAdSet budget(PatchAdSetBudget budget) { **/ @javax.annotation.Nullable - public PatchAdSetBudget getBudget() { + public PatchAdSetBudgetV24Q1 getBudget() { return budget; } - public void setBudget(PatchAdSetBudget budget) { + public void setBudget(PatchAdSetBudgetV24Q1 budget) { this.budget = budget; } @@ -198,9 +198,9 @@ public void setBudget(PatchAdSetBudget budget) { * * @param key name of the property * @param value value of the property - * @return the PatchAdSet instance itself + * @return the PatchAdSetV24Q1 instance itself */ - public PatchAdSet putAdditionalProperty(String key, Object value) { + public PatchAdSetV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -239,13 +239,13 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PatchAdSet patchAdSet = (PatchAdSet) o; - return Objects.equals(this.name, patchAdSet.name) && - Objects.equals(this.scheduling, patchAdSet.scheduling) && - Objects.equals(this.bidding, patchAdSet.bidding) && - Objects.equals(this.targeting, patchAdSet.targeting) && - Objects.equals(this.budget, patchAdSet.budget)&& - Objects.equals(this.additionalProperties, patchAdSet.additionalProperties); + PatchAdSetV24Q1 patchAdSetV24Q1 = (PatchAdSetV24Q1) o; + return Objects.equals(this.name, patchAdSetV24Q1.name) && + Objects.equals(this.scheduling, patchAdSetV24Q1.scheduling) && + Objects.equals(this.bidding, patchAdSetV24Q1.bidding) && + Objects.equals(this.targeting, patchAdSetV24Q1.targeting) && + Objects.equals(this.budget, patchAdSetV24Q1.budget)&& + Objects.equals(this.additionalProperties, patchAdSetV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -267,7 +267,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PatchAdSet {\n"); + sb.append("class PatchAdSetV24Q1 {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" scheduling: ").append(toIndentedString(scheduling)).append("\n"); sb.append(" bidding: ").append(toIndentedString(bidding)).append("\n"); @@ -310,12 +310,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PatchAdSet + * @throws IOException if the JSON Object is invalid with respect to PatchAdSetV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!PatchAdSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PatchAdSet is not found in the empty JSON string", PatchAdSet.openapiRequiredFields.toString())); + if (!PatchAdSetV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PatchAdSetV24Q1 is not found in the empty JSON string", PatchAdSetV24Q1.openapiRequiredFields.toString())); } } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { @@ -323,19 +323,19 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `scheduling` if (jsonObj.get("scheduling") != null && !jsonObj.get("scheduling").isJsonNull()) { - PatchAdSetScheduling.validateJsonObject(jsonObj.getAsJsonObject("scheduling")); + PatchAdSetSchedulingV24Q1.validateJsonObject(jsonObj.getAsJsonObject("scheduling")); } // validate the optional field `bidding` if (jsonObj.get("bidding") != null && !jsonObj.get("bidding").isJsonNull()) { - PatchAdSetBidding.validateJsonObject(jsonObj.getAsJsonObject("bidding")); + PatchAdSetBiddingV24Q1.validateJsonObject(jsonObj.getAsJsonObject("bidding")); } // validate the optional field `targeting` if (jsonObj.get("targeting") != null && !jsonObj.get("targeting").isJsonNull()) { - AdSetTargeting.validateJsonObject(jsonObj.getAsJsonObject("targeting")); + AdSetTargetingV24Q1.validateJsonObject(jsonObj.getAsJsonObject("targeting")); } // validate the optional field `budget` if (jsonObj.get("budget") != null && !jsonObj.get("budget").isJsonNull()) { - PatchAdSetBudget.validateJsonObject(jsonObj.getAsJsonObject("budget")); + PatchAdSetBudgetV24Q1.validateJsonObject(jsonObj.getAsJsonObject("budget")); } } @@ -343,16 +343,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PatchAdSet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PatchAdSet' and its subtypes + if (!PatchAdSetV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PatchAdSetV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PatchAdSet.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PatchAdSetV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PatchAdSet value) throws IOException { + public void write(JsonWriter out, PatchAdSetV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -375,11 +375,11 @@ else if (entry.getValue() instanceof Character) } @Override - public PatchAdSet read(JsonReader in) throws IOException { + public PatchAdSetV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - PatchAdSet instance = thisAdapter.fromJsonTree(jsonObj); + PatchAdSetV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -406,18 +406,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of PatchAdSet given an JSON string + * Create an instance of PatchAdSetV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of PatchAdSet - * @throws IOException if the JSON string is invalid with respect to PatchAdSet + * @return An instance of PatchAdSetV24Q1 + * @throws IOException if the JSON string is invalid with respect to PatchAdSetV24Q1 */ - public static PatchAdSet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PatchAdSet.class); + public static PatchAdSetV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PatchAdSetV24Q1.class); } /** - * Convert an instance of PatchAdSet to an JSON string + * Convert an instance of PatchAdSetV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaign.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaign.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaign.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaign.java index 8abbf4de..02724fd9 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaign.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaign.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchCampaignSpendLimit; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchCampaignSpendLimit; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * campaign patch model diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaignListRequest.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaignListRequest.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaignListRequest.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaignListRequest.java index b517be9a..e387d5bf 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaignListRequest.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaignListRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchCampaignWriteResource; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchCampaignWriteResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * List of input resources diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaignSpendLimit.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaignSpendLimit.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaignSpendLimit.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaignSpendLimit.java index d3adf4e8..41c8a1a2 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaignSpendLimit.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaignSpendLimit.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.NillableDecimal; +import com.criteo.api.marketingsolutions.v2024_07.model.NillableDecimal; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * campaign spend limit model diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaignWriteResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaignWriteResource.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaignWriteResource.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaignWriteResource.java index 9887810d..5173e8f4 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchCampaignWriteResource.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchCampaignWriteResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchCampaign; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchCampaign; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * write model data for resources diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchResultCampaignListResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchResultCampaignListResponse.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchResultCampaignListResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchResultCampaignListResponse.java index 5a077f71..8297ca6f 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchResultCampaignListResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchResultCampaignListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.CommonProblem; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchResultCampaignReadResource; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchResultCampaignReadResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * List of output resources diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchResultCampaignReadResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchResultCampaignReadResource.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchResultCampaignReadResource.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchResultCampaignReadResource.java index 3e24949a..59c22850 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PatchResultCampaignReadResource.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PatchResultCampaignReadResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * read model data for resources diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PlacementsReportQueryDataMessage.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PlacementsReportQueryDataMessage.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PlacementsReportQueryDataMessage.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PlacementsReportQueryDataMessage.java index 29d7cdc7..1578d0ee 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PlacementsReportQueryDataMessage.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PlacementsReportQueryDataMessage.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.PlacementsReportQueryEntityMessage; +import com.criteo.api.marketingsolutions.v2024_07.model.PlacementsReportQueryEntityMessage; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Contains queries for Placements report diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PlacementsReportQueryEntityMessage.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PlacementsReportQueryEntityMessage.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PlacementsReportQueryEntityMessage.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PlacementsReportQueryEntityMessage.java index b47d9efe..85dabf7a 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PlacementsReportQueryEntityMessage.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PlacementsReportQueryEntityMessage.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.PlacementsReportQueryMessage; +import com.criteo.api.marketingsolutions.v2024_07.model.PlacementsReportQueryMessage; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Contains a query for Transaction report and its type diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PlacementsReportQueryMessage.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PlacementsReportQueryMessage.java similarity index 99% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PlacementsReportQueryMessage.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PlacementsReportQueryMessage.java index 1ff934be..81a0b034 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PlacementsReportQueryMessage.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PlacementsReportQueryMessage.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * This is the message defining the query for Placements report diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PointOfInterestV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PointOfInterestV1.java new file mode 100644 index 00000000..381276d4 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PointOfInterestV1.java @@ -0,0 +1,350 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Named coordinate defined by its latitude and longitude. Latitude and Longitude are rounded at 5 decimals. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PointOfInterestV1 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_LATITUDE = "latitude"; + @SerializedName(SERIALIZED_NAME_LATITUDE) + private Double latitude; + + public static final String SERIALIZED_NAME_LONGITUDE = "longitude"; + @SerializedName(SERIALIZED_NAME_LONGITUDE) + private Double longitude; + + public PointOfInterestV1() { + } + + public PointOfInterestV1 name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the point of interest + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public PointOfInterestV1 latitude(Double latitude) { + + this.latitude = latitude; + return this; + } + + /** + * ISO-6709 latitude (rounded at 5 decimals) + * @return latitude + **/ + @javax.annotation.Nullable + + public Double getLatitude() { + return latitude; + } + + + public void setLatitude(Double latitude) { + this.latitude = latitude; + } + + + public PointOfInterestV1 longitude(Double longitude) { + + this.longitude = longitude; + return this; + } + + /** + * ISO-6709 longitude (rounded at 5 decimals) + * @return longitude + **/ + @javax.annotation.Nullable + + public Double getLongitude() { + return longitude; + } + + + public void setLongitude(Double longitude) { + this.longitude = longitude; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PointOfInterestV1 instance itself + */ + public PointOfInterestV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PointOfInterestV1 pointOfInterestV1 = (PointOfInterestV1) o; + return Objects.equals(this.name, pointOfInterestV1.name) && + Objects.equals(this.latitude, pointOfInterestV1.latitude) && + Objects.equals(this.longitude, pointOfInterestV1.longitude)&& + Objects.equals(this.additionalProperties, pointOfInterestV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, latitude, longitude, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PointOfInterestV1 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" latitude: ").append(toIndentedString(latitude)).append("\n"); + sb.append(" longitude: ").append(toIndentedString(longitude)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("latitude"); + openapiFields.add("longitude"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to PointOfInterestV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!PointOfInterestV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PointOfInterestV1 is not found in the empty JSON string", PointOfInterestV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PointOfInterestV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PointOfInterestV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PointOfInterestV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PointOfInterestV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PointOfInterestV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + PointOfInterestV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PointOfInterestV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of PointOfInterestV1 + * @throws IOException if the JSON string is invalid with respect to PointOfInterestV1 + */ + public static PointOfInterestV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PointOfInterestV1.class); + } + + /** + * Convert an instance of PointOfInterestV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PortfolioMessage.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PortfolioMessage.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PortfolioMessage.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PortfolioMessage.java index 589e725f..e297bbae 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/PortfolioMessage.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/PortfolioMessage.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Class with elementary info about advertiser diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ProblemDetails.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProblemDetails.java similarity index 99% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ProblemDetails.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProblemDetails.java index 4a53ed16..04aab782 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ProblemDetails.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProblemDetails.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Common problem object. diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ProblemsDetails.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProblemsDetails.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ProblemsDetails.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProblemsDetails.java index e86e2869..090a9a4d 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ProblemsDetails.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProblemsDetails.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.ProblemDetails; +import com.criteo.api.marketingsolutions.v2024_07.model.ProblemDetails; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Common problems object diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingCreateV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingCreateV1.java new file mode 100644 index 00000000..d8033fc5 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingCreateV1.java @@ -0,0 +1,405 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target prospecting users to website visitors. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ProspectingCreateV1 { + public static final String SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MIN = "daysSinceLastVisitMin"; + @SerializedName(SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MIN) + private Integer daysSinceLastVisitMin; + + public static final String SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MAX = "daysSinceLastVisitMax"; + @SerializedName(SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MAX) + private Integer daysSinceLastVisitMax; + + /** + * Type of users to target + */ + @JsonAdapter(UsersTypeEnum.Adapter.class) + public enum UsersTypeEnum { + PROSPECTS("Prospects"), + + PROSPECTSORNONBUYERS("ProspectsOrNonBuyers"); + + private String value; + + UsersTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UsersTypeEnum fromValue(String value) { + for (UsersTypeEnum b : UsersTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UsersTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UsersTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UsersTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_USERS_TYPE = "usersType"; + @SerializedName(SERIALIZED_NAME_USERS_TYPE) + private UsersTypeEnum usersType; + + public ProspectingCreateV1() { + } + + public ProspectingCreateV1 daysSinceLastVisitMin(Integer daysSinceLastVisitMin) { + + this.daysSinceLastVisitMin = daysSinceLastVisitMin; + return this; + } + + /** + * When non buyers are included, include users who visited your website before this number of days + * @return daysSinceLastVisitMin + **/ + @javax.annotation.Nullable + + public Integer getDaysSinceLastVisitMin() { + return daysSinceLastVisitMin; + } + + + public void setDaysSinceLastVisitMin(Integer daysSinceLastVisitMin) { + this.daysSinceLastVisitMin = daysSinceLastVisitMin; + } + + + public ProspectingCreateV1 daysSinceLastVisitMax(Integer daysSinceLastVisitMax) { + + this.daysSinceLastVisitMax = daysSinceLastVisitMax; + return this; + } + + /** + * When non buyers are included, include users who visited your website after this number of days + * @return daysSinceLastVisitMax + **/ + @javax.annotation.Nullable + + public Integer getDaysSinceLastVisitMax() { + return daysSinceLastVisitMax; + } + + + public void setDaysSinceLastVisitMax(Integer daysSinceLastVisitMax) { + this.daysSinceLastVisitMax = daysSinceLastVisitMax; + } + + + public ProspectingCreateV1 usersType(UsersTypeEnum usersType) { + + this.usersType = usersType; + return this; + } + + /** + * Type of users to target + * @return usersType + **/ + @javax.annotation.Nonnull + + public UsersTypeEnum getUsersType() { + return usersType; + } + + + public void setUsersType(UsersTypeEnum usersType) { + this.usersType = usersType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ProspectingCreateV1 instance itself + */ + public ProspectingCreateV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProspectingCreateV1 prospectingCreateV1 = (ProspectingCreateV1) o; + return Objects.equals(this.daysSinceLastVisitMin, prospectingCreateV1.daysSinceLastVisitMin) && + Objects.equals(this.daysSinceLastVisitMax, prospectingCreateV1.daysSinceLastVisitMax) && + Objects.equals(this.usersType, prospectingCreateV1.usersType)&& + Objects.equals(this.additionalProperties, prospectingCreateV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(daysSinceLastVisitMin, daysSinceLastVisitMax, usersType, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProspectingCreateV1 {\n"); + sb.append(" daysSinceLastVisitMin: ").append(toIndentedString(daysSinceLastVisitMin)).append("\n"); + sb.append(" daysSinceLastVisitMax: ").append(toIndentedString(daysSinceLastVisitMax)).append("\n"); + sb.append(" usersType: ").append(toIndentedString(usersType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("daysSinceLastVisitMin"); + openapiFields.add("daysSinceLastVisitMax"); + openapiFields.add("usersType"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("usersType"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ProspectingCreateV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ProspectingCreateV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProspectingCreateV1 is not found in the empty JSON string", ProspectingCreateV1.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ProspectingCreateV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("usersType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `usersType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("usersType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProspectingCreateV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProspectingCreateV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProspectingCreateV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProspectingCreateV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ProspectingCreateV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ProspectingCreateV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProspectingCreateV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProspectingCreateV1 + * @throws IOException if the JSON string is invalid with respect to ProspectingCreateV1 + */ + public static ProspectingCreateV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProspectingCreateV1.class); + } + + /** + * Convert an instance of ProspectingCreateV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingUpdateV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingUpdateV1.java new file mode 100644 index 00000000..e0357bf4 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingUpdateV1.java @@ -0,0 +1,406 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.NillableInt32; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target prospecting users to website visitors. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ProspectingUpdateV1 { + public static final String SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MIN = "daysSinceLastVisitMin"; + @SerializedName(SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MIN) + private NillableInt32 daysSinceLastVisitMin; + + public static final String SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MAX = "daysSinceLastVisitMax"; + @SerializedName(SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MAX) + private NillableInt32 daysSinceLastVisitMax; + + /** + * Type of users to target + */ + @JsonAdapter(UsersTypeEnum.Adapter.class) + public enum UsersTypeEnum { + PROSPECTS("Prospects"), + + PROSPECTSORNONBUYERS("ProspectsOrNonBuyers"); + + private String value; + + UsersTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UsersTypeEnum fromValue(String value) { + for (UsersTypeEnum b : UsersTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UsersTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UsersTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UsersTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_USERS_TYPE = "usersType"; + @SerializedName(SERIALIZED_NAME_USERS_TYPE) + private UsersTypeEnum usersType; + + public ProspectingUpdateV1() { + } + + public ProspectingUpdateV1 daysSinceLastVisitMin(NillableInt32 daysSinceLastVisitMin) { + + this.daysSinceLastVisitMin = daysSinceLastVisitMin; + return this; + } + + /** + * Get daysSinceLastVisitMin + * @return daysSinceLastVisitMin + **/ + @javax.annotation.Nullable + + public NillableInt32 getDaysSinceLastVisitMin() { + return daysSinceLastVisitMin; + } + + + public void setDaysSinceLastVisitMin(NillableInt32 daysSinceLastVisitMin) { + this.daysSinceLastVisitMin = daysSinceLastVisitMin; + } + + + public ProspectingUpdateV1 daysSinceLastVisitMax(NillableInt32 daysSinceLastVisitMax) { + + this.daysSinceLastVisitMax = daysSinceLastVisitMax; + return this; + } + + /** + * Get daysSinceLastVisitMax + * @return daysSinceLastVisitMax + **/ + @javax.annotation.Nullable + + public NillableInt32 getDaysSinceLastVisitMax() { + return daysSinceLastVisitMax; + } + + + public void setDaysSinceLastVisitMax(NillableInt32 daysSinceLastVisitMax) { + this.daysSinceLastVisitMax = daysSinceLastVisitMax; + } + + + public ProspectingUpdateV1 usersType(UsersTypeEnum usersType) { + + this.usersType = usersType; + return this; + } + + /** + * Type of users to target + * @return usersType + **/ + @javax.annotation.Nullable + + public UsersTypeEnum getUsersType() { + return usersType; + } + + + public void setUsersType(UsersTypeEnum usersType) { + this.usersType = usersType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ProspectingUpdateV1 instance itself + */ + public ProspectingUpdateV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProspectingUpdateV1 prospectingUpdateV1 = (ProspectingUpdateV1) o; + return Objects.equals(this.daysSinceLastVisitMin, prospectingUpdateV1.daysSinceLastVisitMin) && + Objects.equals(this.daysSinceLastVisitMax, prospectingUpdateV1.daysSinceLastVisitMax) && + Objects.equals(this.usersType, prospectingUpdateV1.usersType)&& + Objects.equals(this.additionalProperties, prospectingUpdateV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(daysSinceLastVisitMin, daysSinceLastVisitMax, usersType, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProspectingUpdateV1 {\n"); + sb.append(" daysSinceLastVisitMin: ").append(toIndentedString(daysSinceLastVisitMin)).append("\n"); + sb.append(" daysSinceLastVisitMax: ").append(toIndentedString(daysSinceLastVisitMax)).append("\n"); + sb.append(" usersType: ").append(toIndentedString(usersType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("daysSinceLastVisitMin"); + openapiFields.add("daysSinceLastVisitMax"); + openapiFields.add("usersType"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ProspectingUpdateV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ProspectingUpdateV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProspectingUpdateV1 is not found in the empty JSON string", ProspectingUpdateV1.openapiRequiredFields.toString())); + } + } + // validate the optional field `daysSinceLastVisitMin` + if (jsonObj.get("daysSinceLastVisitMin") != null && !jsonObj.get("daysSinceLastVisitMin").isJsonNull()) { + NillableInt32.validateJsonObject(jsonObj.getAsJsonObject("daysSinceLastVisitMin")); + } + // validate the optional field `daysSinceLastVisitMax` + if (jsonObj.get("daysSinceLastVisitMax") != null && !jsonObj.get("daysSinceLastVisitMax").isJsonNull()) { + NillableInt32.validateJsonObject(jsonObj.getAsJsonObject("daysSinceLastVisitMax")); + } + if ((jsonObj.get("usersType") != null && !jsonObj.get("usersType").isJsonNull()) && !jsonObj.get("usersType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `usersType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("usersType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProspectingUpdateV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProspectingUpdateV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProspectingUpdateV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProspectingUpdateV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ProspectingUpdateV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ProspectingUpdateV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProspectingUpdateV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProspectingUpdateV1 + * @throws IOException if the JSON string is invalid with respect to ProspectingUpdateV1 + */ + public static ProspectingUpdateV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProspectingUpdateV1.class); + } + + /** + * Convert an instance of ProspectingUpdateV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingV1.java new file mode 100644 index 00000000..bc77a234 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ProspectingV1.java @@ -0,0 +1,399 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target prospecting users to website visitors. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ProspectingV1 { + public static final String SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MIN = "daysSinceLastVisitMin"; + @SerializedName(SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MIN) + private Integer daysSinceLastVisitMin; + + public static final String SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MAX = "daysSinceLastVisitMax"; + @SerializedName(SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MAX) + private Integer daysSinceLastVisitMax; + + /** + * Type of users to target + */ + @JsonAdapter(UsersTypeEnum.Adapter.class) + public enum UsersTypeEnum { + UNKNOWN("Unknown"), + + PROSPECTS("Prospects"), + + PROSPECTSORNONBUYERS("ProspectsOrNonBuyers"); + + private String value; + + UsersTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static UsersTypeEnum fromValue(String value) { + for (UsersTypeEnum b : UsersTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final UsersTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public UsersTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return UsersTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_USERS_TYPE = "usersType"; + @SerializedName(SERIALIZED_NAME_USERS_TYPE) + private UsersTypeEnum usersType; + + public ProspectingV1() { + } + + public ProspectingV1 daysSinceLastVisitMin(Integer daysSinceLastVisitMin) { + + this.daysSinceLastVisitMin = daysSinceLastVisitMin; + return this; + } + + /** + * When non buyers are included, include users who visited your website before this number of days + * @return daysSinceLastVisitMin + **/ + @javax.annotation.Nullable + + public Integer getDaysSinceLastVisitMin() { + return daysSinceLastVisitMin; + } + + + public void setDaysSinceLastVisitMin(Integer daysSinceLastVisitMin) { + this.daysSinceLastVisitMin = daysSinceLastVisitMin; + } + + + public ProspectingV1 daysSinceLastVisitMax(Integer daysSinceLastVisitMax) { + + this.daysSinceLastVisitMax = daysSinceLastVisitMax; + return this; + } + + /** + * When non buyers are included, include users who visited your website after this number of days + * @return daysSinceLastVisitMax + **/ + @javax.annotation.Nullable + + public Integer getDaysSinceLastVisitMax() { + return daysSinceLastVisitMax; + } + + + public void setDaysSinceLastVisitMax(Integer daysSinceLastVisitMax) { + this.daysSinceLastVisitMax = daysSinceLastVisitMax; + } + + + public ProspectingV1 usersType(UsersTypeEnum usersType) { + + this.usersType = usersType; + return this; + } + + /** + * Type of users to target + * @return usersType + **/ + @javax.annotation.Nullable + + public UsersTypeEnum getUsersType() { + return usersType; + } + + + public void setUsersType(UsersTypeEnum usersType) { + this.usersType = usersType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ProspectingV1 instance itself + */ + public ProspectingV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProspectingV1 prospectingV1 = (ProspectingV1) o; + return Objects.equals(this.daysSinceLastVisitMin, prospectingV1.daysSinceLastVisitMin) && + Objects.equals(this.daysSinceLastVisitMax, prospectingV1.daysSinceLastVisitMax) && + Objects.equals(this.usersType, prospectingV1.usersType)&& + Objects.equals(this.additionalProperties, prospectingV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(daysSinceLastVisitMin, daysSinceLastVisitMax, usersType, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProspectingV1 {\n"); + sb.append(" daysSinceLastVisitMin: ").append(toIndentedString(daysSinceLastVisitMin)).append("\n"); + sb.append(" daysSinceLastVisitMax: ").append(toIndentedString(daysSinceLastVisitMax)).append("\n"); + sb.append(" usersType: ").append(toIndentedString(usersType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("daysSinceLastVisitMin"); + openapiFields.add("daysSinceLastVisitMax"); + openapiFields.add("usersType"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ProspectingV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ProspectingV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProspectingV1 is not found in the empty JSON string", ProspectingV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("usersType") != null && !jsonObj.get("usersType").isJsonNull()) && !jsonObj.get("usersType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `usersType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("usersType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ProspectingV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProspectingV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProspectingV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ProspectingV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ProspectingV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ProspectingV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ProspectingV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ProspectingV1 + * @throws IOException if the JSON string is invalid with respect to ProspectingV1 + */ + public static ProspectingV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProspectingV1.class); + } + + /** + * Convert an instance of ProspectingV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetBidding.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetBiddingV24Q1.java similarity index 67% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetBidding.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetBiddingV24Q1.java index 9b900746..0041a274 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetBidding.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetBiddingV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,10 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.NillableDecimal; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,85 +42,16 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * ad set bidding read model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadAdSetBidding { +public class ReadAdSetBiddingV24Q1 { public static final String SERIALIZED_NAME_BID_AMOUNT = "bidAmount"; @SerializedName(SERIALIZED_NAME_BID_AMOUNT) - private NillableDecimal bidAmount; - - /** - * The intended optimization for the Ad Set - */ - @JsonAdapter(BidStrategyEnum.Adapter.class) - public enum BidStrategyEnum { - ACTIONS("actions"), - - CLICKS("clicks"), - - CONVERSIONS("conversions"), - - DISPLAYS("displays"), - - INSTALLS("installs"), - - REVENUE("revenue"), - - STORECONVERSIONS("storeConversions"), - - VALUE("value"), - - VIEWEDIMPRESSIONS("viewedImpressions"), - - VISITS("Visits"), - - COMPLETEDVIDEOVIEWS("completedVideoViews"); - - private String value; - - BidStrategyEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static BidStrategyEnum fromValue(String value) { - for (BidStrategyEnum b : BidStrategyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final BidStrategyEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public BidStrategyEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return BidStrategyEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_BID_STRATEGY = "bidStrategy"; - @SerializedName(SERIALIZED_NAME_BID_STRATEGY) - private BidStrategyEnum bidStrategy; + private Double bidAmount; /** * How spend is controlled @@ -142,7 +72,9 @@ public enum CostControllerEnum { CPV("CPV"), - DAILYBUDGET("dailyBudget"); + DAILYBUDGET("dailyBudget"), + + TARGETCPM("targetCPM"); private String value; @@ -186,54 +118,32 @@ public CostControllerEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_COST_CONTROLLER) private CostControllerEnum costController; - public ReadAdSetBidding() { + public ReadAdSetBiddingV24Q1() { } - public ReadAdSetBidding bidAmount(NillableDecimal bidAmount) { + public ReadAdSetBiddingV24Q1 bidAmount(Double bidAmount) { this.bidAmount = bidAmount; return this; } /** - * Get bidAmount + * Decimal value target relating to the `adSetObjective` specified. May be `null` for objectives that do not require a target value. At most 4 decimals are supported. Additional decimals are rounded. * @return bidAmount **/ @javax.annotation.Nullable - public NillableDecimal getBidAmount() { + public Double getBidAmount() { return bidAmount; } - public void setBidAmount(NillableDecimal bidAmount) { + public void setBidAmount(Double bidAmount) { this.bidAmount = bidAmount; } - public ReadAdSetBidding bidStrategy(BidStrategyEnum bidStrategy) { - - this.bidStrategy = bidStrategy; - return this; - } - - /** - * The intended optimization for the Ad Set - * @return bidStrategy - **/ - @javax.annotation.Nullable - - public BidStrategyEnum getBidStrategy() { - return bidStrategy; - } - - - public void setBidStrategy(BidStrategyEnum bidStrategy) { - this.bidStrategy = bidStrategy; - } - - - public ReadAdSetBidding costController(CostControllerEnum costController) { + public ReadAdSetBiddingV24Q1 costController(CostControllerEnum costController) { this.costController = costController; return this; @@ -267,9 +177,9 @@ public void setCostController(CostControllerEnum costController) { * * @param key name of the property * @param value value of the property - * @return the ReadAdSetBidding instance itself + * @return the ReadAdSetBiddingV24Q1 instance itself */ - public ReadAdSetBidding putAdditionalProperty(String key, Object value) { + public ReadAdSetBiddingV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -308,11 +218,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReadAdSetBidding readAdSetBidding = (ReadAdSetBidding) o; - return Objects.equals(this.bidAmount, readAdSetBidding.bidAmount) && - Objects.equals(this.bidStrategy, readAdSetBidding.bidStrategy) && - Objects.equals(this.costController, readAdSetBidding.costController)&& - Objects.equals(this.additionalProperties, readAdSetBidding.additionalProperties); + ReadAdSetBiddingV24Q1 readAdSetBiddingV24Q1 = (ReadAdSetBiddingV24Q1) o; + return Objects.equals(this.bidAmount, readAdSetBiddingV24Q1.bidAmount) && + Objects.equals(this.costController, readAdSetBiddingV24Q1.costController)&& + Objects.equals(this.additionalProperties, readAdSetBiddingV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -321,7 +230,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(bidAmount, bidStrategy, costController, additionalProperties); + return Objects.hash(bidAmount, costController, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -334,9 +243,8 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ReadAdSetBidding {\n"); + sb.append("class ReadAdSetBiddingV24Q1 {\n"); sb.append(" bidAmount: ").append(toIndentedString(bidAmount)).append("\n"); - sb.append(" bidStrategy: ").append(toIndentedString(bidStrategy)).append("\n"); sb.append(" costController: ").append(toIndentedString(costController)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -362,7 +270,6 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("bidAmount"); - openapiFields.add("bidStrategy"); openapiFields.add("costController"); // a set of required properties/fields (JSON key names) @@ -373,21 +280,14 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadAdSetBidding + * @throws IOException if the JSON Object is invalid with respect to ReadAdSetBiddingV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!ReadAdSetBidding.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReadAdSetBidding is not found in the empty JSON string", ReadAdSetBidding.openapiRequiredFields.toString())); + if (!ReadAdSetBiddingV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReadAdSetBiddingV24Q1 is not found in the empty JSON string", ReadAdSetBiddingV24Q1.openapiRequiredFields.toString())); } } - // validate the optional field `bidAmount` - if (jsonObj.get("bidAmount") != null && !jsonObj.get("bidAmount").isJsonNull()) { - NillableDecimal.validateJsonObject(jsonObj.getAsJsonObject("bidAmount")); - } - if ((jsonObj.get("bidStrategy") != null && !jsonObj.get("bidStrategy").isJsonNull()) && !jsonObj.get("bidStrategy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `bidStrategy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bidStrategy").toString())); - } if ((jsonObj.get("costController") != null && !jsonObj.get("costController").isJsonNull()) && !jsonObj.get("costController").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `costController` to be a primitive type in the JSON string but got `%s`", jsonObj.get("costController").toString())); } @@ -397,16 +297,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadAdSetBidding.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadAdSetBidding' and its subtypes + if (!ReadAdSetBiddingV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReadAdSetBiddingV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReadAdSetBidding.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReadAdSetBiddingV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ReadAdSetBidding value) throws IOException { + public void write(JsonWriter out, ReadAdSetBiddingV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -429,11 +329,11 @@ else if (entry.getValue() instanceof Character) } @Override - public ReadAdSetBidding read(JsonReader in) throws IOException { + public ReadAdSetBiddingV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - ReadAdSetBidding instance = thisAdapter.fromJsonTree(jsonObj); + ReadAdSetBiddingV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -460,18 +360,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ReadAdSetBidding given an JSON string + * Create an instance of ReadAdSetBiddingV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of ReadAdSetBidding - * @throws IOException if the JSON string is invalid with respect to ReadAdSetBidding + * @return An instance of ReadAdSetBiddingV24Q1 + * @throws IOException if the JSON string is invalid with respect to ReadAdSetBiddingV24Q1 */ - public static ReadAdSetBidding fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadAdSetBidding.class); + public static ReadAdSetBiddingV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReadAdSetBiddingV24Q1.class); } /** - * Convert an instance of ReadAdSetBidding to an JSON string + * Convert an instance of ReadAdSetBiddingV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetBudget.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetBudgetV24Q1.java similarity index 86% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetBudget.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetBudgetV24Q1.java index ddfb7dc3..55adadab 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetBudget.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetBudgetV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,10 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.NillableDecimal; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +42,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * ad set budget read model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadAdSetBudget { +public class ReadAdSetBudgetV24Q1 { /** * Gets or Sets budgetStrategy */ @@ -112,7 +111,9 @@ public enum BudgetRenewalEnum { MONTHLY("monthly"), - LIFETIME("lifetime"); + LIFETIME("lifetime"), + + WEEKLY("weekly"); private String value; @@ -272,12 +273,12 @@ public BudgetDeliveryWeekEnum read(final JsonReader jsonReader) throws IOExcepti public static final String SERIALIZED_NAME_BUDGET_AMOUNT = "budgetAmount"; @SerializedName(SERIALIZED_NAME_BUDGET_AMOUNT) - private NillableDecimal budgetAmount; + private Double budgetAmount; - public ReadAdSetBudget() { + public ReadAdSetBudgetV24Q1() { } - public ReadAdSetBudget budgetStrategy(BudgetStrategyEnum budgetStrategy) { + public ReadAdSetBudgetV24Q1 budgetStrategy(BudgetStrategyEnum budgetStrategy) { this.budgetStrategy = budgetStrategy; return this; @@ -299,7 +300,7 @@ public void setBudgetStrategy(BudgetStrategyEnum budgetStrategy) { } - public ReadAdSetBudget budgetRenewal(BudgetRenewalEnum budgetRenewal) { + public ReadAdSetBudgetV24Q1 budgetRenewal(BudgetRenewalEnum budgetRenewal) { this.budgetRenewal = budgetRenewal; return this; @@ -321,7 +322,7 @@ public void setBudgetRenewal(BudgetRenewalEnum budgetRenewal) { } - public ReadAdSetBudget budgetDeliverySmoothing(BudgetDeliverySmoothingEnum budgetDeliverySmoothing) { + public ReadAdSetBudgetV24Q1 budgetDeliverySmoothing(BudgetDeliverySmoothingEnum budgetDeliverySmoothing) { this.budgetDeliverySmoothing = budgetDeliverySmoothing; return this; @@ -343,7 +344,7 @@ public void setBudgetDeliverySmoothing(BudgetDeliverySmoothingEnum budgetDeliver } - public ReadAdSetBudget budgetDeliveryWeek(BudgetDeliveryWeekEnum budgetDeliveryWeek) { + public ReadAdSetBudgetV24Q1 budgetDeliveryWeek(BudgetDeliveryWeekEnum budgetDeliveryWeek) { this.budgetDeliveryWeek = budgetDeliveryWeek; return this; @@ -365,7 +366,7 @@ public void setBudgetDeliveryWeek(BudgetDeliveryWeekEnum budgetDeliveryWeek) { } - public ReadAdSetBudget budgetAmount(NillableDecimal budgetAmount) { + public ReadAdSetBudgetV24Q1 budgetAmount(Double budgetAmount) { this.budgetAmount = budgetAmount; return this; @@ -377,12 +378,12 @@ public ReadAdSetBudget budgetAmount(NillableDecimal budgetAmount) { **/ @javax.annotation.Nullable - public NillableDecimal getBudgetAmount() { + public Double getBudgetAmount() { return budgetAmount; } - public void setBudgetAmount(NillableDecimal budgetAmount) { + public void setBudgetAmount(Double budgetAmount) { this.budgetAmount = budgetAmount; } @@ -399,9 +400,9 @@ public void setBudgetAmount(NillableDecimal budgetAmount) { * * @param key name of the property * @param value value of the property - * @return the ReadAdSetBudget instance itself + * @return the ReadAdSetBudgetV24Q1 instance itself */ - public ReadAdSetBudget putAdditionalProperty(String key, Object value) { + public ReadAdSetBudgetV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -440,13 +441,13 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReadAdSetBudget readAdSetBudget = (ReadAdSetBudget) o; - return Objects.equals(this.budgetStrategy, readAdSetBudget.budgetStrategy) && - Objects.equals(this.budgetRenewal, readAdSetBudget.budgetRenewal) && - Objects.equals(this.budgetDeliverySmoothing, readAdSetBudget.budgetDeliverySmoothing) && - Objects.equals(this.budgetDeliveryWeek, readAdSetBudget.budgetDeliveryWeek) && - Objects.equals(this.budgetAmount, readAdSetBudget.budgetAmount)&& - Objects.equals(this.additionalProperties, readAdSetBudget.additionalProperties); + ReadAdSetBudgetV24Q1 readAdSetBudgetV24Q1 = (ReadAdSetBudgetV24Q1) o; + return Objects.equals(this.budgetStrategy, readAdSetBudgetV24Q1.budgetStrategy) && + Objects.equals(this.budgetRenewal, readAdSetBudgetV24Q1.budgetRenewal) && + Objects.equals(this.budgetDeliverySmoothing, readAdSetBudgetV24Q1.budgetDeliverySmoothing) && + Objects.equals(this.budgetDeliveryWeek, readAdSetBudgetV24Q1.budgetDeliveryWeek) && + Objects.equals(this.budgetAmount, readAdSetBudgetV24Q1.budgetAmount)&& + Objects.equals(this.additionalProperties, readAdSetBudgetV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -468,7 +469,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ReadAdSetBudget {\n"); + sb.append("class ReadAdSetBudgetV24Q1 {\n"); sb.append(" budgetStrategy: ").append(toIndentedString(budgetStrategy)).append("\n"); sb.append(" budgetRenewal: ").append(toIndentedString(budgetRenewal)).append("\n"); sb.append(" budgetDeliverySmoothing: ").append(toIndentedString(budgetDeliverySmoothing)).append("\n"); @@ -511,12 +512,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadAdSetBudget + * @throws IOException if the JSON Object is invalid with respect to ReadAdSetBudgetV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!ReadAdSetBudget.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReadAdSetBudget is not found in the empty JSON string", ReadAdSetBudget.openapiRequiredFields.toString())); + if (!ReadAdSetBudgetV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReadAdSetBudgetV24Q1 is not found in the empty JSON string", ReadAdSetBudgetV24Q1.openapiRequiredFields.toString())); } } if ((jsonObj.get("budgetStrategy") != null && !jsonObj.get("budgetStrategy").isJsonNull()) && !jsonObj.get("budgetStrategy").isJsonPrimitive()) { @@ -531,26 +532,22 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("budgetDeliveryWeek") != null && !jsonObj.get("budgetDeliveryWeek").isJsonNull()) && !jsonObj.get("budgetDeliveryWeek").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `budgetDeliveryWeek` to be a primitive type in the JSON string but got `%s`", jsonObj.get("budgetDeliveryWeek").toString())); } - // validate the optional field `budgetAmount` - if (jsonObj.get("budgetAmount") != null && !jsonObj.get("budgetAmount").isJsonNull()) { - NillableDecimal.validateJsonObject(jsonObj.getAsJsonObject("budgetAmount")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadAdSetBudget.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadAdSetBudget' and its subtypes + if (!ReadAdSetBudgetV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReadAdSetBudgetV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReadAdSetBudget.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReadAdSetBudgetV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ReadAdSetBudget value) throws IOException { + public void write(JsonWriter out, ReadAdSetBudgetV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -573,11 +570,11 @@ else if (entry.getValue() instanceof Character) } @Override - public ReadAdSetBudget read(JsonReader in) throws IOException { + public ReadAdSetBudgetV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - ReadAdSetBudget instance = thisAdapter.fromJsonTree(jsonObj); + ReadAdSetBudgetV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -604,18 +601,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ReadAdSetBudget given an JSON string + * Create an instance of ReadAdSetBudgetV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of ReadAdSetBudget - * @throws IOException if the JSON string is invalid with respect to ReadAdSetBudget + * @return An instance of ReadAdSetBudgetV24Q1 + * @throws IOException if the JSON string is invalid with respect to ReadAdSetBudgetV24Q1 */ - public static ReadAdSetBudget fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadAdSetBudget.class); + public static ReadAdSetBudgetV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReadAdSetBudgetV24Q1.class); } /** - * Convert an instance of ReadAdSetBudget to an JSON string + * Convert an instance of ReadAdSetBudgetV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetSchedule.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetScheduleV24Q1.java similarity index 85% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetSchedule.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetScheduleV24Q1.java index c2124be6..325c3a9b 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSetSchedule.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetScheduleV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.NillableDateTime; +import com.criteo.api.marketingsolutions.v2024_07.model.NillableDateTime; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +43,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * ad set schedule read model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadAdSetSchedule { +public class ReadAdSetScheduleV24Q1 { public static final String SERIALIZED_NAME_START_DATE = "startDate"; @SerializedName(SERIALIZED_NAME_START_DATE) private NillableDateTime startDate; @@ -176,10 +176,10 @@ public DeliveryStatusEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_DELIVERY_STATUS) private DeliveryStatusEnum deliveryStatus; - public ReadAdSetSchedule() { + public ReadAdSetScheduleV24Q1() { } - public ReadAdSetSchedule startDate(NillableDateTime startDate) { + public ReadAdSetScheduleV24Q1 startDate(NillableDateTime startDate) { this.startDate = startDate; return this; @@ -201,7 +201,7 @@ public void setStartDate(NillableDateTime startDate) { } - public ReadAdSetSchedule endDate(NillableDateTime endDate) { + public ReadAdSetScheduleV24Q1 endDate(NillableDateTime endDate) { this.endDate = endDate; return this; @@ -223,7 +223,7 @@ public void setEndDate(NillableDateTime endDate) { } - public ReadAdSetSchedule activationStatus(ActivationStatusEnum activationStatus) { + public ReadAdSetScheduleV24Q1 activationStatus(ActivationStatusEnum activationStatus) { this.activationStatus = activationStatus; return this; @@ -245,7 +245,7 @@ public void setActivationStatus(ActivationStatusEnum activationStatus) { } - public ReadAdSetSchedule deliveryStatus(DeliveryStatusEnum deliveryStatus) { + public ReadAdSetScheduleV24Q1 deliveryStatus(DeliveryStatusEnum deliveryStatus) { this.deliveryStatus = deliveryStatus; return this; @@ -279,9 +279,9 @@ public void setDeliveryStatus(DeliveryStatusEnum deliveryStatus) { * * @param key name of the property * @param value value of the property - * @return the ReadAdSetSchedule instance itself + * @return the ReadAdSetScheduleV24Q1 instance itself */ - public ReadAdSetSchedule putAdditionalProperty(String key, Object value) { + public ReadAdSetScheduleV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -320,12 +320,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReadAdSetSchedule readAdSetSchedule = (ReadAdSetSchedule) o; - return Objects.equals(this.startDate, readAdSetSchedule.startDate) && - Objects.equals(this.endDate, readAdSetSchedule.endDate) && - Objects.equals(this.activationStatus, readAdSetSchedule.activationStatus) && - Objects.equals(this.deliveryStatus, readAdSetSchedule.deliveryStatus)&& - Objects.equals(this.additionalProperties, readAdSetSchedule.additionalProperties); + ReadAdSetScheduleV24Q1 readAdSetScheduleV24Q1 = (ReadAdSetScheduleV24Q1) o; + return Objects.equals(this.startDate, readAdSetScheduleV24Q1.startDate) && + Objects.equals(this.endDate, readAdSetScheduleV24Q1.endDate) && + Objects.equals(this.activationStatus, readAdSetScheduleV24Q1.activationStatus) && + Objects.equals(this.deliveryStatus, readAdSetScheduleV24Q1.deliveryStatus)&& + Objects.equals(this.additionalProperties, readAdSetScheduleV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -347,7 +347,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ReadAdSetSchedule {\n"); + sb.append("class ReadAdSetScheduleV24Q1 {\n"); sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); sb.append(" activationStatus: ").append(toIndentedString(activationStatus)).append("\n"); @@ -388,12 +388,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadAdSetSchedule + * @throws IOException if the JSON Object is invalid with respect to ReadAdSetScheduleV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!ReadAdSetSchedule.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReadAdSetSchedule is not found in the empty JSON string", ReadAdSetSchedule.openapiRequiredFields.toString())); + if (!ReadAdSetScheduleV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReadAdSetScheduleV24Q1 is not found in the empty JSON string", ReadAdSetScheduleV24Q1.openapiRequiredFields.toString())); } } // validate the optional field `startDate` @@ -416,16 +416,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadAdSetSchedule.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadAdSetSchedule' and its subtypes + if (!ReadAdSetScheduleV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReadAdSetScheduleV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReadAdSetSchedule.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReadAdSetScheduleV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ReadAdSetSchedule value) throws IOException { + public void write(JsonWriter out, ReadAdSetScheduleV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -448,11 +448,11 @@ else if (entry.getValue() instanceof Character) } @Override - public ReadAdSetSchedule read(JsonReader in) throws IOException { + public ReadAdSetScheduleV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - ReadAdSetSchedule instance = thisAdapter.fromJsonTree(jsonObj); + ReadAdSetScheduleV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -479,18 +479,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ReadAdSetSchedule given an JSON string + * Create an instance of ReadAdSetScheduleV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of ReadAdSetSchedule - * @throws IOException if the JSON string is invalid with respect to ReadAdSetSchedule + * @return An instance of ReadAdSetScheduleV24Q1 + * @throws IOException if the JSON string is invalid with respect to ReadAdSetScheduleV24Q1 */ - public static ReadAdSetSchedule fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadAdSetSchedule.class); + public static ReadAdSetScheduleV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReadAdSetScheduleV24Q1.class); } /** - * Convert an instance of ReadAdSetSchedule to an JSON string + * Convert an instance of ReadAdSetScheduleV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSet.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetV24Q1.java similarity index 66% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSet.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetV24Q1.java index 0167a6fe..1288c349 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadAdSet.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadAdSetV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,14 +11,14 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AdSetTargeting; -import com.criteo.api.marketingsolutions.v2023_04.model.ReadAdSetBidding; -import com.criteo.api.marketingsolutions.v2023_04.model.ReadAdSetBudget; -import com.criteo.api.marketingsolutions.v2023_04.model.ReadAdSetSchedule; +import com.criteo.api.marketingsolutions.v2024_07.model.AdSetTargetingV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.ReadAdSetBiddingV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.ReadAdSetBudgetV24Q1; +import com.criteo.api.marketingsolutions.v2024_07.model.ReadAdSetScheduleV24Q1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,13 +46,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * ad set read model */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadAdSet { +public class ReadAdSetV24Q1 { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -122,21 +122,90 @@ public DestinationEnvironmentEnum read(final JsonReader jsonReader) throws IOExc @SerializedName(SERIALIZED_NAME_DESTINATION_ENVIRONMENT) private DestinationEnvironmentEnum destinationEnvironment; + /** + * Gets or Sets objective + */ + @JsonAdapter(ObjectiveEnum.Adapter.class) + public enum ObjectiveEnum { + CUSTOMACTION("customAction"), + + CLICKS("clicks"), + + CONVERSIONS("conversions"), + + DISPLAYS("displays"), + + APPPROMOTION("appPromotion"), + + REVENUE("revenue"), + + STORECONVERSIONS("storeConversions"), + + VALUE("value"), + + REACH("reach"), + + VISITS("visits"), + + VIDEOVIEWS("videoViews"); + + private String value; + + ObjectiveEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ObjectiveEnum fromValue(String value) { + for (ObjectiveEnum b : ObjectiveEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ObjectiveEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ObjectiveEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ObjectiveEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_OBJECTIVE = "objective"; + @SerializedName(SERIALIZED_NAME_OBJECTIVE) + private ObjectiveEnum objective; + public static final String SERIALIZED_NAME_SCHEDULE = "schedule"; @SerializedName(SERIALIZED_NAME_SCHEDULE) - private ReadAdSetSchedule schedule; + private ReadAdSetScheduleV24Q1 schedule; public static final String SERIALIZED_NAME_BIDDING = "bidding"; @SerializedName(SERIALIZED_NAME_BIDDING) - private ReadAdSetBidding bidding; + private ReadAdSetBiddingV24Q1 bidding; public static final String SERIALIZED_NAME_TARGETING = "targeting"; @SerializedName(SERIALIZED_NAME_TARGETING) - private AdSetTargeting targeting; + private AdSetTargetingV24Q1 targeting; public static final String SERIALIZED_NAME_BUDGET = "budget"; @SerializedName(SERIALIZED_NAME_BUDGET) - private ReadAdSetBudget budget; + private ReadAdSetBudgetV24Q1 budget; /** * Gets or Sets mediaType @@ -189,10 +258,61 @@ public MediaTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_MEDIA_TYPE) private MediaTypeEnum mediaType; - public ReadAdSet() { + /** + * Gets or Sets videoChannel + */ + @JsonAdapter(VideoChannelEnum.Adapter.class) + public enum VideoChannelEnum { + OLV("olv"), + + CTV("ctv"); + + private String value; + + VideoChannelEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VideoChannelEnum fromValue(String value) { + for (VideoChannelEnum b : VideoChannelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VideoChannelEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VideoChannelEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VideoChannelEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_VIDEO_CHANNEL = "videoChannel"; + @SerializedName(SERIALIZED_NAME_VIDEO_CHANNEL) + private VideoChannelEnum videoChannel; + + public ReadAdSetV24Q1() { } - public ReadAdSet name(String name) { + public ReadAdSetV24Q1 name(String name) { this.name = name; return this; @@ -214,7 +334,7 @@ public void setName(String name) { } - public ReadAdSet advertiserId(String advertiserId) { + public ReadAdSetV24Q1 advertiserId(String advertiserId) { this.advertiserId = advertiserId; return this; @@ -236,7 +356,7 @@ public void setAdvertiserId(String advertiserId) { } - public ReadAdSet datasetId(String datasetId) { + public ReadAdSetV24Q1 datasetId(String datasetId) { this.datasetId = datasetId; return this; @@ -258,7 +378,7 @@ public void setDatasetId(String datasetId) { } - public ReadAdSet campaignId(String campaignId) { + public ReadAdSetV24Q1 campaignId(String campaignId) { this.campaignId = campaignId; return this; @@ -280,7 +400,7 @@ public void setCampaignId(String campaignId) { } - public ReadAdSet destinationEnvironment(DestinationEnvironmentEnum destinationEnvironment) { + public ReadAdSetV24Q1 destinationEnvironment(DestinationEnvironmentEnum destinationEnvironment) { this.destinationEnvironment = destinationEnvironment; return this; @@ -302,7 +422,29 @@ public void setDestinationEnvironment(DestinationEnvironmentEnum destinationEnvi } - public ReadAdSet schedule(ReadAdSetSchedule schedule) { + public ReadAdSetV24Q1 objective(ObjectiveEnum objective) { + + this.objective = objective; + return this; + } + + /** + * Get objective + * @return objective + **/ + @javax.annotation.Nullable + + public ObjectiveEnum getObjective() { + return objective; + } + + + public void setObjective(ObjectiveEnum objective) { + this.objective = objective; + } + + + public ReadAdSetV24Q1 schedule(ReadAdSetScheduleV24Q1 schedule) { this.schedule = schedule; return this; @@ -314,17 +456,17 @@ public ReadAdSet schedule(ReadAdSetSchedule schedule) { **/ @javax.annotation.Nullable - public ReadAdSetSchedule getSchedule() { + public ReadAdSetScheduleV24Q1 getSchedule() { return schedule; } - public void setSchedule(ReadAdSetSchedule schedule) { + public void setSchedule(ReadAdSetScheduleV24Q1 schedule) { this.schedule = schedule; } - public ReadAdSet bidding(ReadAdSetBidding bidding) { + public ReadAdSetV24Q1 bidding(ReadAdSetBiddingV24Q1 bidding) { this.bidding = bidding; return this; @@ -336,17 +478,17 @@ public ReadAdSet bidding(ReadAdSetBidding bidding) { **/ @javax.annotation.Nullable - public ReadAdSetBidding getBidding() { + public ReadAdSetBiddingV24Q1 getBidding() { return bidding; } - public void setBidding(ReadAdSetBidding bidding) { + public void setBidding(ReadAdSetBiddingV24Q1 bidding) { this.bidding = bidding; } - public ReadAdSet targeting(AdSetTargeting targeting) { + public ReadAdSetV24Q1 targeting(AdSetTargetingV24Q1 targeting) { this.targeting = targeting; return this; @@ -358,17 +500,17 @@ public ReadAdSet targeting(AdSetTargeting targeting) { **/ @javax.annotation.Nullable - public AdSetTargeting getTargeting() { + public AdSetTargetingV24Q1 getTargeting() { return targeting; } - public void setTargeting(AdSetTargeting targeting) { + public void setTargeting(AdSetTargetingV24Q1 targeting) { this.targeting = targeting; } - public ReadAdSet budget(ReadAdSetBudget budget) { + public ReadAdSetV24Q1 budget(ReadAdSetBudgetV24Q1 budget) { this.budget = budget; return this; @@ -380,17 +522,17 @@ public ReadAdSet budget(ReadAdSetBudget budget) { **/ @javax.annotation.Nullable - public ReadAdSetBudget getBudget() { + public ReadAdSetBudgetV24Q1 getBudget() { return budget; } - public void setBudget(ReadAdSetBudget budget) { + public void setBudget(ReadAdSetBudgetV24Q1 budget) { this.budget = budget; } - public ReadAdSet mediaType(MediaTypeEnum mediaType) { + public ReadAdSetV24Q1 mediaType(MediaTypeEnum mediaType) { this.mediaType = mediaType; return this; @@ -411,6 +553,28 @@ public void setMediaType(MediaTypeEnum mediaType) { this.mediaType = mediaType; } + + public ReadAdSetV24Q1 videoChannel(VideoChannelEnum videoChannel) { + + this.videoChannel = videoChannel; + return this; + } + + /** + * Get videoChannel + * @return videoChannel + **/ + @javax.annotation.Nullable + + public VideoChannelEnum getVideoChannel() { + return videoChannel; + } + + + public void setVideoChannel(VideoChannelEnum videoChannel) { + this.videoChannel = videoChannel; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -424,9 +588,9 @@ public void setMediaType(MediaTypeEnum mediaType) { * * @param key name of the property * @param value value of the property - * @return the ReadAdSet instance itself + * @return the ReadAdSetV24Q1 instance itself */ - public ReadAdSet putAdditionalProperty(String key, Object value) { + public ReadAdSetV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -465,18 +629,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReadAdSet readAdSet = (ReadAdSet) o; - return Objects.equals(this.name, readAdSet.name) && - Objects.equals(this.advertiserId, readAdSet.advertiserId) && - Objects.equals(this.datasetId, readAdSet.datasetId) && - Objects.equals(this.campaignId, readAdSet.campaignId) && - Objects.equals(this.destinationEnvironment, readAdSet.destinationEnvironment) && - Objects.equals(this.schedule, readAdSet.schedule) && - Objects.equals(this.bidding, readAdSet.bidding) && - Objects.equals(this.targeting, readAdSet.targeting) && - Objects.equals(this.budget, readAdSet.budget) && - Objects.equals(this.mediaType, readAdSet.mediaType)&& - Objects.equals(this.additionalProperties, readAdSet.additionalProperties); + ReadAdSetV24Q1 readAdSetV24Q1 = (ReadAdSetV24Q1) o; + return Objects.equals(this.name, readAdSetV24Q1.name) && + Objects.equals(this.advertiserId, readAdSetV24Q1.advertiserId) && + Objects.equals(this.datasetId, readAdSetV24Q1.datasetId) && + Objects.equals(this.campaignId, readAdSetV24Q1.campaignId) && + Objects.equals(this.destinationEnvironment, readAdSetV24Q1.destinationEnvironment) && + Objects.equals(this.objective, readAdSetV24Q1.objective) && + Objects.equals(this.schedule, readAdSetV24Q1.schedule) && + Objects.equals(this.bidding, readAdSetV24Q1.bidding) && + Objects.equals(this.targeting, readAdSetV24Q1.targeting) && + Objects.equals(this.budget, readAdSetV24Q1.budget) && + Objects.equals(this.mediaType, readAdSetV24Q1.mediaType) && + Objects.equals(this.videoChannel, readAdSetV24Q1.videoChannel)&& + Objects.equals(this.additionalProperties, readAdSetV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -485,7 +651,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, advertiserId, datasetId, campaignId, destinationEnvironment, schedule, bidding, targeting, budget, mediaType, additionalProperties); + return Objects.hash(name, advertiserId, datasetId, campaignId, destinationEnvironment, objective, schedule, bidding, targeting, budget, mediaType, videoChannel, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -498,17 +664,19 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ReadAdSet {\n"); + sb.append("class ReadAdSetV24Q1 {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" advertiserId: ").append(toIndentedString(advertiserId)).append("\n"); sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); sb.append(" campaignId: ").append(toIndentedString(campaignId)).append("\n"); sb.append(" destinationEnvironment: ").append(toIndentedString(destinationEnvironment)).append("\n"); + sb.append(" objective: ").append(toIndentedString(objective)).append("\n"); sb.append(" schedule: ").append(toIndentedString(schedule)).append("\n"); sb.append(" bidding: ").append(toIndentedString(bidding)).append("\n"); sb.append(" targeting: ").append(toIndentedString(targeting)).append("\n"); sb.append(" budget: ").append(toIndentedString(budget)).append("\n"); sb.append(" mediaType: ").append(toIndentedString(mediaType)).append("\n"); + sb.append(" videoChannel: ").append(toIndentedString(videoChannel)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -537,11 +705,13 @@ private String toIndentedString(Object o) { openapiFields.add("datasetId"); openapiFields.add("campaignId"); openapiFields.add("destinationEnvironment"); + openapiFields.add("objective"); openapiFields.add("schedule"); openapiFields.add("bidding"); openapiFields.add("targeting"); openapiFields.add("budget"); openapiFields.add("mediaType"); + openapiFields.add("videoChannel"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -551,12 +721,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadAdSet + * @throws IOException if the JSON Object is invalid with respect to ReadAdSetV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!ReadAdSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReadAdSet is not found in the empty JSON string", ReadAdSet.openapiRequiredFields.toString())); + if (!ReadAdSetV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReadAdSetV24Q1 is not found in the empty JSON string", ReadAdSetV24Q1.openapiRequiredFields.toString())); } } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { @@ -574,41 +744,47 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("destinationEnvironment") != null && !jsonObj.get("destinationEnvironment").isJsonNull()) && !jsonObj.get("destinationEnvironment").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `destinationEnvironment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationEnvironment").toString())); } + if ((jsonObj.get("objective") != null && !jsonObj.get("objective").isJsonNull()) && !jsonObj.get("objective").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `objective` to be a primitive type in the JSON string but got `%s`", jsonObj.get("objective").toString())); + } // validate the optional field `schedule` if (jsonObj.get("schedule") != null && !jsonObj.get("schedule").isJsonNull()) { - ReadAdSetSchedule.validateJsonObject(jsonObj.getAsJsonObject("schedule")); + ReadAdSetScheduleV24Q1.validateJsonObject(jsonObj.getAsJsonObject("schedule")); } // validate the optional field `bidding` if (jsonObj.get("bidding") != null && !jsonObj.get("bidding").isJsonNull()) { - ReadAdSetBidding.validateJsonObject(jsonObj.getAsJsonObject("bidding")); + ReadAdSetBiddingV24Q1.validateJsonObject(jsonObj.getAsJsonObject("bidding")); } // validate the optional field `targeting` if (jsonObj.get("targeting") != null && !jsonObj.get("targeting").isJsonNull()) { - AdSetTargeting.validateJsonObject(jsonObj.getAsJsonObject("targeting")); + AdSetTargetingV24Q1.validateJsonObject(jsonObj.getAsJsonObject("targeting")); } // validate the optional field `budget` if (jsonObj.get("budget") != null && !jsonObj.get("budget").isJsonNull()) { - ReadAdSetBudget.validateJsonObject(jsonObj.getAsJsonObject("budget")); + ReadAdSetBudgetV24Q1.validateJsonObject(jsonObj.getAsJsonObject("budget")); } if ((jsonObj.get("mediaType") != null && !jsonObj.get("mediaType").isJsonNull()) && !jsonObj.get("mediaType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `mediaType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaType").toString())); } + if ((jsonObj.get("videoChannel") != null && !jsonObj.get("videoChannel").isJsonNull()) && !jsonObj.get("videoChannel").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `videoChannel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("videoChannel").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadAdSet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadAdSet' and its subtypes + if (!ReadAdSetV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReadAdSetV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReadAdSet.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReadAdSetV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ReadAdSet value) throws IOException { + public void write(JsonWriter out, ReadAdSetV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -631,11 +807,11 @@ else if (entry.getValue() instanceof Character) } @Override - public ReadAdSet read(JsonReader in) throws IOException { + public ReadAdSetV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - ReadAdSet instance = thisAdapter.fromJsonTree(jsonObj); + ReadAdSetV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -662,18 +838,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ReadAdSet given an JSON string + * Create an instance of ReadAdSetV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of ReadAdSet - * @throws IOException if the JSON string is invalid with respect to ReadAdSet + * @return An instance of ReadAdSetV24Q1 + * @throws IOException if the JSON string is invalid with respect to ReadAdSetV24Q1 */ - public static ReadAdSet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadAdSet.class); + public static ReadAdSetV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReadAdSetV24Q1.class); } /** - * Convert an instance of ReadAdSet to an JSON string + * Convert an instance of ReadAdSetV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadModelAdSetId.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelAdSetId.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadModelAdSetId.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelAdSetId.java index 72490ee4..5bfa894b 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadModelAdSetId.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelAdSetId.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * read model data for resources diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelAdSetIdV24Q1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelAdSetIdV24Q1.java new file mode 100644 index 00000000..fd835639 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelAdSetIdV24Q1.java @@ -0,0 +1,345 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * read model data for resources + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ReadModelAdSetIdV24Q1 { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private Object attributes; + + public ReadModelAdSetIdV24Q1() { + } + + + public ReadModelAdSetIdV24Q1( + String id, + String type + ) { + this(); + this.id = id; + this.type = type; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + + + public ReadModelAdSetIdV24Q1 attributes(Object attributes) { + + this.attributes = attributes; + return this; + } + + /** + * ad set id model + * @return attributes + **/ + @javax.annotation.Nullable + + public Object getAttributes() { + return attributes; + } + + + public void setAttributes(Object attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ReadModelAdSetIdV24Q1 instance itself + */ + public ReadModelAdSetIdV24Q1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadModelAdSetIdV24Q1 readModelAdSetIdV24Q1 = (ReadModelAdSetIdV24Q1) o; + return Objects.equals(this.id, readModelAdSetIdV24Q1.id) && + Objects.equals(this.type, readModelAdSetIdV24Q1.type) && + Objects.equals(this.attributes, readModelAdSetIdV24Q1.attributes)&& + Objects.equals(this.additionalProperties, readModelAdSetIdV24Q1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReadModelAdSetIdV24Q1 {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ReadModelAdSetIdV24Q1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ReadModelAdSetIdV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReadModelAdSetIdV24Q1 is not found in the empty JSON string", ReadModelAdSetIdV24Q1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ReadModelAdSetIdV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReadModelAdSetIdV24Q1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReadModelAdSetIdV24Q1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ReadModelAdSetIdV24Q1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ReadModelAdSetIdV24Q1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ReadModelAdSetIdV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ReadModelAdSetIdV24Q1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ReadModelAdSetIdV24Q1 + * @throws IOException if the JSON string is invalid with respect to ReadModelAdSetIdV24Q1 + */ + public static ReadModelAdSetIdV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReadModelAdSetIdV24Q1.class); + } + + /** + * Convert an instance of ReadModelAdSetIdV24Q1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadModelReadAdSet.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelReadAdSetV24Q1.java similarity index 81% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadModelReadAdSet.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelReadAdSetV24Q1.java index 6f7960e4..b42827f0 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReadModelReadAdSet.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ReadModelReadAdSetV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.ReadAdSet; +import com.criteo.api.marketingsolutions.v2024_07.model.ReadAdSetV24Q1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +43,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * read model data for resources */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadModelReadAdSet { +public class ReadModelReadAdSetV24Q1 { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) private String id; @@ -60,13 +60,13 @@ public class ReadModelReadAdSet { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ReadAdSet attributes; + private ReadAdSetV24Q1 attributes; - public ReadModelReadAdSet() { + public ReadModelReadAdSetV24Q1() { } - public ReadModelReadAdSet( + public ReadModelReadAdSetV24Q1( String id, String type ) { @@ -101,7 +101,7 @@ public String getType() { - public ReadModelReadAdSet attributes(ReadAdSet attributes) { + public ReadModelReadAdSetV24Q1 attributes(ReadAdSetV24Q1 attributes) { this.attributes = attributes; return this; @@ -113,12 +113,12 @@ public ReadModelReadAdSet attributes(ReadAdSet attributes) { **/ @javax.annotation.Nullable - public ReadAdSet getAttributes() { + public ReadAdSetV24Q1 getAttributes() { return attributes; } - public void setAttributes(ReadAdSet attributes) { + public void setAttributes(ReadAdSetV24Q1 attributes) { this.attributes = attributes; } @@ -135,9 +135,9 @@ public void setAttributes(ReadAdSet attributes) { * * @param key name of the property * @param value value of the property - * @return the ReadModelReadAdSet instance itself + * @return the ReadModelReadAdSetV24Q1 instance itself */ - public ReadModelReadAdSet putAdditionalProperty(String key, Object value) { + public ReadModelReadAdSetV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -176,11 +176,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReadModelReadAdSet readModelReadAdSet = (ReadModelReadAdSet) o; - return Objects.equals(this.id, readModelReadAdSet.id) && - Objects.equals(this.type, readModelReadAdSet.type) && - Objects.equals(this.attributes, readModelReadAdSet.attributes)&& - Objects.equals(this.additionalProperties, readModelReadAdSet.additionalProperties); + ReadModelReadAdSetV24Q1 readModelReadAdSetV24Q1 = (ReadModelReadAdSetV24Q1) o; + return Objects.equals(this.id, readModelReadAdSetV24Q1.id) && + Objects.equals(this.type, readModelReadAdSetV24Q1.type) && + Objects.equals(this.attributes, readModelReadAdSetV24Q1.attributes)&& + Objects.equals(this.additionalProperties, readModelReadAdSetV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -202,7 +202,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ReadModelReadAdSet {\n"); + sb.append("class ReadModelReadAdSetV24Q1 {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); @@ -241,12 +241,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReadModelReadAdSet + * @throws IOException if the JSON Object is invalid with respect to ReadModelReadAdSetV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!ReadModelReadAdSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReadModelReadAdSet is not found in the empty JSON string", ReadModelReadAdSet.openapiRequiredFields.toString())); + if (!ReadModelReadAdSetV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ReadModelReadAdSetV24Q1 is not found in the empty JSON string", ReadModelReadAdSetV24Q1.openapiRequiredFields.toString())); } } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -257,7 +257,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `attributes` if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - ReadAdSet.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + ReadAdSetV24Q1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); } } @@ -265,16 +265,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReadModelReadAdSet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReadModelReadAdSet' and its subtypes + if (!ReadModelReadAdSetV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ReadModelReadAdSetV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReadModelReadAdSet.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ReadModelReadAdSetV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ReadModelReadAdSet value) throws IOException { + public void write(JsonWriter out, ReadModelReadAdSetV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -297,11 +297,11 @@ else if (entry.getValue() instanceof Character) } @Override - public ReadModelReadAdSet read(JsonReader in) throws IOException { + public ReadModelReadAdSetV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - ReadModelReadAdSet instance = thisAdapter.fromJsonTree(jsonObj); + ReadModelReadAdSetV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -328,18 +328,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ReadModelReadAdSet given an JSON string + * Create an instance of ReadModelReadAdSetV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of ReadModelReadAdSet - * @throws IOException if the JSON string is invalid with respect to ReadModelReadAdSet + * @return An instance of ReadModelReadAdSetV24Q1 + * @throws IOException if the JSON string is invalid with respect to ReadModelReadAdSetV24Q1 */ - public static ReadModelReadAdSet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReadModelReadAdSet.class); + public static ReadModelReadAdSetV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ReadModelReadAdSetV24Q1.class); } /** - * Convert an instance of ReadModelReadAdSet to an JSON string + * Convert an instance of ReadModelReadAdSetV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestsAdSetId.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RequestsAdSetId.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestsAdSetId.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RequestsAdSetId.java index 43ef7f36..ca38e048 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestsAdSetId.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RequestsAdSetId.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.WriteModelAdSetId; +import com.criteo.api.marketingsolutions.v2024_07.model.WriteModelAdSetId; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * List of input resources diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestsPatchAdSet.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RequestsPatchAdSetV24Q1.java similarity index 80% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestsPatchAdSet.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RequestsPatchAdSetV24Q1.java index 2e231760..e51301ba 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/RequestsPatchAdSet.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RequestsPatchAdSetV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.WriteModelPatchAdSet; +import com.criteo.api.marketingsolutions.v2024_07.model.WriteModelPatchAdSetV24Q1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,27 +45,27 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * List of input resources */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RequestsPatchAdSet { +public class RequestsPatchAdSetV24Q1 { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = null; + private List data = null; - public RequestsPatchAdSet() { + public RequestsPatchAdSetV24Q1() { } - public RequestsPatchAdSet data(List data) { + public RequestsPatchAdSetV24Q1 data(List data) { this.data = data; return this; } - public RequestsPatchAdSet addDataItem(WriteModelPatchAdSet dataItem) { + public RequestsPatchAdSetV24Q1 addDataItem(WriteModelPatchAdSetV24Q1 dataItem) { if (this.data == null) { this.data = null; } @@ -79,12 +79,12 @@ public RequestsPatchAdSet addDataItem(WriteModelPatchAdSet dataItem) { **/ @javax.annotation.Nullable - public List getData() { + public List getData() { return data; } - public void setData(List data) { + public void setData(List data) { this.data = data; } @@ -101,9 +101,9 @@ public void setData(List data) { * * @param key name of the property * @param value value of the property - * @return the RequestsPatchAdSet instance itself + * @return the RequestsPatchAdSetV24Q1 instance itself */ - public RequestsPatchAdSet putAdditionalProperty(String key, Object value) { + public RequestsPatchAdSetV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -142,9 +142,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RequestsPatchAdSet requestsPatchAdSet = (RequestsPatchAdSet) o; - return Objects.equals(this.data, requestsPatchAdSet.data)&& - Objects.equals(this.additionalProperties, requestsPatchAdSet.additionalProperties); + RequestsPatchAdSetV24Q1 requestsPatchAdSetV24Q1 = (RequestsPatchAdSetV24Q1) o; + return Objects.equals(this.data, requestsPatchAdSetV24Q1.data)&& + Objects.equals(this.additionalProperties, requestsPatchAdSetV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -166,7 +166,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class RequestsPatchAdSet {\n"); + sb.append("class RequestsPatchAdSetV24Q1 {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -201,12 +201,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RequestsPatchAdSet + * @throws IOException if the JSON Object is invalid with respect to RequestsPatchAdSetV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!RequestsPatchAdSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RequestsPatchAdSet is not found in the empty JSON string", RequestsPatchAdSet.openapiRequiredFields.toString())); + if (!RequestsPatchAdSetV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RequestsPatchAdSetV24Q1 is not found in the empty JSON string", RequestsPatchAdSetV24Q1.openapiRequiredFields.toString())); } } if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { @@ -219,7 +219,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `data` (array) for (int i = 0; i < jsonArraydata.size(); i++) { - WriteModelPatchAdSet.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + WriteModelPatchAdSetV24Q1.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); }; } } @@ -229,16 +229,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!RequestsPatchAdSet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RequestsPatchAdSet' and its subtypes + if (!RequestsPatchAdSetV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RequestsPatchAdSetV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RequestsPatchAdSet.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RequestsPatchAdSetV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, RequestsPatchAdSet value) throws IOException { + public void write(JsonWriter out, RequestsPatchAdSetV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -261,11 +261,11 @@ else if (entry.getValue() instanceof Character) } @Override - public RequestsPatchAdSet read(JsonReader in) throws IOException { + public RequestsPatchAdSetV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - RequestsPatchAdSet instance = thisAdapter.fromJsonTree(jsonObj); + RequestsPatchAdSetV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -292,18 +292,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of RequestsPatchAdSet given an JSON string + * Create an instance of RequestsPatchAdSetV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of RequestsPatchAdSet - * @throws IOException if the JSON string is invalid with respect to RequestsPatchAdSet + * @return An instance of RequestsPatchAdSetV24Q1 + * @throws IOException if the JSON string is invalid with respect to RequestsPatchAdSetV24Q1 */ - public static RequestsPatchAdSet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RequestsPatchAdSet.class); + public static RequestsPatchAdSetV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RequestsPatchAdSetV24Q1.class); } /** - * Convert an instance of RequestsPatchAdSet to an JSON string + * Convert an instance of RequestsPatchAdSetV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponseReadAdSet.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponseReadAdSetV24Q1.java similarity index 82% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponseReadAdSet.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponseReadAdSetV24Q1.java index 01809c80..9e74bffd 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponseReadAdSet.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponseReadAdSetV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.CommonProblem; -import com.criteo.api.marketingsolutions.v2023_04.model.ReadModelReadAdSet; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.ReadModelReadAdSetV24Q1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,16 +46,16 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * output resource */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ResponseReadAdSet { +public class ResponseReadAdSetV24Q1 { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private ReadModelReadAdSet data; + private ReadModelReadAdSetV24Q1 data; public static final String SERIALIZED_NAME_WARNINGS = "warnings"; @SerializedName(SERIALIZED_NAME_WARNINGS) @@ -65,11 +65,11 @@ public class ResponseReadAdSet { @SerializedName(SERIALIZED_NAME_ERRORS) private List errors = null; - public ResponseReadAdSet() { + public ResponseReadAdSetV24Q1() { } - public ResponseReadAdSet( + public ResponseReadAdSetV24Q1( List warnings, List errors ) { @@ -78,7 +78,7 @@ public ResponseReadAdSet( this.errors = errors; } - public ResponseReadAdSet data(ReadModelReadAdSet data) { + public ResponseReadAdSetV24Q1 data(ReadModelReadAdSetV24Q1 data) { this.data = data; return this; @@ -90,12 +90,12 @@ public ResponseReadAdSet data(ReadModelReadAdSet data) { **/ @javax.annotation.Nullable - public ReadModelReadAdSet getData() { + public ReadModelReadAdSetV24Q1 getData() { return data; } - public void setData(ReadModelReadAdSet data) { + public void setData(ReadModelReadAdSetV24Q1 data) { this.data = data; } @@ -138,9 +138,9 @@ public List getErrors() { * * @param key name of the property * @param value value of the property - * @return the ResponseReadAdSet instance itself + * @return the ResponseReadAdSetV24Q1 instance itself */ - public ResponseReadAdSet putAdditionalProperty(String key, Object value) { + public ResponseReadAdSetV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -179,11 +179,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ResponseReadAdSet responseReadAdSet = (ResponseReadAdSet) o; - return Objects.equals(this.data, responseReadAdSet.data) && - Objects.equals(this.warnings, responseReadAdSet.warnings) && - Objects.equals(this.errors, responseReadAdSet.errors)&& - Objects.equals(this.additionalProperties, responseReadAdSet.additionalProperties); + ResponseReadAdSetV24Q1 responseReadAdSetV24Q1 = (ResponseReadAdSetV24Q1) o; + return Objects.equals(this.data, responseReadAdSetV24Q1.data) && + Objects.equals(this.warnings, responseReadAdSetV24Q1.warnings) && + Objects.equals(this.errors, responseReadAdSetV24Q1.errors)&& + Objects.equals(this.additionalProperties, responseReadAdSetV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -205,7 +205,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ResponseReadAdSet {\n"); + sb.append("class ResponseReadAdSetV24Q1 {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); @@ -244,17 +244,17 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ResponseReadAdSet + * @throws IOException if the JSON Object is invalid with respect to ResponseReadAdSetV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!ResponseReadAdSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseReadAdSet is not found in the empty JSON string", ResponseReadAdSet.openapiRequiredFields.toString())); + if (!ResponseReadAdSetV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponseReadAdSetV24Q1 is not found in the empty JSON string", ResponseReadAdSetV24Q1.openapiRequiredFields.toString())); } } // validate the optional field `data` if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - ReadModelReadAdSet.validateJsonObject(jsonObj.getAsJsonObject("data")); + ReadModelReadAdSetV24Q1.validateJsonObject(jsonObj.getAsJsonObject("data")); } if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); @@ -290,16 +290,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponseReadAdSet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponseReadAdSet' and its subtypes + if (!ResponseReadAdSetV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponseReadAdSetV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ResponseReadAdSet.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponseReadAdSetV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ResponseReadAdSet value) throws IOException { + public void write(JsonWriter out, ResponseReadAdSetV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -322,11 +322,11 @@ else if (entry.getValue() instanceof Character) } @Override - public ResponseReadAdSet read(JsonReader in) throws IOException { + public ResponseReadAdSetV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - ResponseReadAdSet instance = thisAdapter.fromJsonTree(jsonObj); + ResponseReadAdSetV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -353,18 +353,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ResponseReadAdSet given an JSON string + * Create an instance of ResponseReadAdSetV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of ResponseReadAdSet - * @throws IOException if the JSON string is invalid with respect to ResponseReadAdSet + * @return An instance of ResponseReadAdSetV24Q1 + * @throws IOException if the JSON string is invalid with respect to ResponseReadAdSetV24Q1 */ - public static ResponseReadAdSet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponseReadAdSet.class); + public static ResponseReadAdSetV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponseReadAdSetV24Q1.class); } /** - * Convert an instance of ResponseReadAdSet to an JSON string + * Convert an instance of ResponseReadAdSetV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponsesAdSetId.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesAdSetId.java similarity index 97% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponsesAdSetId.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesAdSetId.java index a51885c1..13bf118f 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponsesAdSetId.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesAdSetId.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.CommonProblem; -import com.criteo.api.marketingsolutions.v2023_04.model.ReadModelAdSetId; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.ReadModelAdSetId; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * List of output resources diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesAdSetIdV24Q1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesAdSetIdV24Q1.java new file mode 100644 index 00000000..d79f5c7a --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesAdSetIdV24Q1.java @@ -0,0 +1,378 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.ReadModelAdSetIdV24Q1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * List of output resources + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResponsesAdSetIdV24Q1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public ResponsesAdSetIdV24Q1() { + } + + + public ResponsesAdSetIdV24Q1( + List data, + List warnings, + List errors + ) { + this(); + this.data = data; + this.warnings = warnings; + this.errors = errors; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResponsesAdSetIdV24Q1 instance itself + */ + public ResponsesAdSetIdV24Q1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResponsesAdSetIdV24Q1 responsesAdSetIdV24Q1 = (ResponsesAdSetIdV24Q1) o; + return Objects.equals(this.data, responsesAdSetIdV24Q1.data) && + Objects.equals(this.warnings, responsesAdSetIdV24Q1.warnings) && + Objects.equals(this.errors, responsesAdSetIdV24Q1.errors)&& + Objects.equals(this.additionalProperties, responsesAdSetIdV24Q1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResponsesAdSetIdV24Q1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ResponsesAdSetIdV24Q1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ResponsesAdSetIdV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponsesAdSetIdV24Q1 is not found in the empty JSON string", ResponsesAdSetIdV24Q1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ReadModelAdSetIdV24Q1.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResponsesAdSetIdV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponsesAdSetIdV24Q1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponsesAdSetIdV24Q1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResponsesAdSetIdV24Q1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResponsesAdSetIdV24Q1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ResponsesAdSetIdV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResponsesAdSetIdV24Q1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResponsesAdSetIdV24Q1 + * @throws IOException if the JSON string is invalid with respect to ResponsesAdSetIdV24Q1 + */ + public static ResponsesAdSetIdV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponsesAdSetIdV24Q1.class); + } + + /** + * Convert an instance of ResponsesAdSetIdV24Q1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponsesReadAdSet.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesReadAdSetV24Q1.java similarity index 83% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponsesReadAdSet.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesReadAdSetV24Q1.java index 1fefb56d..4bd83629 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ResponsesReadAdSet.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/ResponsesReadAdSetV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.CommonProblem; -import com.criteo.api.marketingsolutions.v2023_04.model.ReadModelReadAdSet; +import com.criteo.api.marketingsolutions.v2024_07.model.CommonProblem; +import com.criteo.api.marketingsolutions.v2024_07.model.ReadModelReadAdSetV24Q1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,16 +46,16 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * List of output resources */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ResponsesReadAdSet { +public class ResponsesReadAdSetV24Q1 { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = null; + private List data = null; public static final String SERIALIZED_NAME_WARNINGS = "warnings"; @SerializedName(SERIALIZED_NAME_WARNINGS) @@ -65,12 +65,12 @@ public class ResponsesReadAdSet { @SerializedName(SERIALIZED_NAME_ERRORS) private List errors = null; - public ResponsesReadAdSet() { + public ResponsesReadAdSetV24Q1() { } - public ResponsesReadAdSet( - List data, + public ResponsesReadAdSetV24Q1( + List data, List warnings, List errors ) { @@ -86,7 +86,7 @@ public ResponsesReadAdSet( **/ @javax.annotation.Nullable - public List getData() { + public List getData() { return data; } @@ -131,9 +131,9 @@ public List getErrors() { * * @param key name of the property * @param value value of the property - * @return the ResponsesReadAdSet instance itself + * @return the ResponsesReadAdSetV24Q1 instance itself */ - public ResponsesReadAdSet putAdditionalProperty(String key, Object value) { + public ResponsesReadAdSetV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -172,11 +172,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ResponsesReadAdSet responsesReadAdSet = (ResponsesReadAdSet) o; - return Objects.equals(this.data, responsesReadAdSet.data) && - Objects.equals(this.warnings, responsesReadAdSet.warnings) && - Objects.equals(this.errors, responsesReadAdSet.errors)&& - Objects.equals(this.additionalProperties, responsesReadAdSet.additionalProperties); + ResponsesReadAdSetV24Q1 responsesReadAdSetV24Q1 = (ResponsesReadAdSetV24Q1) o; + return Objects.equals(this.data, responsesReadAdSetV24Q1.data) && + Objects.equals(this.warnings, responsesReadAdSetV24Q1.warnings) && + Objects.equals(this.errors, responsesReadAdSetV24Q1.errors)&& + Objects.equals(this.additionalProperties, responsesReadAdSetV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -198,7 +198,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ResponsesReadAdSet {\n"); + sb.append("class ResponsesReadAdSetV24Q1 {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); @@ -237,12 +237,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ResponsesReadAdSet + * @throws IOException if the JSON Object is invalid with respect to ResponsesReadAdSetV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!ResponsesReadAdSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ResponsesReadAdSet is not found in the empty JSON string", ResponsesReadAdSet.openapiRequiredFields.toString())); + if (!ResponsesReadAdSetV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResponsesReadAdSetV24Q1 is not found in the empty JSON string", ResponsesReadAdSetV24Q1.openapiRequiredFields.toString())); } } if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { @@ -255,7 +255,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `data` (array) for (int i = 0; i < jsonArraydata.size(); i++) { - ReadModelReadAdSet.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + ReadModelReadAdSetV24Q1.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); }; } } @@ -293,16 +293,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResponsesReadAdSet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResponsesReadAdSet' and its subtypes + if (!ResponsesReadAdSetV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResponsesReadAdSetV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ResponsesReadAdSet.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResponsesReadAdSetV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ResponsesReadAdSet value) throws IOException { + public void write(JsonWriter out, ResponsesReadAdSetV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -325,11 +325,11 @@ else if (entry.getValue() instanceof Character) } @Override - public ResponsesReadAdSet read(JsonReader in) throws IOException { + public ResponsesReadAdSetV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - ResponsesReadAdSet instance = thisAdapter.fromJsonTree(jsonObj); + ResponsesReadAdSetV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -356,18 +356,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ResponsesReadAdSet given an JSON string + * Create an instance of ResponsesReadAdSetV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of ResponsesReadAdSet - * @throws IOException if the JSON string is invalid with respect to ResponsesReadAdSet + * @return An instance of ResponsesReadAdSetV24Q1 + * @throws IOException if the JSON string is invalid with respect to ResponsesReadAdSetV24Q1 */ - public static ResponsesReadAdSet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResponsesReadAdSet.class); + public static ResponsesReadAdSetV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResponsesReadAdSetV24Q1.class); } /** - * Convert an instance of ResponsesReadAdSet to an JSON string + * Convert an instance of ResponsesReadAdSetV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceResponse.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingCreateV1.java similarity index 57% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceResponse.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingCreateV1.java index 967b4761..669c7060 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/NewAudienceResponse.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingCreateV1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,21 +11,16 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceError; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceWarning; -import com.criteo.api.marketingsolutions.v2023_04.model.BasicAudienceDefinition; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -46,101 +41,140 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** - * Response of a newly created audience + * Settings to target users based on its type and days since last visit. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NewAudienceResponse { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - private BasicAudienceDefinition data; +public class RetargetingCreateV1 { + /** + * Types of visitors. + */ + @JsonAdapter(VisitorsTypeEnum.Adapter.class) + public enum VisitorsTypeEnum { + ALL("All"), + + BUYERS("Buyers"), + + NONBUYERS("NonBuyers"); - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - private List errors = new ArrayList<>(); + private String value; + + VisitorsTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } - public static final String SERIALIZED_NAME_WARNINGS = "warnings"; - @SerializedName(SERIALIZED_NAME_WARNINGS) - private List warnings = new ArrayList<>(); + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisitorsTypeEnum fromValue(String value) { + for (VisitorsTypeEnum b : VisitorsTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisitorsTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - public NewAudienceResponse() { + @Override + public VisitorsTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisitorsTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_VISITORS_TYPE = "visitorsType"; + @SerializedName(SERIALIZED_NAME_VISITORS_TYPE) + private VisitorsTypeEnum visitorsType; + + public static final String SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MIN = "daysSinceLastVisitMin"; + @SerializedName(SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MIN) + private Integer daysSinceLastVisitMin; + + public static final String SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MAX = "daysSinceLastVisitMax"; + @SerializedName(SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MAX) + private Integer daysSinceLastVisitMax; + + public RetargetingCreateV1() { } - public NewAudienceResponse data(BasicAudienceDefinition data) { + public RetargetingCreateV1 visitorsType(VisitorsTypeEnum visitorsType) { - this.data = data; + this.visitorsType = visitorsType; return this; } /** - * Get data - * @return data + * Types of visitors. + * @return visitorsType **/ @javax.annotation.Nonnull - public BasicAudienceDefinition getData() { - return data; + public VisitorsTypeEnum getVisitorsType() { + return visitorsType; } - public void setData(BasicAudienceDefinition data) { - this.data = data; + public void setVisitorsType(VisitorsTypeEnum visitorsType) { + this.visitorsType = visitorsType; } - public NewAudienceResponse errors(List errors) { + public RetargetingCreateV1 daysSinceLastVisitMin(Integer daysSinceLastVisitMin) { - this.errors = errors; - return this; - } - - public NewAudienceResponse addErrorsItem(AudienceError errorsItem) { - this.errors.add(errorsItem); + this.daysSinceLastVisitMin = daysSinceLastVisitMin; return this; } /** - * Get errors - * @return errors + * Minimum number of days since last visit to partner. + * @return daysSinceLastVisitMin **/ @javax.annotation.Nonnull - public List getErrors() { - return errors; + public Integer getDaysSinceLastVisitMin() { + return daysSinceLastVisitMin; } - public void setErrors(List errors) { - this.errors = errors; + public void setDaysSinceLastVisitMin(Integer daysSinceLastVisitMin) { + this.daysSinceLastVisitMin = daysSinceLastVisitMin; } - public NewAudienceResponse warnings(List warnings) { + public RetargetingCreateV1 daysSinceLastVisitMax(Integer daysSinceLastVisitMax) { - this.warnings = warnings; - return this; - } - - public NewAudienceResponse addWarningsItem(AudienceWarning warningsItem) { - this.warnings.add(warningsItem); + this.daysSinceLastVisitMax = daysSinceLastVisitMax; return this; } /** - * Get warnings - * @return warnings + * Maximum number of days since last visit to partner. + * @return daysSinceLastVisitMax **/ @javax.annotation.Nonnull - public List getWarnings() { - return warnings; + public Integer getDaysSinceLastVisitMax() { + return daysSinceLastVisitMax; } - public void setWarnings(List warnings) { - this.warnings = warnings; + public void setDaysSinceLastVisitMax(Integer daysSinceLastVisitMax) { + this.daysSinceLastVisitMax = daysSinceLastVisitMax; } /** @@ -156,9 +190,9 @@ public void setWarnings(List warnings) { * * @param key name of the property * @param value value of the property - * @return the NewAudienceResponse instance itself + * @return the RetargetingCreateV1 instance itself */ - public NewAudienceResponse putAdditionalProperty(String key, Object value) { + public RetargetingCreateV1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -197,25 +231,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NewAudienceResponse newAudienceResponse = (NewAudienceResponse) o; - return Objects.equals(this.data, newAudienceResponse.data) && - Objects.equals(this.errors, newAudienceResponse.errors) && - Objects.equals(this.warnings, newAudienceResponse.warnings)&& - Objects.equals(this.additionalProperties, newAudienceResponse.additionalProperties); + RetargetingCreateV1 retargetingCreateV1 = (RetargetingCreateV1) o; + return Objects.equals(this.visitorsType, retargetingCreateV1.visitorsType) && + Objects.equals(this.daysSinceLastVisitMin, retargetingCreateV1.daysSinceLastVisitMin) && + Objects.equals(this.daysSinceLastVisitMax, retargetingCreateV1.daysSinceLastVisitMax)&& + Objects.equals(this.additionalProperties, retargetingCreateV1.additionalProperties); } @Override public int hashCode() { - return Objects.hash(data, errors, warnings, additionalProperties); + return Objects.hash(visitorsType, daysSinceLastVisitMin, daysSinceLastVisitMax, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NewAudienceResponse {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append("class RetargetingCreateV1 {\n"); + sb.append(" visitorsType: ").append(toIndentedString(visitorsType)).append("\n"); + sb.append(" daysSinceLastVisitMin: ").append(toIndentedString(daysSinceLastVisitMin)).append("\n"); + sb.append(" daysSinceLastVisitMax: ").append(toIndentedString(daysSinceLastVisitMax)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -239,74 +273,55 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("data"); - openapiFields.add("errors"); - openapiFields.add("warnings"); + openapiFields.add("visitorsType"); + openapiFields.add("daysSinceLastVisitMin"); + openapiFields.add("daysSinceLastVisitMax"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); - openapiRequiredFields.add("errors"); - openapiRequiredFields.add("warnings"); + openapiRequiredFields.add("visitorsType"); + openapiRequiredFields.add("daysSinceLastVisitMin"); + openapiRequiredFields.add("daysSinceLastVisitMax"); } /** * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to NewAudienceResponse + * @throws IOException if the JSON Object is invalid with respect to RetargetingCreateV1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!NewAudienceResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NewAudienceResponse is not found in the empty JSON string", NewAudienceResponse.openapiRequiredFields.toString())); + if (!RetargetingCreateV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RetargetingCreateV1 is not found in the empty JSON string", RetargetingCreateV1.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : NewAudienceResponse.openapiRequiredFields) { + for (String requiredField : RetargetingCreateV1.openapiRequiredFields) { if (jsonObj.get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - // validate the required field `data` - BasicAudienceDefinition.validateJsonObject(jsonObj.getAsJsonObject("data")); - // ensure the json data is an array - if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - - JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); - // validate the required field `errors` (array) - for (int i = 0; i < jsonArrayerrors.size(); i++) { - AudienceError.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); - }; - // ensure the json data is an array - if (!jsonObj.get("warnings").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + if (!jsonObj.get("visitorsType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visitorsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visitorsType").toString())); } - - JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); - // validate the required field `warnings` (array) - for (int i = 0; i < jsonArraywarnings.size(); i++) { - AudienceWarning.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!NewAudienceResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NewAudienceResponse' and its subtypes + if (!RetargetingCreateV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RetargetingCreateV1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NewAudienceResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RetargetingCreateV1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, NewAudienceResponse value) throws IOException { + public void write(JsonWriter out, RetargetingCreateV1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -329,11 +344,11 @@ else if (entry.getValue() instanceof Character) } @Override - public NewAudienceResponse read(JsonReader in) throws IOException { + public RetargetingCreateV1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - NewAudienceResponse instance = thisAdapter.fromJsonTree(jsonObj); + RetargetingCreateV1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -360,18 +375,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of NewAudienceResponse given an JSON string + * Create an instance of RetargetingCreateV1 given an JSON string * * @param jsonString JSON string - * @return An instance of NewAudienceResponse - * @throws IOException if the JSON string is invalid with respect to NewAudienceResponse + * @return An instance of RetargetingCreateV1 + * @throws IOException if the JSON string is invalid with respect to RetargetingCreateV1 */ - public static NewAudienceResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NewAudienceResponse.class); + public static RetargetingCreateV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RetargetingCreateV1.class); } /** - * Convert an instance of NewAudienceResponse to an JSON string + * Convert an instance of RetargetingCreateV1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingUpdateV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingUpdateV1.java new file mode 100644 index 00000000..ad0d9883 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingUpdateV1.java @@ -0,0 +1,399 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target users based on its type and days since last visit. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RetargetingUpdateV1 { + /** + * Types of visitors. + */ + @JsonAdapter(VisitorsTypeEnum.Adapter.class) + public enum VisitorsTypeEnum { + ALL("All"), + + BUYERS("Buyers"), + + NONBUYERS("NonBuyers"); + + private String value; + + VisitorsTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisitorsTypeEnum fromValue(String value) { + for (VisitorsTypeEnum b : VisitorsTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisitorsTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisitorsTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisitorsTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_VISITORS_TYPE = "visitorsType"; + @SerializedName(SERIALIZED_NAME_VISITORS_TYPE) + private VisitorsTypeEnum visitorsType; + + public static final String SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MIN = "daysSinceLastVisitMin"; + @SerializedName(SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MIN) + private Integer daysSinceLastVisitMin; + + public static final String SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MAX = "daysSinceLastVisitMax"; + @SerializedName(SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MAX) + private Integer daysSinceLastVisitMax; + + public RetargetingUpdateV1() { + } + + public RetargetingUpdateV1 visitorsType(VisitorsTypeEnum visitorsType) { + + this.visitorsType = visitorsType; + return this; + } + + /** + * Types of visitors. + * @return visitorsType + **/ + @javax.annotation.Nullable + + public VisitorsTypeEnum getVisitorsType() { + return visitorsType; + } + + + public void setVisitorsType(VisitorsTypeEnum visitorsType) { + this.visitorsType = visitorsType; + } + + + public RetargetingUpdateV1 daysSinceLastVisitMin(Integer daysSinceLastVisitMin) { + + this.daysSinceLastVisitMin = daysSinceLastVisitMin; + return this; + } + + /** + * Minimum number of days since last visit to partner. + * @return daysSinceLastVisitMin + **/ + @javax.annotation.Nullable + + public Integer getDaysSinceLastVisitMin() { + return daysSinceLastVisitMin; + } + + + public void setDaysSinceLastVisitMin(Integer daysSinceLastVisitMin) { + this.daysSinceLastVisitMin = daysSinceLastVisitMin; + } + + + public RetargetingUpdateV1 daysSinceLastVisitMax(Integer daysSinceLastVisitMax) { + + this.daysSinceLastVisitMax = daysSinceLastVisitMax; + return this; + } + + /** + * Maximum number of days since last visit to partner. + * @return daysSinceLastVisitMax + **/ + @javax.annotation.Nullable + + public Integer getDaysSinceLastVisitMax() { + return daysSinceLastVisitMax; + } + + + public void setDaysSinceLastVisitMax(Integer daysSinceLastVisitMax) { + this.daysSinceLastVisitMax = daysSinceLastVisitMax; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RetargetingUpdateV1 instance itself + */ + public RetargetingUpdateV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RetargetingUpdateV1 retargetingUpdateV1 = (RetargetingUpdateV1) o; + return Objects.equals(this.visitorsType, retargetingUpdateV1.visitorsType) && + Objects.equals(this.daysSinceLastVisitMin, retargetingUpdateV1.daysSinceLastVisitMin) && + Objects.equals(this.daysSinceLastVisitMax, retargetingUpdateV1.daysSinceLastVisitMax)&& + Objects.equals(this.additionalProperties, retargetingUpdateV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(visitorsType, daysSinceLastVisitMin, daysSinceLastVisitMax, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RetargetingUpdateV1 {\n"); + sb.append(" visitorsType: ").append(toIndentedString(visitorsType)).append("\n"); + sb.append(" daysSinceLastVisitMin: ").append(toIndentedString(daysSinceLastVisitMin)).append("\n"); + sb.append(" daysSinceLastVisitMax: ").append(toIndentedString(daysSinceLastVisitMax)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visitorsType"); + openapiFields.add("daysSinceLastVisitMin"); + openapiFields.add("daysSinceLastVisitMax"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RetargetingUpdateV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RetargetingUpdateV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RetargetingUpdateV1 is not found in the empty JSON string", RetargetingUpdateV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("visitorsType") != null && !jsonObj.get("visitorsType").isJsonNull()) && !jsonObj.get("visitorsType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visitorsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visitorsType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RetargetingUpdateV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RetargetingUpdateV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RetargetingUpdateV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RetargetingUpdateV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RetargetingUpdateV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RetargetingUpdateV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RetargetingUpdateV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RetargetingUpdateV1 + * @throws IOException if the JSON string is invalid with respect to RetargetingUpdateV1 + */ + public static RetargetingUpdateV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RetargetingUpdateV1.class); + } + + /** + * Convert an instance of RetargetingUpdateV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingV1.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingV1.java new file mode 100644 index 00000000..0014f4a0 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/RetargetingV1.java @@ -0,0 +1,401 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Settings to target users based on its type and days since last visit. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RetargetingV1 { + /** + * Types of visitors. + */ + @JsonAdapter(VisitorsTypeEnum.Adapter.class) + public enum VisitorsTypeEnum { + UNKNOWN("Unknown"), + + ALL("All"), + + BUYERS("Buyers"), + + NONBUYERS("NonBuyers"); + + private String value; + + VisitorsTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisitorsTypeEnum fromValue(String value) { + for (VisitorsTypeEnum b : VisitorsTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final VisitorsTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisitorsTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisitorsTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_VISITORS_TYPE = "visitorsType"; + @SerializedName(SERIALIZED_NAME_VISITORS_TYPE) + private VisitorsTypeEnum visitorsType; + + public static final String SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MIN = "daysSinceLastVisitMin"; + @SerializedName(SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MIN) + private Integer daysSinceLastVisitMin; + + public static final String SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MAX = "daysSinceLastVisitMax"; + @SerializedName(SERIALIZED_NAME_DAYS_SINCE_LAST_VISIT_MAX) + private Integer daysSinceLastVisitMax; + + public RetargetingV1() { + } + + public RetargetingV1 visitorsType(VisitorsTypeEnum visitorsType) { + + this.visitorsType = visitorsType; + return this; + } + + /** + * Types of visitors. + * @return visitorsType + **/ + @javax.annotation.Nullable + + public VisitorsTypeEnum getVisitorsType() { + return visitorsType; + } + + + public void setVisitorsType(VisitorsTypeEnum visitorsType) { + this.visitorsType = visitorsType; + } + + + public RetargetingV1 daysSinceLastVisitMin(Integer daysSinceLastVisitMin) { + + this.daysSinceLastVisitMin = daysSinceLastVisitMin; + return this; + } + + /** + * Minimum number of days since last visit to partner. + * @return daysSinceLastVisitMin + **/ + @javax.annotation.Nullable + + public Integer getDaysSinceLastVisitMin() { + return daysSinceLastVisitMin; + } + + + public void setDaysSinceLastVisitMin(Integer daysSinceLastVisitMin) { + this.daysSinceLastVisitMin = daysSinceLastVisitMin; + } + + + public RetargetingV1 daysSinceLastVisitMax(Integer daysSinceLastVisitMax) { + + this.daysSinceLastVisitMax = daysSinceLastVisitMax; + return this; + } + + /** + * Maximum number of days since last visit to partner. + * @return daysSinceLastVisitMax + **/ + @javax.annotation.Nullable + + public Integer getDaysSinceLastVisitMax() { + return daysSinceLastVisitMax; + } + + + public void setDaysSinceLastVisitMax(Integer daysSinceLastVisitMax) { + this.daysSinceLastVisitMax = daysSinceLastVisitMax; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RetargetingV1 instance itself + */ + public RetargetingV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RetargetingV1 retargetingV1 = (RetargetingV1) o; + return Objects.equals(this.visitorsType, retargetingV1.visitorsType) && + Objects.equals(this.daysSinceLastVisitMin, retargetingV1.daysSinceLastVisitMin) && + Objects.equals(this.daysSinceLastVisitMax, retargetingV1.daysSinceLastVisitMax)&& + Objects.equals(this.additionalProperties, retargetingV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(visitorsType, daysSinceLastVisitMin, daysSinceLastVisitMax, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RetargetingV1 {\n"); + sb.append(" visitorsType: ").append(toIndentedString(visitorsType)).append("\n"); + sb.append(" daysSinceLastVisitMin: ").append(toIndentedString(daysSinceLastVisitMin)).append("\n"); + sb.append(" daysSinceLastVisitMax: ").append(toIndentedString(daysSinceLastVisitMax)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("visitorsType"); + openapiFields.add("daysSinceLastVisitMin"); + openapiFields.add("daysSinceLastVisitMax"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RetargetingV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RetargetingV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RetargetingV1 is not found in the empty JSON string", RetargetingV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("visitorsType") != null && !jsonObj.get("visitorsType").isJsonNull()) && !jsonObj.get("visitorsType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `visitorsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("visitorsType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RetargetingV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RetargetingV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RetargetingV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RetargetingV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RetargetingV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RetargetingV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RetargetingV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RetargetingV1 + * @throws IOException if the JSON string is invalid with respect to RetargetingV1 + */ + public static RetargetingV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RetargetingV1.class); + } + + /** + * Convert an instance of RetargetingV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Size.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Size.java new file mode 100644 index 00000000..a02c7ecc --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Size.java @@ -0,0 +1,318 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Size entity containing width and height of the creative + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Size { + public static final String SERIALIZED_NAME_WIDTH = "width"; + @SerializedName(SERIALIZED_NAME_WIDTH) + private Integer width; + + public static final String SERIALIZED_NAME_HEIGHT = "height"; + @SerializedName(SERIALIZED_NAME_HEIGHT) + private Integer height; + + public Size() { + } + + public Size width(Integer width) { + + this.width = width; + return this; + } + + /** + * Get width + * @return width + **/ + @javax.annotation.Nullable + + public Integer getWidth() { + return width; + } + + + public void setWidth(Integer width) { + this.width = width; + } + + + public Size height(Integer height) { + + this.height = height; + return this; + } + + /** + * Get height + * @return height + **/ + @javax.annotation.Nullable + + public Integer getHeight() { + return height; + } + + + public void setHeight(Integer height) { + this.height = height; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Size instance itself + */ + public Size putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Size size = (Size) o; + return Objects.equals(this.width, size.width) && + Objects.equals(this.height, size.height)&& + Objects.equals(this.additionalProperties, size.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(width, height, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Size {\n"); + sb.append(" width: ").append(toIndentedString(width)).append("\n"); + sb.append(" height: ").append(toIndentedString(height)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("width"); + openapiFields.add("height"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to Size + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!Size.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Size is not found in the empty JSON string", Size.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Size.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Size' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Size.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Size value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Size read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + Size instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Size given an JSON string + * + * @param jsonString JSON string + * @return An instance of Size + * @throws IOException if the JSON string is invalid with respect to Size + */ + public static Size fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Size.class); + } + + /** + * Convert an instance of Size to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/StatisticsReportQueryMessage.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/StatisticsReportQueryMessage.java similarity index 99% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/StatisticsReportQueryMessage.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/StatisticsReportQueryMessage.java index f963d96d..b4321c85 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/StatisticsReportQueryMessage.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/StatisticsReportQueryMessage.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * This is the message defining the query for Adset report diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Tag.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Tag.java new file mode 100644 index 00000000..df3ec404 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/Tag.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.Size; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Entity specifying the html of the tag and its size + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Tag { + public static final String SERIALIZED_NAME_HTML_TAG = "htmlTag"; + @SerializedName(SERIALIZED_NAME_HTML_TAG) + private String htmlTag; + + public static final String SERIALIZED_NAME_SIZE = "size"; + @SerializedName(SERIALIZED_NAME_SIZE) + private Size size; + + public Tag() { + } + + public Tag htmlTag(String htmlTag) { + + this.htmlTag = htmlTag; + return this; + } + + /** + * Html tag + * @return htmlTag + **/ + @javax.annotation.Nullable + + public String getHtmlTag() { + return htmlTag; + } + + + public void setHtmlTag(String htmlTag) { + this.htmlTag = htmlTag; + } + + + public Tag size(Size size) { + + this.size = size; + return this; + } + + /** + * Get size + * @return size + **/ + @javax.annotation.Nullable + + public Size getSize() { + return size; + } + + + public void setSize(Size size) { + this.size = size; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Tag instance itself + */ + public Tag putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.htmlTag, tag.htmlTag) && + Objects.equals(this.size, tag.size)&& + Objects.equals(this.additionalProperties, tag.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(htmlTag, size, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" htmlTag: ").append(toIndentedString(htmlTag)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("htmlTag"); + openapiFields.add("size"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to Tag + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!Tag.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Tag is not found in the empty JSON string", Tag.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("htmlTag") != null && !jsonObj.get("htmlTag").isJsonNull()) && !jsonObj.get("htmlTag").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `htmlTag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("htmlTag").toString())); + } + // validate the optional field `size` + if (jsonObj.get("size") != null && !jsonObj.get("size").isJsonNull()) { + Size.validateJsonObject(jsonObj.getAsJsonObject("size")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Tag.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Tag' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Tag.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Tag value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Tag read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + Tag instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Tag given an JSON string + * + * @param jsonString JSON string + * @return An instance of Tag + * @throws IOException if the JSON string is invalid with respect to Tag + */ + public static Tag fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Tag.class); + } + + /** + * Convert an instance of Tag to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransactionsReportQueryDataMessage.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransactionsReportQueryDataMessage.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransactionsReportQueryDataMessage.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransactionsReportQueryDataMessage.java index 89cf5f61..4b3f7d00 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransactionsReportQueryDataMessage.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransactionsReportQueryDataMessage.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.TransactionsReportQueryEntityMessage; +import com.criteo.api.marketingsolutions.v2024_07.model.TransactionsReportQueryEntityMessage; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Contains queries for Transactions report diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransactionsReportQueryEntityMessage.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransactionsReportQueryEntityMessage.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransactionsReportQueryEntityMessage.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransactionsReportQueryEntityMessage.java index dda6ab61..3fa0c02c 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransactionsReportQueryEntityMessage.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransactionsReportQueryEntityMessage.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.TransactionsReportQueryMessage; +import com.criteo.api.marketingsolutions.v2024_07.model.TransactionsReportQueryMessage; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * Contains a query for Transaction report and its type diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransactionsReportQueryMessage.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransactionsReportQueryMessage.java similarity index 99% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransactionsReportQueryMessage.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransactionsReportQueryMessage.java index 03244917..e4aba271 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransactionsReportQueryMessage.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransactionsReportQueryMessage.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * This is the message defining the query for Transaction report diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyQueryMessage.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyQueryMessage.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyQueryMessage.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyQueryMessage.java index 429a40a2..0648eaa9 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyQueryMessage.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyQueryMessage.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * This is the message defining the query for Transparency report diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportAttributes.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportAttributes.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportAttributes.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportAttributes.java index 2045112f..cb259c82 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportAttributes.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportAttributes.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.TransparencyReportFile; +import com.criteo.api.marketingsolutions.v2024_07.model.TransparencyReportFile; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * This is the message defining the attribute response for Transparency report diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportDataMessage.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportDataMessage.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportDataMessage.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportDataMessage.java index 51d48c46..ad2709d8 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportDataMessage.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportDataMessage.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.TransparencyReportEntityMessage; +import com.criteo.api.marketingsolutions.v2024_07.model.TransparencyReportEntityMessage; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * This is the message defining the response for Transparency report diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportEntityMessage.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportEntityMessage.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportEntityMessage.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportEntityMessage.java index 5f493bd0..d45bcb4b 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportEntityMessage.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportEntityMessage.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.TransparencyReportAttributes; +import com.criteo.api.marketingsolutions.v2024_07.model.TransparencyReportAttributes; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * This is the message defining the entity response for Transparency report diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportFile.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportFile.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportFile.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportFile.java index 02ec939f..c7444836 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/TransparencyReportFile.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/TransparencyReportFile.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -41,7 +41,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * This is the message defining the file response for Transparency report diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCoupon.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCoupon.java new file mode 100644 index 00000000..70d70cd1 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCoupon.java @@ -0,0 +1,332 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Entity to edit a Coupon + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCoupon { + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private String endDate; + + public UpdateCoupon() { + } + + public UpdateCoupon startDate(String startDate) { + + this.startDate = startDate; + return this; + } + + /** + * The date when the Coupon will be launched String must be in ISO8601 format + * @return startDate + **/ + @javax.annotation.Nonnull + + public String getStartDate() { + return startDate; + } + + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + + public UpdateCoupon endDate(String endDate) { + + this.endDate = endDate; + return this; + } + + /** + * The date when when we will stop to show this Coupon. If the end date is not specified (i.e. null) then the Coupon will go on forever String must be in ISO8601 format + * @return endDate + **/ + @javax.annotation.Nullable + + public String getEndDate() { + return endDate; + } + + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateCoupon instance itself + */ + public UpdateCoupon putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCoupon updateCoupon = (UpdateCoupon) o; + return Objects.equals(this.startDate, updateCoupon.startDate) && + Objects.equals(this.endDate, updateCoupon.endDate)&& + Objects.equals(this.additionalProperties, updateCoupon.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(startDate, endDate, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCoupon {\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("startDate"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to UpdateCoupon + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!UpdateCoupon.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCoupon is not found in the empty JSON string", UpdateCoupon.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : UpdateCoupon.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("startDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `startDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("startDate").toString())); + } + if ((jsonObj.get("endDate") != null && !jsonObj.get("endDate").isJsonNull()) && !jsonObj.get("endDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateCoupon.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateCoupon' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateCoupon.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateCoupon value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateCoupon read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + UpdateCoupon instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateCoupon given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateCoupon + * @throws IOException if the JSON string is invalid with respect to UpdateCoupon + */ + public static UpdateCoupon fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateCoupon.class); + } + + /** + * Convert an instance of UpdateCoupon to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCouponRequest.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCouponRequest.java new file mode 100644 index 00000000..472a08e3 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCouponRequest.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.UpdateCouponResource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for input resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCouponRequest { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private UpdateCouponResource data; + + public UpdateCouponRequest() { + } + + public UpdateCouponRequest data(UpdateCouponResource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public UpdateCouponResource getData() { + return data; + } + + + public void setData(UpdateCouponResource data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateCouponRequest instance itself + */ + public UpdateCouponRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCouponRequest updateCouponRequest = (UpdateCouponRequest) o; + return Objects.equals(this.data, updateCouponRequest.data)&& + Objects.equals(this.additionalProperties, updateCouponRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCouponRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to UpdateCouponRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!UpdateCouponRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCouponRequest is not found in the empty JSON string", UpdateCouponRequest.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + UpdateCouponResource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateCouponRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateCouponRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateCouponRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateCouponRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateCouponRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + UpdateCouponRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateCouponRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateCouponRequest + * @throws IOException if the JSON string is invalid with respect to UpdateCouponRequest + */ + public static UpdateCouponRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateCouponRequest.class); + } + + /** + * Convert an instance of UpdateCouponRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCouponResource.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCouponResource.java new file mode 100644 index 00000000..5b596242 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/UpdateCouponResource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.v2024_07.model.UpdateCoupon; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateCouponResource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private UpdateCoupon attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public UpdateCouponResource() { + } + + public UpdateCouponResource attributes(UpdateCoupon attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public UpdateCoupon getAttributes() { + return attributes; + } + + + public void setAttributes(UpdateCoupon attributes) { + this.attributes = attributes; + } + + + public UpdateCouponResource id(String id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public UpdateCouponResource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateCouponResource instance itself + */ + public UpdateCouponResource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateCouponResource updateCouponResource = (UpdateCouponResource) o; + return Objects.equals(this.attributes, updateCouponResource.attributes) && + Objects.equals(this.id, updateCouponResource.id) && + Objects.equals(this.type, updateCouponResource.type)&& + Objects.equals(this.additionalProperties, updateCouponResource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateCouponResource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to UpdateCouponResource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!UpdateCouponResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCouponResource is not found in the empty JSON string", UpdateCouponResource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + UpdateCoupon.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateCouponResource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateCouponResource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateCouponResource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateCouponResource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateCouponResource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + UpdateCouponResource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateCouponResource given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateCouponResource + * @throws IOException if the JSON string is invalid with respect to UpdateCouponResource + */ + public static UpdateCouponResource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateCouponResource.class); + } + + /** + * Convert an instance of UpdateCouponResource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/VideoDetail.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/VideoDetail.java new file mode 100644 index 00000000..680bb9e7 --- /dev/null +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/VideoDetail.java @@ -0,0 +1,401 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.net.URI; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.v2024_07.JSON; + +/** + * Entity consists of the url of the video, its duration and its shape. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class VideoDetail { + public static final String SERIALIZED_NAME_DURATION = "duration"; + @SerializedName(SERIALIZED_NAME_DURATION) + private Double duration; + + /** + * Shape of the video + */ + @JsonAdapter(ShapeEnum.Adapter.class) + public enum ShapeEnum { + HORIZONTAL("Horizontal"), + + VERTICAL("Vertical"), + + SQUARE("Square"); + + private String value; + + ShapeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ShapeEnum fromValue(String value) { + for (ShapeEnum b : ShapeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ShapeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ShapeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ShapeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_SHAPE = "shape"; + @SerializedName(SERIALIZED_NAME_SHAPE) + private ShapeEnum shape; + + public static final String SERIALIZED_NAME_URL = "url"; + @SerializedName(SERIALIZED_NAME_URL) + private URI url; + + public VideoDetail() { + } + + public VideoDetail duration(Double duration) { + + this.duration = duration; + return this; + } + + /** + * The duration of the video in milliseconds, the video could be trimmed if it is longer than 30000 ms. + * @return duration + **/ + @javax.annotation.Nonnull + + public Double getDuration() { + return duration; + } + + + public void setDuration(Double duration) { + this.duration = duration; + } + + + public VideoDetail shape(ShapeEnum shape) { + + this.shape = shape; + return this; + } + + /** + * Shape of the video + * @return shape + **/ + @javax.annotation.Nonnull + + public ShapeEnum getShape() { + return shape; + } + + + public void setShape(ShapeEnum shape) { + this.shape = shape; + } + + + public VideoDetail url(URI url) { + + this.url = url; + return this; + } + + /** + * URL of the video uploaded on demostatic.criteo.com when deploying and then static.criteo.net + * @return url + **/ + @javax.annotation.Nonnull + + public URI getUrl() { + return url; + } + + + public void setUrl(URI url) { + this.url = url; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the VideoDetail instance itself + */ + public VideoDetail putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VideoDetail videoDetail = (VideoDetail) o; + return Objects.equals(this.duration, videoDetail.duration) && + Objects.equals(this.shape, videoDetail.shape) && + Objects.equals(this.url, videoDetail.url)&& + Objects.equals(this.additionalProperties, videoDetail.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(duration, shape, url, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VideoDetail {\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" shape: ").append(toIndentedString(shape)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("duration"); + openapiFields.add("shape"); + openapiFields.add("url"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("duration"); + openapiRequiredFields.add("shape"); + openapiRequiredFields.add("url"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to VideoDetail + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!VideoDetail.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in VideoDetail is not found in the empty JSON string", VideoDetail.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VideoDetail.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("shape").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `shape` to be a primitive type in the JSON string but got `%s`", jsonObj.get("shape").toString())); + } + if (!jsonObj.get("url").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VideoDetail.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VideoDetail' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(VideoDetail.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, VideoDetail value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public VideoDetail read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + VideoDetail instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of VideoDetail given an JSON string + * + * @param jsonString JSON string + * @return An instance of VideoDetail + * @throws IOException if the JSON string is invalid with respect to VideoDetail + */ + public static VideoDetail fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VideoDetail.class); + } + + /** + * Convert an instance of VideoDetail to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/WriteModelAdSetId.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/WriteModelAdSetId.java similarity index 98% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/WriteModelAdSetId.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/WriteModelAdSetId.java index e5924980..816fefa8 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/WriteModelAdSetId.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/WriteModelAdSetId.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * write model data for resources diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/WriteModelPatchAdSet.java b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/WriteModelPatchAdSetV24Q1.java similarity index 81% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/WriteModelPatchAdSet.java rename to sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/WriteModelPatchAdSetV24Q1.java index 15ccfc88..a07c6715 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/WriteModelPatchAdSet.java +++ b/sdks/marketingsolutions_2024-07/src/main/java/com/criteo/api/marketingsolutions/v2024_07/model/WriteModelPatchAdSetV24Q1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.PatchAdSet; +import com.criteo.api.marketingsolutions.v2024_07.model.PatchAdSetV24Q1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +43,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.v2024_07.JSON; /** * write model data for resources */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class WriteModelPatchAdSet { +public class WriteModelPatchAdSetV24Q1 { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) private String id; @@ -60,12 +60,12 @@ public class WriteModelPatchAdSet { public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private PatchAdSet attributes; + private PatchAdSetV24Q1 attributes; - public WriteModelPatchAdSet() { + public WriteModelPatchAdSetV24Q1() { } - public WriteModelPatchAdSet id(String id) { + public WriteModelPatchAdSetV24Q1 id(String id) { this.id = id; return this; @@ -87,7 +87,7 @@ public void setId(String id) { } - public WriteModelPatchAdSet type(String type) { + public WriteModelPatchAdSetV24Q1 type(String type) { this.type = type; return this; @@ -109,7 +109,7 @@ public void setType(String type) { } - public WriteModelPatchAdSet attributes(PatchAdSet attributes) { + public WriteModelPatchAdSetV24Q1 attributes(PatchAdSetV24Q1 attributes) { this.attributes = attributes; return this; @@ -121,12 +121,12 @@ public WriteModelPatchAdSet attributes(PatchAdSet attributes) { **/ @javax.annotation.Nullable - public PatchAdSet getAttributes() { + public PatchAdSetV24Q1 getAttributes() { return attributes; } - public void setAttributes(PatchAdSet attributes) { + public void setAttributes(PatchAdSetV24Q1 attributes) { this.attributes = attributes; } @@ -143,9 +143,9 @@ public void setAttributes(PatchAdSet attributes) { * * @param key name of the property * @param value value of the property - * @return the WriteModelPatchAdSet instance itself + * @return the WriteModelPatchAdSetV24Q1 instance itself */ - public WriteModelPatchAdSet putAdditionalProperty(String key, Object value) { + public WriteModelPatchAdSetV24Q1 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -184,11 +184,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WriteModelPatchAdSet writeModelPatchAdSet = (WriteModelPatchAdSet) o; - return Objects.equals(this.id, writeModelPatchAdSet.id) && - Objects.equals(this.type, writeModelPatchAdSet.type) && - Objects.equals(this.attributes, writeModelPatchAdSet.attributes)&& - Objects.equals(this.additionalProperties, writeModelPatchAdSet.additionalProperties); + WriteModelPatchAdSetV24Q1 writeModelPatchAdSetV24Q1 = (WriteModelPatchAdSetV24Q1) o; + return Objects.equals(this.id, writeModelPatchAdSetV24Q1.id) && + Objects.equals(this.type, writeModelPatchAdSetV24Q1.type) && + Objects.equals(this.attributes, writeModelPatchAdSetV24Q1.attributes)&& + Objects.equals(this.additionalProperties, writeModelPatchAdSetV24Q1.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -210,7 +210,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class WriteModelPatchAdSet {\n"); + sb.append("class WriteModelPatchAdSetV24Q1 {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); @@ -249,12 +249,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to WriteModelPatchAdSet + * @throws IOException if the JSON Object is invalid with respect to WriteModelPatchAdSetV24Q1 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!WriteModelPatchAdSet.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WriteModelPatchAdSet is not found in the empty JSON string", WriteModelPatchAdSet.openapiRequiredFields.toString())); + if (!WriteModelPatchAdSetV24Q1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in WriteModelPatchAdSetV24Q1 is not found in the empty JSON string", WriteModelPatchAdSetV24Q1.openapiRequiredFields.toString())); } } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { @@ -265,7 +265,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { } // validate the optional field `attributes` if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - PatchAdSet.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + PatchAdSetV24Q1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); } } @@ -273,16 +273,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!WriteModelPatchAdSet.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'WriteModelPatchAdSet' and its subtypes + if (!WriteModelPatchAdSetV24Q1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'WriteModelPatchAdSetV24Q1' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(WriteModelPatchAdSet.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(WriteModelPatchAdSetV24Q1.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, WriteModelPatchAdSet value) throws IOException { + public void write(JsonWriter out, WriteModelPatchAdSetV24Q1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -305,11 +305,11 @@ else if (entry.getValue() instanceof Character) } @Override - public WriteModelPatchAdSet read(JsonReader in) throws IOException { + public WriteModelPatchAdSetV24Q1 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - WriteModelPatchAdSet instance = thisAdapter.fromJsonTree(jsonObj); + WriteModelPatchAdSetV24Q1 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -336,18 +336,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of WriteModelPatchAdSet given an JSON string + * Create an instance of WriteModelPatchAdSetV24Q1 given an JSON string * * @param jsonString JSON string - * @return An instance of WriteModelPatchAdSet - * @throws IOException if the JSON string is invalid with respect to WriteModelPatchAdSet + * @return An instance of WriteModelPatchAdSetV24Q1 + * @throws IOException if the JSON string is invalid with respect to WriteModelPatchAdSetV24Q1 */ - public static WriteModelPatchAdSet fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, WriteModelPatchAdSet.class); + public static WriteModelPatchAdSetV24Q1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, WriteModelPatchAdSetV24Q1.class); } /** - * Convert an instance of WriteModelPatchAdSet to an JSON string + * Convert an instance of WriteModelPatchAdSetV24Q1 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/test/java/com/criteo/api/marketingsolutions/v2023_04/ExampleApplication.java b/sdks/marketingsolutions_2024-07/src/test/java/com/criteo/api/marketingsolutions/v2024_07/ExampleApplication.java similarity index 81% rename from sdks/marketingsolutions_2023-04/src/test/java/com/criteo/api/marketingsolutions/v2023_04/ExampleApplication.java rename to sdks/marketingsolutions_2024-07/src/test/java/com/criteo/api/marketingsolutions/v2024_07/ExampleApplication.java index 07064892..63b5a30f 100644 --- a/sdks/marketingsolutions_2023-04/src/test/java/com/criteo/api/marketingsolutions/v2023_04/ExampleApplication.java +++ b/sdks/marketingsolutions_2024-07/src/test/java/com/criteo/api/marketingsolutions/v2024_07/ExampleApplication.java @@ -1,12 +1,12 @@ -package com.criteo.api.marketingsolutions.v2023_04; - -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.ApiResponse; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.api.GatewayApi; -import com.criteo.api.marketingsolutions.v2023_04.model.*; +package com.criteo.api.marketingsolutions.v2024_07; + +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.ApiResponse; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.api.GatewayApi; +import com.criteo.api.marketingsolutions.v2024_07.model.*; public class ExampleApplication { diff --git a/sdks/marketingsolutions_2023-04/src/test/java/com/criteo/api/marketingsolutions/v2023_04/GatewayApiTest.java b/sdks/marketingsolutions_2024-07/src/test/java/com/criteo/api/marketingsolutions/v2024_07/GatewayApiTest.java similarity index 81% rename from sdks/marketingsolutions_2023-04/src/test/java/com/criteo/api/marketingsolutions/v2023_04/GatewayApiTest.java rename to sdks/marketingsolutions_2024-07/src/test/java/com/criteo/api/marketingsolutions/v2024_07/GatewayApiTest.java index f7d82df8..abee26eb 100644 --- a/sdks/marketingsolutions_2023-04/src/test/java/com/criteo/api/marketingsolutions/v2023_04/GatewayApiTest.java +++ b/sdks/marketingsolutions_2024-07/src/test/java/com/criteo/api/marketingsolutions/v2024_07/GatewayApiTest.java @@ -1,4 +1,4 @@ -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.marketingsolutions.v2024_07; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -7,14 +7,14 @@ import java.lang.*; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.ApiResponse; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.ExampleApplication; -import com.criteo.api.marketingsolutions.v2023_04.api.GatewayApi; -import com.criteo.api.marketingsolutions.v2023_04.model.ApplicationSummaryModelResponse; +import com.criteo.api.marketingsolutions.v2024_07.ApiClient; +import com.criteo.api.marketingsolutions.v2024_07.ApiClientBuilder; +import com.criteo.api.marketingsolutions.v2024_07.ApiException; +import com.criteo.api.marketingsolutions.v2024_07.ApiResponse; +import com.criteo.api.marketingsolutions.v2024_07.Configuration; +import com.criteo.api.marketingsolutions.v2024_07.ExampleApplication; +import com.criteo.api.marketingsolutions.v2024_07.api.GatewayApi; +import com.criteo.api.marketingsolutions.v2024_07.model.ApplicationSummaryModelResponse; public class GatewayApiTest { private ApiClient client; diff --git a/sdks/marketingsolutions_preview/.openapi-generator/FILES b/sdks/marketingsolutions_preview/.openapi-generator/FILES index b6dab4e7..a6432717 100644 --- a/sdks/marketingsolutions_preview/.openapi-generator/FILES +++ b/sdks/marketingsolutions_preview/.openapi-generator/FILES @@ -171,6 +171,7 @@ docs/CreateCoupon.md docs/CreateCouponRequest.md docs/CreateCouponResource.md docs/CreateImageSlide.md +docs/CreateProductFilterRequest.md docs/CreateProductSetRequest.md docs/Creative.md docs/CreativeApi.md @@ -302,6 +303,7 @@ docs/Price.md docs/ProblemDetails.md docs/ProblemsDetails.md docs/Product.md +docs/ProductFilterConfig.md docs/ProductImporterError.md docs/ProductImporterWarning.md docs/ProductSet.md @@ -381,9 +383,14 @@ docs/UpdateCouponResource.md docs/UserDef.md docs/UserProfileAttributeModel.md docs/UserProfileIdentifierModel.md +docs/ValueResourceCollectionOutcomeOfProductFilterConfig.md +docs/ValueResourceInputOfCreateProductFilterRequest.md docs/ValueResourceInputOfCreateProductSetRequest.md docs/ValueResourceOfAdvertiserCreationInput.md +docs/ValueResourceOfCreateProductFilterRequest.md docs/ValueResourceOfCreateProductSetRequest.md +docs/ValueResourceOfProductFilterConfig.md +docs/ValueResourceOutcomeOfProductFilterConfig.md docs/VideoDetail.md docs/WriteModelAdSetId.md docs/WriteModelPatchAdSetV24Q1.md @@ -588,6 +595,7 @@ src/main/java/com/criteo/api/marketingsolutions/preview/model/CreateCoupon.java src/main/java/com/criteo/api/marketingsolutions/preview/model/CreateCouponRequest.java src/main/java/com/criteo/api/marketingsolutions/preview/model/CreateCouponResource.java src/main/java/com/criteo/api/marketingsolutions/preview/model/CreateImageSlide.java +src/main/java/com/criteo/api/marketingsolutions/preview/model/CreateProductFilterRequest.java src/main/java/com/criteo/api/marketingsolutions/preview/model/CreateProductSetRequest.java src/main/java/com/criteo/api/marketingsolutions/preview/model/Creative.java src/main/java/com/criteo/api/marketingsolutions/preview/model/CreativeListResponse.java @@ -716,6 +724,7 @@ src/main/java/com/criteo/api/marketingsolutions/preview/model/Price.java src/main/java/com/criteo/api/marketingsolutions/preview/model/ProblemDetails.java src/main/java/com/criteo/api/marketingsolutions/preview/model/ProblemsDetails.java src/main/java/com/criteo/api/marketingsolutions/preview/model/Product.java +src/main/java/com/criteo/api/marketingsolutions/preview/model/ProductFilterConfig.java src/main/java/com/criteo/api/marketingsolutions/preview/model/ProductImporterError.java src/main/java/com/criteo/api/marketingsolutions/preview/model/ProductImporterWarning.java src/main/java/com/criteo/api/marketingsolutions/preview/model/ProductSet.java @@ -794,9 +803,14 @@ src/main/java/com/criteo/api/marketingsolutions/preview/model/UpdateCouponResour src/main/java/com/criteo/api/marketingsolutions/preview/model/UserDef.java src/main/java/com/criteo/api/marketingsolutions/preview/model/UserProfileAttributeModel.java src/main/java/com/criteo/api/marketingsolutions/preview/model/UserProfileIdentifierModel.java +src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceCollectionOutcomeOfProductFilterConfig.java +src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceInputOfCreateProductFilterRequest.java src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceInputOfCreateProductSetRequest.java src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOfAdvertiserCreationInput.java +src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOfCreateProductFilterRequest.java src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOfCreateProductSetRequest.java +src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOfProductFilterConfig.java +src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOutcomeOfProductFilterConfig.java src/main/java/com/criteo/api/marketingsolutions/preview/model/VideoDetail.java src/main/java/com/criteo/api/marketingsolutions/preview/model/WriteModelAdSetId.java src/main/java/com/criteo/api/marketingsolutions/preview/model/WriteModelPatchAdSetV24Q1.java diff --git a/sdks/marketingsolutions_preview/README.md b/sdks/marketingsolutions_preview/README.md index 83d09c01..f3111c77 100644 --- a/sdks/marketingsolutions_preview/README.md +++ b/sdks/marketingsolutions_preview/README.md @@ -8,7 +8,7 @@ More information: [https://developers.criteo.com/](https://developers.criteo.com Criteo API -- Package version: 0.0.240626 +- Package version: 0.0.240731 *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -38,7 +38,7 @@ Add this dependency to your project's POM: com.criteo criteo-api-marketingsolutions-sdk - 0.0.240626 + 0.0.240731 compile ``` @@ -48,7 +48,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.criteo:criteo-api-marketingsolutions-sdk:0.0.240626" +compile "com.criteo:criteo-api-marketingsolutions-sdk:0.0.240731" ``` ### Others @@ -61,7 +61,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* `build/libs/criteo-api-marketingsolutions-sdk-0.0.240626.jar` +* `build/libs/criteo-api-marketingsolutions-sdk-0.0.240731.jar` ## Example @@ -175,6 +175,10 @@ Class | Method | HTTP request | Description *GatewayApi* | [**getCurrentApplication**](docs/GatewayApi.md#getCurrentApplication) | **GET** /preview/marketing-solutions/me | *OnSiteRecommendationApi* | [**apiV1RecoPost**](docs/OnSiteRecommendationApi.md#apiV1RecoPost) | **POST** /preview/recommendation/search | *RecoApi* | [**createProductSet**](docs/RecoApi.md#createProductSet) | **POST** /preview/product-sets | +*RecoApi* | [**disableProductFiltering**](docs/RecoApi.md#disableProductFiltering) | **DELETE** /preview/ads/{ad-id}/product-filter | +*RecoApi* | [**enableProductFiltering**](docs/RecoApi.md#enableProductFiltering) | **POST** /preview/ads/{ad-id}/product-filter | +*RecoApi* | [**fetchProductFilteringConfig**](docs/RecoApi.md#fetchProductFilteringConfig) | **GET** /preview/ads/{ad-id}/product-filter | +*RecoApi* | [**fetchProductFilteringUsages**](docs/RecoApi.md#fetchProductFilteringUsages) | **GET** /preview/product-sets/{product-set-id}/product-filters | *RecoApi* | [**fetchProductSet**](docs/RecoApi.md#fetchProductSet) | **GET** /preview/product-sets/{product-set-id} | *RecoApi* | [**fetchProductSets**](docs/RecoApi.md#fetchProductSets) | **GET** /preview/product-sets/dataset/{dataset-id} | *RecoApi* | [**removeProductSet**](docs/RecoApi.md#removeProductSet) | **DELETE** /preview/product-sets/{product-set-id} | @@ -342,6 +346,7 @@ Class | Method | HTTP request | Description - [CreateCouponRequest](docs/CreateCouponRequest.md) - [CreateCouponResource](docs/CreateCouponResource.md) - [CreateImageSlide](docs/CreateImageSlide.md) + - [CreateProductFilterRequest](docs/CreateProductFilterRequest.md) - [CreateProductSetRequest](docs/CreateProductSetRequest.md) - [Creative](docs/Creative.md) - [CreativeListResponse](docs/CreativeListResponse.md) @@ -470,6 +475,7 @@ Class | Method | HTTP request | Description - [ProblemDetails](docs/ProblemDetails.md) - [ProblemsDetails](docs/ProblemsDetails.md) - [Product](docs/Product.md) + - [ProductFilterConfig](docs/ProductFilterConfig.md) - [ProductImporterError](docs/ProductImporterError.md) - [ProductImporterWarning](docs/ProductImporterWarning.md) - [ProductSet](docs/ProductSet.md) @@ -548,9 +554,14 @@ Class | Method | HTTP request | Description - [UserDef](docs/UserDef.md) - [UserProfileAttributeModel](docs/UserProfileAttributeModel.md) - [UserProfileIdentifierModel](docs/UserProfileIdentifierModel.md) + - [ValueResourceCollectionOutcomeOfProductFilterConfig](docs/ValueResourceCollectionOutcomeOfProductFilterConfig.md) + - [ValueResourceInputOfCreateProductFilterRequest](docs/ValueResourceInputOfCreateProductFilterRequest.md) - [ValueResourceInputOfCreateProductSetRequest](docs/ValueResourceInputOfCreateProductSetRequest.md) - [ValueResourceOfAdvertiserCreationInput](docs/ValueResourceOfAdvertiserCreationInput.md) + - [ValueResourceOfCreateProductFilterRequest](docs/ValueResourceOfCreateProductFilterRequest.md) - [ValueResourceOfCreateProductSetRequest](docs/ValueResourceOfCreateProductSetRequest.md) + - [ValueResourceOfProductFilterConfig](docs/ValueResourceOfProductFilterConfig.md) + - [ValueResourceOutcomeOfProductFilterConfig](docs/ValueResourceOutcomeOfProductFilterConfig.md) - [VideoDetail](docs/VideoDetail.md) - [WriteModelAdSetId](docs/WriteModelAdSetId.md) - [WriteModelPatchAdSetV24Q1](docs/WriteModelPatchAdSetV24Q1.md) diff --git a/sdks/marketingsolutions_preview/api/openapi.yaml b/sdks/marketingsolutions_preview/api/openapi.yaml index 5469ebcb..62dced3f 100644 --- a/sdks/marketingsolutions_preview/api/openapi.yaml +++ b/sdks/marketingsolutions_preview/api/openapi.yaml @@ -4536,6 +4536,204 @@ paths: tags: - Catalog x-accepts: application/json + /preview/ads/{ad-id}/product-filter: + delete: + description: Disable product filtering for a given ad + operationId: DisableProductFiltering + parameters: + - description: ID of the ad + explode: false + in: path + name: ad-id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/ValueResourceOutcomeOfProductFilterConfig' + application/json: + schema: + $ref: '#/components/schemas/ValueResourceOutcomeOfProductFilterConfig' + text/json: + schema: + $ref: '#/components/schemas/ValueResourceOutcomeOfProductFilterConfig' + description: Successful operation + "400": + content: + text/plain: + schema: + $ref: '#/components/schemas/Outcome' + application/json: + schema: + $ref: '#/components/schemas/Outcome' + text/json: + schema: + $ref: '#/components/schemas/Outcome' + description: Operation failure + "403": + content: + text/plain: + schema: + $ref: '#/components/schemas/Outcome' + application/json: + schema: + $ref: '#/components/schemas/Outcome' + text/json: + schema: + $ref: '#/components/schemas/Outcome' + description: Operation failure + "404": + content: + text/plain: + schema: + $ref: '#/components/schemas/Outcome' + application/json: + schema: + $ref: '#/components/schemas/Outcome' + text/json: + schema: + $ref: '#/components/schemas/Outcome' + description: Operation failure + "409": + content: + text/plain: + schema: + $ref: '#/components/schemas/Outcome' + application/json: + schema: + $ref: '#/components/schemas/Outcome' + text/json: + schema: + $ref: '#/components/schemas/Outcome' + description: Operation failure + tags: + - Reco + x-accepts: application/json + get: + description: Fetch product filtering configuration for a given ad + operationId: FetchProductFilteringConfig + parameters: + - description: ID of the ad + explode: false + in: path + name: ad-id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/ValueResourceOutcomeOfProductFilterConfig' + application/json: + schema: + $ref: '#/components/schemas/ValueResourceOutcomeOfProductFilterConfig' + text/json: + schema: + $ref: '#/components/schemas/ValueResourceOutcomeOfProductFilterConfig' + description: "Successful operation. Returns the product filtering configuration\ + \ if it exists, or empty data if it doesn't." + "400": + content: + text/plain: + schema: + $ref: '#/components/schemas/Outcome' + application/json: + schema: + $ref: '#/components/schemas/Outcome' + text/json: + schema: + $ref: '#/components/schemas/Outcome' + description: Operation failure + "403": + content: + text/plain: + schema: + $ref: '#/components/schemas/Outcome' + application/json: + schema: + $ref: '#/components/schemas/Outcome' + text/json: + schema: + $ref: '#/components/schemas/Outcome' + description: Operation failure + tags: + - Reco + x-accepts: application/json + post: + description: Enable product filtering for a given ad + operationId: EnableProductFiltering + parameters: + - description: ID of the ad + explode: false + in: path + name: ad-id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfCreateProductFilterRequest' + application/json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfCreateProductFilterRequest' + text/json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfCreateProductFilterRequest' + application/*+json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfCreateProductFilterRequest' + x-bodyName: createProductFilterRequest + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/ValueResourceOutcomeOfProductFilterConfig' + application/json: + schema: + $ref: '#/components/schemas/ValueResourceOutcomeOfProductFilterConfig' + text/json: + schema: + $ref: '#/components/schemas/ValueResourceOutcomeOfProductFilterConfig' + description: successful operation + "400": + content: + text/plain: + schema: + $ref: '#/components/schemas/Outcome' + application/json: + schema: + $ref: '#/components/schemas/Outcome' + text/json: + schema: + $ref: '#/components/schemas/Outcome' + description: Operation failure + "403": + content: + text/plain: + schema: + $ref: '#/components/schemas/Outcome' + application/json: + schema: + $ref: '#/components/schemas/Outcome' + text/json: + schema: + $ref: '#/components/schemas/Outcome' + description: Operation failure + tags: + - Reco + x-content-type: application/json-patch+json + x-accepts: application/json /preview/product-sets: post: description: Create a new product set @@ -4814,6 +5012,59 @@ paths: tags: - Reco x-accepts: application/json + /preview/product-sets/{product-set-id}/product-filters: + get: + description: Fetch product filtering usages for a given product set + operationId: FetchProductFilteringUsages + parameters: + - description: ID of the product set + explode: false + in: path + name: product-set-id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/ValueResourceCollectionOutcomeOfProductFilterConfig' + application/json: + schema: + $ref: '#/components/schemas/ValueResourceCollectionOutcomeOfProductFilterConfig' + text/json: + schema: + $ref: '#/components/schemas/ValueResourceCollectionOutcomeOfProductFilterConfig' + description: successful operation + "400": + content: + text/plain: + schema: + $ref: '#/components/schemas/Outcome' + application/json: + schema: + $ref: '#/components/schemas/Outcome' + text/json: + schema: + $ref: '#/components/schemas/Outcome' + description: Operation failure + "403": + content: + text/plain: + schema: + $ref: '#/components/schemas/Outcome' + application/json: + schema: + $ref: '#/components/schemas/Outcome' + text/json: + schema: + $ref: '#/components/schemas/Outcome' + description: Operation failure + tags: + - Reco + x-accepts: application/json /preview/recommendation/search: post: description: "Retrieves a list of products recommended for the given user. This\ @@ -7269,7 +7520,8 @@ components: - value type: object ApplicationSummaryModelResponse: - description: Response of ApplicationSummaryModel + description: A top-level object that encapsulates a Criteo API response for + a single value example: data: attributes: @@ -7330,17 +7582,16 @@ components: nullable: true readOnly: true type: array - uniqueItems: false errors: items: $ref: '#/components/schemas/CommonProblem' nullable: true readOnly: true type: array - uniqueItems: false type: object ApplicationSummaryModelResource: - description: A class that represents a ValueType in a guild compliant way + description: A top-level object that encapsulates a Criteo API response for + a single value example: attributes: organizationId: 6 @@ -7357,7 +7608,7 @@ components: $ref: '#/components/schemas/ApplicationSummaryModel' type: object CommonProblem: - description: Common problem object. Can be specialized as needed. + description: Common problem object. example: traceId: traceId traceIdentifier: traceIdentifier @@ -7393,7 +7644,7 @@ components: nullable: true type: string code: - description: "A machine-readable error code, expressed as a string value." + description: "A machine-readable error code, expressed as a string value." nullable: true type: string instance: @@ -7421,7 +7672,8 @@ components: type: string type: object ApplicationSummaryModel: - description: Model of ApplicationSummary + description: Used for the /me endpoint. Contains information about the currently + authenticated application that we accept to give to our clients example: organizationId: 6 name: name @@ -16287,7 +16539,6 @@ components: required: - bodyTextColor - callsToAction - - creativeBackgrounColor - logoBase64String - pricesColor - productImageDisplay @@ -21983,31 +22234,14 @@ components: - name - value type: object - ResourceOutcomeOfProductSet: - description: A class implementing the response of the Criteo API as described - in API Guild Guidelines with a single entity as body + ValueResourceOutcomeOfProductFilterConfig: + description: A top-level object that encapsulates a Criteo API response for + a single value. example: data: attributes: - isEnabled: true - name: name - datasetId: datasetId - numberOfProducts: 0 - rules: - - field: OBSOLETE_Extradata - values: - - values - - values - operator: IsIn - - field: OBSOLETE_Extradata - values: - - values - - values - operator: IsIn - id: id - creationDate: creationDate - status: Unknown - id: id + adId: adId + productSetId: productSetId type: type warnings: - traceId: traceId @@ -22053,7 +22287,69 @@ components: title: title properties: data: - $ref: '#/components/schemas/ResourceOfProductSet' + $ref: '#/components/schemas/ValueResourceOfProductFilterConfig' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + type: object + Outcome: + description: A class implementing the body of a response without data of the + Criteo API as described in API Guild Guidelines + example: + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: warnings: items: $ref: '#/components/schemas/ProblemDetails' @@ -22069,10 +22365,32 @@ components: type: array uniqueItems: false type: object - Outcome: - description: A class implementing the body of a response without data of the - Criteo API as described in API Guild Guidelines + ResourceOutcomeOfProductSet: + description: A class implementing the response of the Criteo API as described + in API Guild Guidelines with a single entity as body example: + data: + attributes: + isEnabled: true + name: name + datasetId: datasetId + numberOfProducts: 0 + rules: + - field: OBSOLETE_Extradata + values: + - values + - values + operator: IsIn + - field: OBSOLETE_Extradata + values: + - values + - values + operator: IsIn + id: id + creationDate: creationDate + status: Unknown + id: id + type: type warnings: - traceId: traceId traceIdentifier: traceIdentifier @@ -22116,6 +22434,8 @@ components: type: unknown title: title properties: + data: + $ref: '#/components/schemas/ResourceOfProductSet' warnings: items: $ref: '#/components/schemas/ProblemDetails' @@ -22242,6 +22562,95 @@ components: type: array uniqueItems: false type: object + ValueResourceCollectionOutcomeOfProductFilterConfig: + description: A top-level object that encapsulates a Criteo API response for + several values. + example: + data: + - attributes: + adId: adId + productSetId: productSetId + type: type + - attributes: + adId: adId + productSetId: productSetId + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/ValueResourceOfProductFilterConfig' + nullable: true + type: array + x-nullable: true + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + x-nullable: true + type: object + ValueResourceInputOfCreateProductFilterRequest: + description: A top-level object that encapsulates a Criteo API request for a + single value. + example: + data: + attributes: + productSetId: productSetId + type: type + properties: + data: + $ref: '#/components/schemas/ValueResourceOfCreateProductFilterRequest' + type: object ValueResourceInputOfCreateProductSetRequest: description: "Represents an API request message containing the usual valueResource\ \ data field,\r\ni.e. data is not an entity (no id). This can be used for\ @@ -22262,6 +22671,22 @@ components: data: $ref: '#/components/schemas/ValueResourceOfCreateProductSetRequest' type: object + ValueResourceOfProductFilterConfig: + description: A top-level object that encapsulates a Criteo API response for + a single value. + example: + attributes: + adId: adId + productSetId: productSetId + type: type + properties: + type: + nullable: true + type: string + x-nullable: true + attributes: + $ref: '#/components/schemas/ProductFilterConfig' + type: object ResourceOfProductSet: description: A class that represents an entity in a guild compliant way example: @@ -22296,6 +22721,21 @@ components: nullable: true type: string type: object + ValueResourceOfCreateProductFilterRequest: + description: A top-level object that encapsulates a Criteo API response for + a single value. + example: + attributes: + productSetId: productSetId + type: type + properties: + type: + nullable: true + type: string + x-nullable: true + attributes: + $ref: '#/components/schemas/CreateProductFilterRequest' + type: object ValueResourceOfCreateProductSetRequest: description: A class that represents a ValueType in a guild compliant way properties: @@ -22305,6 +22745,20 @@ components: attributes: $ref: '#/components/schemas/CreateProductSetRequest' type: object + ProductFilterConfig: + description: Entity to create a product filter configuration + example: + adId: adId + productSetId: productSetId + properties: + adId: + type: string + productSetId: + type: string + required: + - adId + - productSetId + type: object ProductSet: description: Encapsulate a group of product example: @@ -22372,6 +22826,16 @@ components: nullable: true type: string type: object + CreateProductFilterRequest: + description: Encapsulate the parameters needed to enable product filtering + example: + productSetId: productSetId + properties: + productSetId: + nullable: true + type: string + x-nullable: true + type: object CreateProductSetRequest: description: Entity to create a product set properties: @@ -23257,6 +23721,7 @@ components: - identityLink - gum - customerid + - phoneNumber example: email type: string identifiers: @@ -23300,6 +23765,7 @@ components: - identityLink - gum - customerid + - phoneNumber nullable: true type: string identifiers: diff --git a/sdks/marketingsolutions_preview/build.gradle b/sdks/marketingsolutions_preview/build.gradle index 229875e2..f0f260ca 100644 --- a/sdks/marketingsolutions_preview/build.gradle +++ b/sdks/marketingsolutions_preview/build.gradle @@ -23,7 +23,7 @@ if (JavaVersion.current().isJava8Compatible()) { } group = 'com.criteo' -version = '0.0.240626' +version = '0.0.240731' repositories { jcenter() @@ -74,7 +74,7 @@ publishing { mavenJava(MavenPublication) { groupId 'com.criteo' artifactId 'criteo-api-marketingsolutions-sdk' - version '0.0.240626' + version '0.0.240731' from components.java artifact sourcesJar artifact javadocJar diff --git a/sdks/marketingsolutions_preview/docs/ApplicationSummaryModel.md b/sdks/marketingsolutions_preview/docs/ApplicationSummaryModel.md index 704b26ad..d5e84458 100644 --- a/sdks/marketingsolutions_preview/docs/ApplicationSummaryModel.md +++ b/sdks/marketingsolutions_preview/docs/ApplicationSummaryModel.md @@ -2,7 +2,7 @@ # ApplicationSummaryModel -Model of ApplicationSummary +Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients ## Properties diff --git a/sdks/marketingsolutions_preview/docs/ApplicationSummaryModelResource.md b/sdks/marketingsolutions_preview/docs/ApplicationSummaryModelResource.md index 81ed2c97..af688c5d 100644 --- a/sdks/marketingsolutions_preview/docs/ApplicationSummaryModelResource.md +++ b/sdks/marketingsolutions_preview/docs/ApplicationSummaryModelResource.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResource -A class that represents a ValueType in a guild compliant way +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/marketingsolutions_preview/docs/ApplicationSummaryModelResponse.md b/sdks/marketingsolutions_preview/docs/ApplicationSummaryModelResponse.md index 47b6bd74..658b5549 100644 --- a/sdks/marketingsolutions_preview/docs/ApplicationSummaryModelResponse.md +++ b/sdks/marketingsolutions_preview/docs/ApplicationSummaryModelResponse.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResponse -Response of ApplicationSummaryModel +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/marketingsolutions_preview/docs/CommonProblem.md b/sdks/marketingsolutions_preview/docs/CommonProblem.md index 1ee7a1f1..3f7f164b 100644 --- a/sdks/marketingsolutions_preview/docs/CommonProblem.md +++ b/sdks/marketingsolutions_preview/docs/CommonProblem.md @@ -2,7 +2,7 @@ # CommonProblem -Common problem object. Can be specialized as needed. +Common problem object. ## Properties @@ -11,7 +11,7 @@ Common problem object. Can be specialized as needed. |**traceId** | **String** | The request correlation ID this problem comes from. | [optional] | |**traceIdentifier** | **String** | The request correlation ID this problem comes from. (deprecated, use traceId instead) | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The problem's category. | [optional] | -|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | +|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | |**instance** | **String** | A URI that identifies the specific occurrence of the problem. | [optional] | |**title** | **String** | A short human-readable description of the problem type | [optional] | |**detail** | **String** | A human-readable explanation specific to this occurrence of the problem | [optional] | diff --git a/sdks/marketingsolutions_preview/docs/ContactlistAmendmentAttributes.md b/sdks/marketingsolutions_preview/docs/ContactlistAmendmentAttributes.md index 2315fdd4..f0a2c263 100644 --- a/sdks/marketingsolutions_preview/docs/ContactlistAmendmentAttributes.md +++ b/sdks/marketingsolutions_preview/docs/ContactlistAmendmentAttributes.md @@ -33,6 +33,7 @@ the name of the entity type | IDENTITYLINK | "identityLink" | | GUM | "gum" | | CUSTOMERID | "customerid" | +| PHONENUMBER | "phoneNumber" | diff --git a/sdks/marketingsolutions_preview/docs/ContactlistWithAttributesAmendmentAttributes.md b/sdks/marketingsolutions_preview/docs/ContactlistWithAttributesAmendmentAttributes.md index f92c6cc7..e756efb2 100644 --- a/sdks/marketingsolutions_preview/docs/ContactlistWithAttributesAmendmentAttributes.md +++ b/sdks/marketingsolutions_preview/docs/ContactlistWithAttributesAmendmentAttributes.md @@ -33,6 +33,7 @@ the name of the entity type | IDENTITYLINK | "identityLink" | | GUM | "gum" | | CUSTOMERID | "customerid" | +| PHONENUMBER | "phoneNumber" | diff --git a/sdks/marketingsolutions_preview/docs/CreateProductFilterRequest.md b/sdks/marketingsolutions_preview/docs/CreateProductFilterRequest.md new file mode 100644 index 00000000..3c95d92d --- /dev/null +++ b/sdks/marketingsolutions_preview/docs/CreateProductFilterRequest.md @@ -0,0 +1,14 @@ + + +# CreateProductFilterRequest + +Encapsulate the parameters needed to enable product filtering + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**productSetId** | **String** | | [optional] | + + + diff --git a/sdks/marketingsolutions_preview/docs/ProductFilterConfig.md b/sdks/marketingsolutions_preview/docs/ProductFilterConfig.md new file mode 100644 index 00000000..27074904 --- /dev/null +++ b/sdks/marketingsolutions_preview/docs/ProductFilterConfig.md @@ -0,0 +1,15 @@ + + +# ProductFilterConfig + +Entity to create a product filter configuration + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**adId** | **String** | | | +|**productSetId** | **String** | | | + + + diff --git a/sdks/marketingsolutions_preview/docs/RecoApi.md b/sdks/marketingsolutions_preview/docs/RecoApi.md index 3ec79e07..7166e265 100644 --- a/sdks/marketingsolutions_preview/docs/RecoApi.md +++ b/sdks/marketingsolutions_preview/docs/RecoApi.md @@ -5,6 +5,10 @@ All URIs are relative to *https://api.criteo.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**createProductSet**](RecoApi.md#createProductSet) | **POST** /preview/product-sets | | +| [**disableProductFiltering**](RecoApi.md#disableProductFiltering) | **DELETE** /preview/ads/{ad-id}/product-filter | | +| [**enableProductFiltering**](RecoApi.md#enableProductFiltering) | **POST** /preview/ads/{ad-id}/product-filter | | +| [**fetchProductFilteringConfig**](RecoApi.md#fetchProductFilteringConfig) | **GET** /preview/ads/{ad-id}/product-filter | | +| [**fetchProductFilteringUsages**](RecoApi.md#fetchProductFilteringUsages) | **GET** /preview/product-sets/{product-set-id}/product-filters | | | [**fetchProductSet**](RecoApi.md#fetchProductSet) | **GET** /preview/product-sets/{product-set-id} | | | [**fetchProductSets**](RecoApi.md#fetchProductSets) | **GET** /preview/product-sets/dataset/{dataset-id} | | | [**removeProductSet**](RecoApi.md#removeProductSet) | **DELETE** /preview/product-sets/{product-set-id} | | @@ -104,6 +108,374 @@ public class Example { | **500** | Internal Error | - | +## disableProductFiltering + +> ValueResourceOutcomeOfProductFilterConfig disableProductFiltering(adId) + + + +Disable product filtering for a given ad + +### Example + +```java +package com.criteo.api.marketingsolutions.preview; + +import com.criteo.api.marketingsolutions.preview.ApiClient; +import com.criteo.api.marketingsolutions.preview.ApiClientBuilder; +import com.criteo.api.marketingsolutions.preview.ApiException; +import com.criteo.api.marketingsolutions.preview.Configuration; +import com.criteo.api.marketingsolutions.preview.auth.*; +import com.criteo.api.marketingsolutions.preview.model.*; +import com.criteo.api.marketingsolutions.preview.api.RecoApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + RecoApi apiInstance = new RecoApi(defaultClient); + String adId = "adId_example"; // String | ID of the ad + try { + ValueResourceOutcomeOfProductFilterConfig result = apiInstance.disableProductFiltering(adId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RecoApi#disableProductFiltering"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **adId** | **String**| ID of the ad | | + +### Return type + +[**ValueResourceOutcomeOfProductFilterConfig**](ValueResourceOutcomeOfProductFilterConfig.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | +| **400** | Operation failure | - | +| **403** | Operation failure | - | +| **404** | Operation failure | - | +| **409** | Operation failure | - | + + +## enableProductFiltering + +> ValueResourceOutcomeOfProductFilterConfig enableProductFiltering(adId, valueResourceInputOfCreateProductFilterRequest) + + + +Enable product filtering for a given ad + +### Example + +```java +package com.criteo.api.marketingsolutions.preview; + +import com.criteo.api.marketingsolutions.preview.ApiClient; +import com.criteo.api.marketingsolutions.preview.ApiClientBuilder; +import com.criteo.api.marketingsolutions.preview.ApiException; +import com.criteo.api.marketingsolutions.preview.Configuration; +import com.criteo.api.marketingsolutions.preview.auth.*; +import com.criteo.api.marketingsolutions.preview.model.*; +import com.criteo.api.marketingsolutions.preview.api.RecoApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + RecoApi apiInstance = new RecoApi(defaultClient); + String adId = "adId_example"; // String | ID of the ad + ValueResourceInputOfCreateProductFilterRequest valueResourceInputOfCreateProductFilterRequest = new ValueResourceInputOfCreateProductFilterRequest(); // ValueResourceInputOfCreateProductFilterRequest | + try { + ValueResourceOutcomeOfProductFilterConfig result = apiInstance.enableProductFiltering(adId, valueResourceInputOfCreateProductFilterRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RecoApi#enableProductFiltering"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **adId** | **String**| ID of the ad | | +| **valueResourceInputOfCreateProductFilterRequest** | [**ValueResourceInputOfCreateProductFilterRequest**](ValueResourceInputOfCreateProductFilterRequest.md)| | [optional] | + +### Return type + +[**ValueResourceOutcomeOfProductFilterConfig**](ValueResourceOutcomeOfProductFilterConfig.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Operation failure | - | +| **403** | Operation failure | - | + + +## fetchProductFilteringConfig + +> ValueResourceOutcomeOfProductFilterConfig fetchProductFilteringConfig(adId) + + + +Fetch product filtering configuration for a given ad + +### Example + +```java +package com.criteo.api.marketingsolutions.preview; + +import com.criteo.api.marketingsolutions.preview.ApiClient; +import com.criteo.api.marketingsolutions.preview.ApiClientBuilder; +import com.criteo.api.marketingsolutions.preview.ApiException; +import com.criteo.api.marketingsolutions.preview.Configuration; +import com.criteo.api.marketingsolutions.preview.auth.*; +import com.criteo.api.marketingsolutions.preview.model.*; +import com.criteo.api.marketingsolutions.preview.api.RecoApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + RecoApi apiInstance = new RecoApi(defaultClient); + String adId = "adId_example"; // String | ID of the ad + try { + ValueResourceOutcomeOfProductFilterConfig result = apiInstance.fetchProductFilteringConfig(adId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RecoApi#fetchProductFilteringConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **adId** | **String**| ID of the ad | | + +### Return type + +[**ValueResourceOutcomeOfProductFilterConfig**](ValueResourceOutcomeOfProductFilterConfig.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation. Returns the product filtering configuration if it exists, or empty data if it doesn't. | - | +| **400** | Operation failure | - | +| **403** | Operation failure | - | + + +## fetchProductFilteringUsages + +> ValueResourceCollectionOutcomeOfProductFilterConfig fetchProductFilteringUsages(productSetId) + + + +Fetch product filtering usages for a given product set + +### Example + +```java +package com.criteo.api.marketingsolutions.preview; + +import com.criteo.api.marketingsolutions.preview.ApiClient; +import com.criteo.api.marketingsolutions.preview.ApiClientBuilder; +import com.criteo.api.marketingsolutions.preview.ApiException; +import com.criteo.api.marketingsolutions.preview.Configuration; +import com.criteo.api.marketingsolutions.preview.auth.*; +import com.criteo.api.marketingsolutions.preview.model.*; +import com.criteo.api.marketingsolutions.preview.api.RecoApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + RecoApi apiInstance = new RecoApi(defaultClient); + String productSetId = "productSetId_example"; // String | ID of the product set + try { + ValueResourceCollectionOutcomeOfProductFilterConfig result = apiInstance.fetchProductFilteringUsages(productSetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RecoApi#fetchProductFilteringUsages"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **productSetId** | **String**| ID of the product set | | + +### Return type + +[**ValueResourceCollectionOutcomeOfProductFilterConfig**](ValueResourceCollectionOutcomeOfProductFilterConfig.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **400** | Operation failure | - | +| **403** | Operation failure | - | + + ## fetchProductSet > ResourceOutcomeOfProductSet fetchProductSet(productSetId) diff --git a/sdks/marketingsolutions_preview/docs/ValueResourceCollectionOutcomeOfProductFilterConfig.md b/sdks/marketingsolutions_preview/docs/ValueResourceCollectionOutcomeOfProductFilterConfig.md new file mode 100644 index 00000000..6a91c3e2 --- /dev/null +++ b/sdks/marketingsolutions_preview/docs/ValueResourceCollectionOutcomeOfProductFilterConfig.md @@ -0,0 +1,16 @@ + + +# ValueResourceCollectionOutcomeOfProductFilterConfig + +A top-level object that encapsulates a Criteo API response for several values. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<ValueResourceOfProductFilterConfig>**](ValueResourceOfProductFilterConfig.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_preview/docs/ValueResourceInputOfCreateProductFilterRequest.md b/sdks/marketingsolutions_preview/docs/ValueResourceInputOfCreateProductFilterRequest.md new file mode 100644 index 00000000..7314d086 --- /dev/null +++ b/sdks/marketingsolutions_preview/docs/ValueResourceInputOfCreateProductFilterRequest.md @@ -0,0 +1,14 @@ + + +# ValueResourceInputOfCreateProductFilterRequest + +A top-level object that encapsulates a Criteo API request for a single value. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ValueResourceOfCreateProductFilterRequest**](ValueResourceOfCreateProductFilterRequest.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_preview/docs/ValueResourceOfCreateProductFilterRequest.md b/sdks/marketingsolutions_preview/docs/ValueResourceOfCreateProductFilterRequest.md new file mode 100644 index 00000000..d7798c6a --- /dev/null +++ b/sdks/marketingsolutions_preview/docs/ValueResourceOfCreateProductFilterRequest.md @@ -0,0 +1,15 @@ + + +# ValueResourceOfCreateProductFilterRequest + +A top-level object that encapsulates a Criteo API response for a single value. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**CreateProductFilterRequest**](CreateProductFilterRequest.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_preview/docs/ValueResourceOfProductFilterConfig.md b/sdks/marketingsolutions_preview/docs/ValueResourceOfProductFilterConfig.md new file mode 100644 index 00000000..a5c7aba4 --- /dev/null +++ b/sdks/marketingsolutions_preview/docs/ValueResourceOfProductFilterConfig.md @@ -0,0 +1,15 @@ + + +# ValueResourceOfProductFilterConfig + +A top-level object that encapsulates a Criteo API response for a single value. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**ProductFilterConfig**](ProductFilterConfig.md) | | [optional] | + + + diff --git a/sdks/marketingsolutions_preview/docs/ValueResourceOutcomeOfProductFilterConfig.md b/sdks/marketingsolutions_preview/docs/ValueResourceOutcomeOfProductFilterConfig.md new file mode 100644 index 00000000..1f3dbbf5 --- /dev/null +++ b/sdks/marketingsolutions_preview/docs/ValueResourceOutcomeOfProductFilterConfig.md @@ -0,0 +1,16 @@ + + +# ValueResourceOutcomeOfProductFilterConfig + +A top-level object that encapsulates a Criteo API response for a single value. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ValueResourceOfProductFilterConfig**](ValueResourceOfProductFilterConfig.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/ApiClient.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/ApiClient.java index 46d2d372..a1fa5064 100644 --- a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/ApiClient.java +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/ApiClient.java @@ -213,7 +213,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/0.0.240626/java"); + setUserAgent("OpenAPI-Generator/0.0.240731/java"); authentications = new HashMap(); } diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/JSON.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/JSON.java index 6162ec28..84a5c489 100644 --- a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/JSON.java +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/JSON.java @@ -253,6 +253,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.CreateCouponRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.CreateCouponResource.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.CreateImageSlide.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.CreateProductFilterRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.CreateProductSetRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.Creative.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.CreativeListResponse.CustomTypeAdapterFactory()); @@ -380,6 +381,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ProblemDetails.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ProblemsDetails.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.Product.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ProductFilterConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ProductImporterError.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ProductImporterWarning.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ProductSet.CustomTypeAdapterFactory()); @@ -456,9 +458,14 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.UserDef.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.UserProfileAttributeModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.UserProfileIdentifierModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ValueResourceCollectionOutcomeOfProductFilterConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ValueResourceInputOfCreateProductFilterRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ValueResourceInputOfCreateProductSetRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ValueResourceOfAdvertiserCreationInput.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ValueResourceOfCreateProductFilterRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ValueResourceOfCreateProductSetRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ValueResourceOfProductFilterConfig.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.ValueResourceOutcomeOfProductFilterConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.VideoDetail.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.WriteModelAdSetId.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.marketingsolutions.preview.model.WriteModelPatchAdSetV24Q1.CustomTypeAdapterFactory()); diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/api/RecoApi.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/api/RecoApi.java index c87ca0cb..d87487cd 100644 --- a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/api/RecoApi.java +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/api/RecoApi.java @@ -30,7 +30,10 @@ import com.criteo.api.marketingsolutions.preview.model.Outcome; import com.criteo.api.marketingsolutions.preview.model.ResourceCollectionOutcomeOfProductSet; import com.criteo.api.marketingsolutions.preview.model.ResourceOutcomeOfProductSet; +import com.criteo.api.marketingsolutions.preview.model.ValueResourceCollectionOutcomeOfProductFilterConfig; +import com.criteo.api.marketingsolutions.preview.model.ValueResourceInputOfCreateProductFilterRequest; import com.criteo.api.marketingsolutions.preview.model.ValueResourceInputOfCreateProductSetRequest; +import com.criteo.api.marketingsolutions.preview.model.ValueResourceOutcomeOfProductFilterConfig; import java.lang.reflect.Type; import java.util.ArrayList; @@ -215,6 +218,554 @@ public okhttp3.Call createProductSetAsync(ValueResourceInputOfCreateProductSetRe localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for disableProductFiltering + * @param adId ID of the ad (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Operation failure -
403 Operation failure -
404 Operation failure -
409 Operation failure -
+ */ + public okhttp3.Call disableProductFilteringCall(String adId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/preview/ads/{ad-id}/product-filter" + .replace("{" + "ad-id" + "}", localVarApiClient.escapeString(adId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call disableProductFilteringValidateBeforeCall(String adId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'adId' is set + if (adId == null) { + throw new ApiException("Missing the required parameter 'adId' when calling disableProductFiltering(Async)"); + } + + return disableProductFilteringCall(adId, _callback); + + } + + /** + * + * Disable product filtering for a given ad + * @param adId ID of the ad (required) + * @return ValueResourceOutcomeOfProductFilterConfig + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Operation failure -
403 Operation failure -
404 Operation failure -
409 Operation failure -
+ */ + public ValueResourceOutcomeOfProductFilterConfig disableProductFiltering(String adId) throws ApiException { + ApiResponse localVarResp = disableProductFilteringWithHttpInfo(adId); + return localVarResp.getData(); + } + + /** + * + * Disable product filtering for a given ad + * @param adId ID of the ad (required) + * @return ApiResponse<ValueResourceOutcomeOfProductFilterConfig> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Operation failure -
403 Operation failure -
404 Operation failure -
409 Operation failure -
+ */ + public ApiResponse disableProductFilteringWithHttpInfo(String adId) throws ApiException { + okhttp3.Call localVarCall = disableProductFilteringValidateBeforeCall(adId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Disable product filtering for a given ad + * @param adId ID of the ad (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Successful operation -
400 Operation failure -
403 Operation failure -
404 Operation failure -
409 Operation failure -
+ */ + public okhttp3.Call disableProductFilteringAsync(String adId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = disableProductFilteringValidateBeforeCall(adId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for enableProductFiltering + * @param adId ID of the ad (required) + * @param valueResourceInputOfCreateProductFilterRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Operation failure -
403 Operation failure -
+ */ + public okhttp3.Call enableProductFilteringCall(String adId, ValueResourceInputOfCreateProductFilterRequest valueResourceInputOfCreateProductFilterRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = valueResourceInputOfCreateProductFilterRequest; + + // create path and map variables + String localVarPath = "/preview/ads/{ad-id}/product-filter" + .replace("{" + "ad-id" + "}", localVarApiClient.escapeString(adId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call enableProductFilteringValidateBeforeCall(String adId, ValueResourceInputOfCreateProductFilterRequest valueResourceInputOfCreateProductFilterRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'adId' is set + if (adId == null) { + throw new ApiException("Missing the required parameter 'adId' when calling enableProductFiltering(Async)"); + } + + return enableProductFilteringCall(adId, valueResourceInputOfCreateProductFilterRequest, _callback); + + } + + /** + * + * Enable product filtering for a given ad + * @param adId ID of the ad (required) + * @param valueResourceInputOfCreateProductFilterRequest (optional) + * @return ValueResourceOutcomeOfProductFilterConfig + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Operation failure -
403 Operation failure -
+ */ + public ValueResourceOutcomeOfProductFilterConfig enableProductFiltering(String adId, ValueResourceInputOfCreateProductFilterRequest valueResourceInputOfCreateProductFilterRequest) throws ApiException { + ApiResponse localVarResp = enableProductFilteringWithHttpInfo(adId, valueResourceInputOfCreateProductFilterRequest); + return localVarResp.getData(); + } + + /** + * + * Enable product filtering for a given ad + * @param adId ID of the ad (required) + * @param valueResourceInputOfCreateProductFilterRequest (optional) + * @return ApiResponse<ValueResourceOutcomeOfProductFilterConfig> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Operation failure -
403 Operation failure -
+ */ + public ApiResponse enableProductFilteringWithHttpInfo(String adId, ValueResourceInputOfCreateProductFilterRequest valueResourceInputOfCreateProductFilterRequest) throws ApiException { + okhttp3.Call localVarCall = enableProductFilteringValidateBeforeCall(adId, valueResourceInputOfCreateProductFilterRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Enable product filtering for a given ad + * @param adId ID of the ad (required) + * @param valueResourceInputOfCreateProductFilterRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Operation failure -
403 Operation failure -
+ */ + public okhttp3.Call enableProductFilteringAsync(String adId, ValueResourceInputOfCreateProductFilterRequest valueResourceInputOfCreateProductFilterRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = enableProductFilteringValidateBeforeCall(adId, valueResourceInputOfCreateProductFilterRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchProductFilteringConfig + * @param adId ID of the ad (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful operation. Returns the product filtering configuration if it exists, or empty data if it doesn't. -
400 Operation failure -
403 Operation failure -
+ */ + public okhttp3.Call fetchProductFilteringConfigCall(String adId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/preview/ads/{ad-id}/product-filter" + .replace("{" + "ad-id" + "}", localVarApiClient.escapeString(adId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchProductFilteringConfigValidateBeforeCall(String adId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'adId' is set + if (adId == null) { + throw new ApiException("Missing the required parameter 'adId' when calling fetchProductFilteringConfig(Async)"); + } + + return fetchProductFilteringConfigCall(adId, _callback); + + } + + /** + * + * Fetch product filtering configuration for a given ad + * @param adId ID of the ad (required) + * @return ValueResourceOutcomeOfProductFilterConfig + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful operation. Returns the product filtering configuration if it exists, or empty data if it doesn't. -
400 Operation failure -
403 Operation failure -
+ */ + public ValueResourceOutcomeOfProductFilterConfig fetchProductFilteringConfig(String adId) throws ApiException { + ApiResponse localVarResp = fetchProductFilteringConfigWithHttpInfo(adId); + return localVarResp.getData(); + } + + /** + * + * Fetch product filtering configuration for a given ad + * @param adId ID of the ad (required) + * @return ApiResponse<ValueResourceOutcomeOfProductFilterConfig> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful operation. Returns the product filtering configuration if it exists, or empty data if it doesn't. -
400 Operation failure -
403 Operation failure -
+ */ + public ApiResponse fetchProductFilteringConfigWithHttpInfo(String adId) throws ApiException { + okhttp3.Call localVarCall = fetchProductFilteringConfigValidateBeforeCall(adId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Fetch product filtering configuration for a given ad + * @param adId ID of the ad (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Successful operation. Returns the product filtering configuration if it exists, or empty data if it doesn't. -
400 Operation failure -
403 Operation failure -
+ */ + public okhttp3.Call fetchProductFilteringConfigAsync(String adId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchProductFilteringConfigValidateBeforeCall(adId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for fetchProductFilteringUsages + * @param productSetId ID of the product set (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Operation failure -
403 Operation failure -
+ */ + public okhttp3.Call fetchProductFilteringUsagesCall(String productSetId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/preview/product-sets/{product-set-id}/product-filters" + .replace("{" + "product-set-id" + "}", localVarApiClient.escapeString(productSetId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call fetchProductFilteringUsagesValidateBeforeCall(String productSetId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'productSetId' is set + if (productSetId == null) { + throw new ApiException("Missing the required parameter 'productSetId' when calling fetchProductFilteringUsages(Async)"); + } + + return fetchProductFilteringUsagesCall(productSetId, _callback); + + } + + /** + * + * Fetch product filtering usages for a given product set + * @param productSetId ID of the product set (required) + * @return ValueResourceCollectionOutcomeOfProductFilterConfig + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Operation failure -
403 Operation failure -
+ */ + public ValueResourceCollectionOutcomeOfProductFilterConfig fetchProductFilteringUsages(String productSetId) throws ApiException { + ApiResponse localVarResp = fetchProductFilteringUsagesWithHttpInfo(productSetId); + return localVarResp.getData(); + } + + /** + * + * Fetch product filtering usages for a given product set + * @param productSetId ID of the product set (required) + * @return ApiResponse<ValueResourceCollectionOutcomeOfProductFilterConfig> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Operation failure -
403 Operation failure -
+ */ + public ApiResponse fetchProductFilteringUsagesWithHttpInfo(String productSetId) throws ApiException { + okhttp3.Call localVarCall = fetchProductFilteringUsagesValidateBeforeCall(productSetId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Fetch product filtering usages for a given product set + * @param productSetId ID of the product set (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful operation -
400 Operation failure -
403 Operation failure -
+ */ + public okhttp3.Call fetchProductFilteringUsagesAsync(String productSetId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = fetchProductFilteringUsagesValidateBeforeCall(productSetId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for fetchProductSet * @param productSetId ID of the product set (required) diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ApplicationSummaryModel.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ApplicationSummaryModel.java index addce528..c1450c10 100644 --- a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ApplicationSummaryModel.java +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ApplicationSummaryModel.java @@ -45,7 +45,7 @@ import com.criteo.api.marketingsolutions.preview.JSON; /** - * Model of ApplicationSummary + * Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModel { diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ApplicationSummaryModelResource.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ApplicationSummaryModelResource.java index 26d4f36e..fc3c1d22 100644 --- a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ApplicationSummaryModelResource.java +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ApplicationSummaryModelResource.java @@ -46,7 +46,7 @@ import com.criteo.api.marketingsolutions.preview.JSON; /** - * A class that represents a ValueType in a guild compliant way + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResource { diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ApplicationSummaryModelResponse.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ApplicationSummaryModelResponse.java index 61cfb427..16cd158b 100644 --- a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ApplicationSummaryModelResponse.java +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ApplicationSummaryModelResponse.java @@ -49,7 +49,7 @@ import com.criteo.api.marketingsolutions.preview.JSON; /** - * Response of ApplicationSummaryModel + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResponse { diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/CommonProblem.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/CommonProblem.java index a65a8873..5fb34506 100644 --- a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/CommonProblem.java +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/CommonProblem.java @@ -47,7 +47,7 @@ import com.criteo.api.marketingsolutions.preview.JSON; /** - * Common problem object. Can be specialized as needed. + * Common problem object. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CommonProblem { @@ -222,7 +222,7 @@ public CommonProblem code(String code) { } /** - * A machine-readable error code, expressed as a string value. + * A machine-readable error code, expressed as a string value. * @return code **/ @javax.annotation.Nullable diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ContactlistAmendmentAttributes.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ContactlistAmendmentAttributes.java index 035bda3b..75b9084b 100644 --- a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ContactlistAmendmentAttributes.java +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ContactlistAmendmentAttributes.java @@ -115,7 +115,9 @@ public enum IdentifierTypeEnum { GUM("gum"), - CUSTOMERID("customerid"); + CUSTOMERID("customerid"), + + PHONENUMBER("phoneNumber"); private String value; diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ContactlistWithAttributesAmendmentAttributes.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ContactlistWithAttributesAmendmentAttributes.java index 158f6192..61876e70 100644 --- a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ContactlistWithAttributesAmendmentAttributes.java +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ContactlistWithAttributesAmendmentAttributes.java @@ -116,7 +116,9 @@ public enum IdentifierTypeEnum { GUM("gum"), - CUSTOMERID("customerid"); + CUSTOMERID("customerid"), + + PHONENUMBER("phoneNumber"); private String value; diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/CreateProductFilterRequest.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/CreateProductFilterRequest.java new file mode 100644 index 00000000..3a3d9fbc --- /dev/null +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/CreateProductFilterRequest.java @@ -0,0 +1,292 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.preview.JSON; + +/** + * Encapsulate the parameters needed to enable product filtering + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateProductFilterRequest { + public static final String SERIALIZED_NAME_PRODUCT_SET_ID = "productSetId"; + @SerializedName(SERIALIZED_NAME_PRODUCT_SET_ID) + private String productSetId; + + public CreateProductFilterRequest() { + } + + public CreateProductFilterRequest productSetId(String productSetId) { + + this.productSetId = productSetId; + return this; + } + + /** + * Get productSetId + * @return productSetId + **/ + @javax.annotation.Nullable + + public String getProductSetId() { + return productSetId; + } + + + public void setProductSetId(String productSetId) { + this.productSetId = productSetId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateProductFilterRequest instance itself + */ + public CreateProductFilterRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateProductFilterRequest createProductFilterRequest = (CreateProductFilterRequest) o; + return Objects.equals(this.productSetId, createProductFilterRequest.productSetId)&& + Objects.equals(this.additionalProperties, createProductFilterRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(productSetId, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateProductFilterRequest {\n"); + sb.append(" productSetId: ").append(toIndentedString(productSetId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("productSetId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateProductFilterRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateProductFilterRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateProductFilterRequest is not found in the empty JSON string", CreateProductFilterRequest.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("productSetId") != null && !jsonObj.get("productSetId").isJsonNull()) && !jsonObj.get("productSetId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productSetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productSetId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateProductFilterRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateProductFilterRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateProductFilterRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateProductFilterRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateProductFilterRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateProductFilterRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateProductFilterRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateProductFilterRequest + * @throws IOException if the JSON string is invalid with respect to CreateProductFilterRequest + */ + public static CreateProductFilterRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateProductFilterRequest.class); + } + + /** + * Convert an instance of CreateProductFilterRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudience.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ProductFilterConfig.java similarity index 67% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudience.java rename to sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ProductFilterConfig.java index d222c01c..aa3e704b 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudience.java +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ProductFilterConfig.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - MarketingSolutions * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: Preview * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,10 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.marketingsolutions.preview.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceNameDescription; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,65 +41,65 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.marketingsolutions.preview.JSON; /** - * Parameters required to replace an audience + * Entity to create a product filter configuration */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReplaceAudience { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; +public class ProductFilterConfig { + public static final String SERIALIZED_NAME_AD_ID = "adId"; + @SerializedName(SERIALIZED_NAME_AD_ID) + private String adId; - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private AudienceNameDescription attributes; + public static final String SERIALIZED_NAME_PRODUCT_SET_ID = "productSetId"; + @SerializedName(SERIALIZED_NAME_PRODUCT_SET_ID) + private String productSetId; - public ReplaceAudience() { + public ProductFilterConfig() { } - public ReplaceAudience type(String type) { + public ProductFilterConfig adId(String adId) { - this.type = type; + this.adId = adId; return this; } /** - * the name of the entity type - * @return type + * Get adId + * @return adId **/ @javax.annotation.Nonnull - public String getType() { - return type; + public String getAdId() { + return adId; } - public void setType(String type) { - this.type = type; + public void setAdId(String adId) { + this.adId = adId; } - public ReplaceAudience attributes(AudienceNameDescription attributes) { + public ProductFilterConfig productSetId(String productSetId) { - this.attributes = attributes; + this.productSetId = productSetId; return this; } /** - * Get attributes - * @return attributes + * Get productSetId + * @return productSetId **/ @javax.annotation.Nonnull - public AudienceNameDescription getAttributes() { - return attributes; + public String getProductSetId() { + return productSetId; } - public void setAttributes(AudienceNameDescription attributes) { - this.attributes = attributes; + public void setProductSetId(String productSetId) { + this.productSetId = productSetId; } /** @@ -116,9 +115,9 @@ public void setAttributes(AudienceNameDescription attributes) { * * @param key name of the property * @param value value of the property - * @return the ReplaceAudience instance itself + * @return the ProductFilterConfig instance itself */ - public ReplaceAudience putAdditionalProperty(String key, Object value) { + public ProductFilterConfig putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -157,23 +156,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReplaceAudience replaceAudience = (ReplaceAudience) o; - return Objects.equals(this.type, replaceAudience.type) && - Objects.equals(this.attributes, replaceAudience.attributes)&& - Objects.equals(this.additionalProperties, replaceAudience.additionalProperties); + ProductFilterConfig productFilterConfig = (ProductFilterConfig) o; + return Objects.equals(this.adId, productFilterConfig.adId) && + Objects.equals(this.productSetId, productFilterConfig.productSetId)&& + Objects.equals(this.additionalProperties, productFilterConfig.additionalProperties); } @Override public int hashCode() { - return Objects.hash(type, attributes, additionalProperties); + return Objects.hash(adId, productSetId, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ReplaceAudience {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("class ProductFilterConfig {\n"); + sb.append(" adId: ").append(toIndentedString(adId)).append("\n"); + sb.append(" productSetId: ").append(toIndentedString(productSetId)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -197,55 +196,56 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("attributes"); + openapiFields.add("adId"); + openapiFields.add("productSetId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("attributes"); + openapiRequiredFields.add("adId"); + openapiRequiredFields.add("productSetId"); } /** * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReplaceAudience + * @throws IOException if the JSON Object is invalid with respect to ProductFilterConfig */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!ReplaceAudience.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReplaceAudience is not found in the empty JSON string", ReplaceAudience.openapiRequiredFields.toString())); + if (!ProductFilterConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ProductFilterConfig is not found in the empty JSON string", ProductFilterConfig.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReplaceAudience.openapiRequiredFields) { + for (String requiredField : ProductFilterConfig.openapiRequiredFields) { if (jsonObj.get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + if (!jsonObj.get("adId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `adId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("adId").toString())); + } + if (!jsonObj.get("productSetId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `productSetId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productSetId").toString())); } - // validate the required field `attributes` - AudienceNameDescription.validateJsonObject(jsonObj.getAsJsonObject("attributes")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReplaceAudience.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReplaceAudience' and its subtypes + if (!ProductFilterConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ProductFilterConfig' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReplaceAudience.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ProductFilterConfig.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ReplaceAudience value) throws IOException { + public void write(JsonWriter out, ProductFilterConfig value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -268,11 +268,11 @@ else if (entry.getValue() instanceof Character) } @Override - public ReplaceAudience read(JsonReader in) throws IOException { + public ProductFilterConfig read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - ReplaceAudience instance = thisAdapter.fromJsonTree(jsonObj); + ProductFilterConfig instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -299,18 +299,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ReplaceAudience given an JSON string + * Create an instance of ProductFilterConfig given an JSON string * * @param jsonString JSON string - * @return An instance of ReplaceAudience - * @throws IOException if the JSON string is invalid with respect to ReplaceAudience + * @return An instance of ProductFilterConfig + * @throws IOException if the JSON string is invalid with respect to ProductFilterConfig */ - public static ReplaceAudience fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReplaceAudience.class); + public static ProductFilterConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ProductFilterConfig.class); } /** - * Convert an instance of ReplaceAudience to an JSON string + * Convert an instance of ProductFilterConfig to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceCollectionOutcomeOfProductFilterConfig.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceCollectionOutcomeOfProductFilterConfig.java new file mode 100644 index 00000000..2f87dad0 --- /dev/null +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceCollectionOutcomeOfProductFilterConfig.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.preview.model.CommonProblem; +import com.criteo.api.marketingsolutions.preview.model.ValueResourceOfProductFilterConfig; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several values. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ValueResourceCollectionOutcomeOfProductFilterConfig { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public ValueResourceCollectionOutcomeOfProductFilterConfig() { + } + + + public ValueResourceCollectionOutcomeOfProductFilterConfig( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public ValueResourceCollectionOutcomeOfProductFilterConfig data(List data) { + + this.data = data; + return this; + } + + public ValueResourceCollectionOutcomeOfProductFilterConfig addDataItem(ValueResourceOfProductFilterConfig dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ValueResourceCollectionOutcomeOfProductFilterConfig instance itself + */ + public ValueResourceCollectionOutcomeOfProductFilterConfig putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValueResourceCollectionOutcomeOfProductFilterConfig valueResourceCollectionOutcomeOfProductFilterConfig = (ValueResourceCollectionOutcomeOfProductFilterConfig) o; + return Objects.equals(this.data, valueResourceCollectionOutcomeOfProductFilterConfig.data) && + Objects.equals(this.warnings, valueResourceCollectionOutcomeOfProductFilterConfig.warnings) && + Objects.equals(this.errors, valueResourceCollectionOutcomeOfProductFilterConfig.errors)&& + Objects.equals(this.additionalProperties, valueResourceCollectionOutcomeOfProductFilterConfig.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValueResourceCollectionOutcomeOfProductFilterConfig {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ValueResourceCollectionOutcomeOfProductFilterConfig + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ValueResourceCollectionOutcomeOfProductFilterConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValueResourceCollectionOutcomeOfProductFilterConfig is not found in the empty JSON string", ValueResourceCollectionOutcomeOfProductFilterConfig.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ValueResourceOfProductFilterConfig.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValueResourceCollectionOutcomeOfProductFilterConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValueResourceCollectionOutcomeOfProductFilterConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValueResourceCollectionOutcomeOfProductFilterConfig.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValueResourceCollectionOutcomeOfProductFilterConfig value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ValueResourceCollectionOutcomeOfProductFilterConfig read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ValueResourceCollectionOutcomeOfProductFilterConfig instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValueResourceCollectionOutcomeOfProductFilterConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValueResourceCollectionOutcomeOfProductFilterConfig + * @throws IOException if the JSON string is invalid with respect to ValueResourceCollectionOutcomeOfProductFilterConfig + */ + public static ValueResourceCollectionOutcomeOfProductFilterConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValueResourceCollectionOutcomeOfProductFilterConfig.class); + } + + /** + * Convert an instance of ValueResourceCollectionOutcomeOfProductFilterConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceInputOfCreateProductFilterRequest.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceInputOfCreateProductFilterRequest.java new file mode 100644 index 00000000..bb2522e8 --- /dev/null +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceInputOfCreateProductFilterRequest.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.preview.model.ValueResourceOfCreateProductFilterRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API request for a single value. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ValueResourceInputOfCreateProductFilterRequest { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ValueResourceOfCreateProductFilterRequest data; + + public ValueResourceInputOfCreateProductFilterRequest() { + } + + public ValueResourceInputOfCreateProductFilterRequest data(ValueResourceOfCreateProductFilterRequest data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ValueResourceOfCreateProductFilterRequest getData() { + return data; + } + + + public void setData(ValueResourceOfCreateProductFilterRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ValueResourceInputOfCreateProductFilterRequest instance itself + */ + public ValueResourceInputOfCreateProductFilterRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValueResourceInputOfCreateProductFilterRequest valueResourceInputOfCreateProductFilterRequest = (ValueResourceInputOfCreateProductFilterRequest) o; + return Objects.equals(this.data, valueResourceInputOfCreateProductFilterRequest.data)&& + Objects.equals(this.additionalProperties, valueResourceInputOfCreateProductFilterRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValueResourceInputOfCreateProductFilterRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ValueResourceInputOfCreateProductFilterRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ValueResourceInputOfCreateProductFilterRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValueResourceInputOfCreateProductFilterRequest is not found in the empty JSON string", ValueResourceInputOfCreateProductFilterRequest.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ValueResourceOfCreateProductFilterRequest.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValueResourceInputOfCreateProductFilterRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValueResourceInputOfCreateProductFilterRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValueResourceInputOfCreateProductFilterRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValueResourceInputOfCreateProductFilterRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ValueResourceInputOfCreateProductFilterRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ValueResourceInputOfCreateProductFilterRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValueResourceInputOfCreateProductFilterRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValueResourceInputOfCreateProductFilterRequest + * @throws IOException if the JSON string is invalid with respect to ValueResourceInputOfCreateProductFilterRequest + */ + public static ValueResourceInputOfCreateProductFilterRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValueResourceInputOfCreateProductFilterRequest.class); + } + + /** + * Convert an instance of ValueResourceInputOfCreateProductFilterRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOfCreateProductFilterRequest.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOfCreateProductFilterRequest.java new file mode 100644 index 00000000..e02f44f5 --- /dev/null +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOfCreateProductFilterRequest.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.preview.model.CreateProductFilterRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ValueResourceOfCreateProductFilterRequest { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CreateProductFilterRequest attributes; + + public ValueResourceOfCreateProductFilterRequest() { + } + + public ValueResourceOfCreateProductFilterRequest type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public ValueResourceOfCreateProductFilterRequest attributes(CreateProductFilterRequest attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public CreateProductFilterRequest getAttributes() { + return attributes; + } + + + public void setAttributes(CreateProductFilterRequest attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ValueResourceOfCreateProductFilterRequest instance itself + */ + public ValueResourceOfCreateProductFilterRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValueResourceOfCreateProductFilterRequest valueResourceOfCreateProductFilterRequest = (ValueResourceOfCreateProductFilterRequest) o; + return Objects.equals(this.type, valueResourceOfCreateProductFilterRequest.type) && + Objects.equals(this.attributes, valueResourceOfCreateProductFilterRequest.attributes)&& + Objects.equals(this.additionalProperties, valueResourceOfCreateProductFilterRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValueResourceOfCreateProductFilterRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ValueResourceOfCreateProductFilterRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ValueResourceOfCreateProductFilterRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValueResourceOfCreateProductFilterRequest is not found in the empty JSON string", ValueResourceOfCreateProductFilterRequest.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + CreateProductFilterRequest.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValueResourceOfCreateProductFilterRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValueResourceOfCreateProductFilterRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValueResourceOfCreateProductFilterRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValueResourceOfCreateProductFilterRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ValueResourceOfCreateProductFilterRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ValueResourceOfCreateProductFilterRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValueResourceOfCreateProductFilterRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValueResourceOfCreateProductFilterRequest + * @throws IOException if the JSON string is invalid with respect to ValueResourceOfCreateProductFilterRequest + */ + public static ValueResourceOfCreateProductFilterRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValueResourceOfCreateProductFilterRequest.class); + } + + /** + * Convert an instance of ValueResourceOfCreateProductFilterRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOfProductFilterConfig.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOfProductFilterConfig.java new file mode 100644 index 00000000..51934b55 --- /dev/null +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOfProductFilterConfig.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.preview.model.ProductFilterConfig; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ValueResourceOfProductFilterConfig { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private ProductFilterConfig attributes; + + public ValueResourceOfProductFilterConfig() { + } + + public ValueResourceOfProductFilterConfig type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public ValueResourceOfProductFilterConfig attributes(ProductFilterConfig attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public ProductFilterConfig getAttributes() { + return attributes; + } + + + public void setAttributes(ProductFilterConfig attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ValueResourceOfProductFilterConfig instance itself + */ + public ValueResourceOfProductFilterConfig putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValueResourceOfProductFilterConfig valueResourceOfProductFilterConfig = (ValueResourceOfProductFilterConfig) o; + return Objects.equals(this.type, valueResourceOfProductFilterConfig.type) && + Objects.equals(this.attributes, valueResourceOfProductFilterConfig.attributes)&& + Objects.equals(this.additionalProperties, valueResourceOfProductFilterConfig.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValueResourceOfProductFilterConfig {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ValueResourceOfProductFilterConfig + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ValueResourceOfProductFilterConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValueResourceOfProductFilterConfig is not found in the empty JSON string", ValueResourceOfProductFilterConfig.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + ProductFilterConfig.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValueResourceOfProductFilterConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValueResourceOfProductFilterConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValueResourceOfProductFilterConfig.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValueResourceOfProductFilterConfig value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ValueResourceOfProductFilterConfig read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ValueResourceOfProductFilterConfig instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValueResourceOfProductFilterConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValueResourceOfProductFilterConfig + * @throws IOException if the JSON string is invalid with respect to ValueResourceOfProductFilterConfig + */ + public static ValueResourceOfProductFilterConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValueResourceOfProductFilterConfig.class); + } + + /** + * Convert an instance of ValueResourceOfProductFilterConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOutcomeOfProductFilterConfig.java b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOutcomeOfProductFilterConfig.java new file mode 100644 index 00000000..cd876cb6 --- /dev/null +++ b/sdks/marketingsolutions_preview/src/main/java/com/criteo/api/marketingsolutions/preview/model/ValueResourceOutcomeOfProductFilterConfig.java @@ -0,0 +1,375 @@ +/* + * Criteo API + * Criteo API - MarketingSolutions + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.marketingsolutions.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.marketingsolutions.preview.model.CommonProblem; +import com.criteo.api.marketingsolutions.preview.model.ValueResourceOfProductFilterConfig; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.marketingsolutions.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ValueResourceOutcomeOfProductFilterConfig { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ValueResourceOfProductFilterConfig data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public ValueResourceOutcomeOfProductFilterConfig() { + } + + + public ValueResourceOutcomeOfProductFilterConfig( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public ValueResourceOutcomeOfProductFilterConfig data(ValueResourceOfProductFilterConfig data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ValueResourceOfProductFilterConfig getData() { + return data; + } + + + public void setData(ValueResourceOfProductFilterConfig data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ValueResourceOutcomeOfProductFilterConfig instance itself + */ + public ValueResourceOutcomeOfProductFilterConfig putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValueResourceOutcomeOfProductFilterConfig valueResourceOutcomeOfProductFilterConfig = (ValueResourceOutcomeOfProductFilterConfig) o; + return Objects.equals(this.data, valueResourceOutcomeOfProductFilterConfig.data) && + Objects.equals(this.warnings, valueResourceOutcomeOfProductFilterConfig.warnings) && + Objects.equals(this.errors, valueResourceOutcomeOfProductFilterConfig.errors)&& + Objects.equals(this.additionalProperties, valueResourceOutcomeOfProductFilterConfig.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValueResourceOutcomeOfProductFilterConfig {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ValueResourceOutcomeOfProductFilterConfig + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ValueResourceOutcomeOfProductFilterConfig.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValueResourceOutcomeOfProductFilterConfig is not found in the empty JSON string", ValueResourceOutcomeOfProductFilterConfig.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ValueResourceOfProductFilterConfig.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValueResourceOutcomeOfProductFilterConfig.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValueResourceOutcomeOfProductFilterConfig' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValueResourceOutcomeOfProductFilterConfig.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValueResourceOutcomeOfProductFilterConfig value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ValueResourceOutcomeOfProductFilterConfig read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ValueResourceOutcomeOfProductFilterConfig instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValueResourceOutcomeOfProductFilterConfig given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValueResourceOutcomeOfProductFilterConfig + * @throws IOException if the JSON string is invalid with respect to ValueResourceOutcomeOfProductFilterConfig + */ + public static ValueResourceOutcomeOfProductFilterConfig fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValueResourceOutcomeOfProductFilterConfig.class); + } + + /** + * Convert an instance of ValueResourceOutcomeOfProductFilterConfig to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/.openapi-generator/FILES b/sdks/retailmedia_2023-04/.openapi-generator/FILES deleted file mode 100644 index da17c5f5..00000000 --- a/sdks/retailmedia_2023-04/.openapi-generator/FILES +++ /dev/null @@ -1,422 +0,0 @@ -.github/workflows/maven.yml -.gitignore -.openapi-generator-ignore -.travis.yml -README.md -api/openapi.yaml -build.gradle -build.sbt -docs/AddRemoveKeywordModel.md -docs/AddRemoveKeywordsModel.md -docs/AddRemoveKeywordsModelRequest.md -docs/AddRemoveKeywordsModelResource.md -docs/AddToBasketIdsUpdateModel202110Request.md -docs/AddToBasketTarget202110Request.md -docs/AddToBasketTarget202110Response.md -docs/AnalyticsApi.md -docs/ApplicationSummaryModel.md -docs/ApplicationSummaryModelResource.md -docs/ApplicationSummaryModelResponse.md -docs/ApprovalStatusModel.md -docs/Asset.md -docs/AssetResource.md -docs/AssetResponse.md -docs/AsyncCampaignsReport.md -docs/AsyncCampaignsReportRequest.md -docs/AsyncCampaignsReportResource.md -docs/AsyncLineItemsReport.md -docs/AsyncLineItemsReportRequest.md -docs/AsyncLineItemsReportResource.md -docs/AsyncReportResponse.md -docs/AuctionLineItemCreateModelRequest.md -docs/AuctionLineItemPagedListResponse.md -docs/AuctionLineItemResponse.md -docs/AuctionLineItemUpdateModelRequest.md -docs/AudienceApi.md -docs/AudienceIdsUpdateModel202110Request.md -docs/AudienceTarget202110Request.md -docs/AudienceTarget202110Response.md -docs/Balance202110PagedListResponse.md -docs/BalanceCampaign202110ListRequest.md -docs/BalanceCampaign202110PagedListResponse.md -docs/CampaignApi.md -docs/CampaignAttributesV202301.md -docs/CampaignV202301.md -docs/Category202204.md -docs/Category202204ListResponse.md -docs/ChoiceOption.md -docs/ChoiceVariableSpecification.md -docs/ChoiceVariableValue.md -docs/ColorVariableValue.md -docs/CommonError.md -docs/CommonLineItemPagedListResponse.md -docs/CommonLineItemResponse.md -docs/CommonProblem.md -docs/CommonWarning.md -docs/Creative202110.md -docs/Creative202110ListResponse.md -docs/Creative202210.md -docs/Creative202210ListResponse.md -docs/Creative202210Response.md -docs/CreativeCreateModel202207.md -docs/CreativeUpdateModel202207.md -docs/EditableCampaignAttributesV202301.md -docs/ExternalAccount.md -docs/ExternalAddToBasketIdsUpdateModel202110.md -docs/ExternalAddToBasketTarget202110.md -docs/ExternalAuctionLineItem.md -docs/ExternalAuctionLineItemCreateModel.md -docs/ExternalAuctionLineItemUpdateModel.md -docs/ExternalAudienceIdsUpdateModel202110.md -docs/ExternalAudienceTarget202110.md -docs/ExternalBalance202110.md -docs/ExternalBrand.md -docs/ExternalCatalogRequest.md -docs/ExternalCatalogStatus.md -docs/ExternalCommonLineItem.md -docs/ExternalKeywordTarget202110.md -docs/ExternalLineItemCapping202110.md -docs/ExternalLineItemPage202110.md -docs/ExternalLineItemPageCategory202110.md -docs/ExternalPreferredLineItem202110.md -docs/ExternalPreferredLineItemCreateModel202110.md -docs/ExternalPreferredLineItemUpdateModel202110.md -docs/ExternalPromotedProduct202110.md -docs/ExternalRetailer.md -docs/ExternalRetailerPages202110.md -docs/ExternalStoreIdsUpdateModel202110.md -docs/ExternalStoreTarget202110.md -docs/FilesVariableValue.md -docs/FilesVariablesSpecification.md -docs/GatewayApi.md -docs/HyperlinkVariableValue.md -docs/InputKeywordsModel.md -docs/InputResourceOfAuctionLineItemCreateModel.md -docs/InputResourceOfPreferredLineItemCreateModel202110.md -docs/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.md -docs/JsonApiBodyWithIdOfInt64AndAccountAndAccount.md -docs/JsonApiBodyWithIdOfInt64AndBrandAndBrand.md -docs/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.md -docs/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md -docs/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.md -docs/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md -docs/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.md -docs/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.md -docs/JsonApiPageResponseOfAccount.md -docs/JsonApiPageResponseOfBrand.md -docs/JsonApiPageResponseOfCampaignV202301.md -docs/JsonApiPageResponseOfRetailer.md -docs/JsonApiRequestOfCatalogRequest.md -docs/JsonApiSingleResponseOfCampaignV202301.md -docs/JsonApiSingleResponseOfCatalogStatus.md -docs/JsonApiSingleResponseOfLineItemBidMultipliers.md -docs/KeywordDataModel.md -docs/KeywordTarget202110Request.md -docs/KeywordTarget202110Response.md -docs/KeywordsModel.md -docs/KeywordsModelResource.md -docs/KeywordsModelResponse.md -docs/LineItemBidMultipliers.md -docs/LineItemBidMultipliersRequest.md -docs/LineItemBidMultipliersResponse.md -docs/MatchTypeModel.md -docs/NegotiationStateModel.md -docs/PageMetadata.md -docs/PageTypeEnvironment.md -docs/PostCampaignV202301.md -docs/PreferredLineItem202110PagedListResponse.md -docs/PreferredLineItem202110Response.md -docs/PreferredLineItemCreateModel202110Request.md -docs/PreferredLineItemUpdateModel202110Request.md -docs/ProblemDetails.md -docs/PromotedProduct202110ListRequest.md -docs/PromotedProduct202110PagedListResponse.md -docs/ProposalStatusModel.md -docs/ProposalStatusModelResource.md -docs/ProposalStatusModelResponse.md -docs/PutCampaignV202301.md -docs/ReportOutcome.md -docs/ResourceOfAuctionLineItem.md -docs/ResourceOfAuctionLineItemUpdateModel.md -docs/ResourceOfBalance202110.md -docs/ResourceOfBalanceCampaign202110.md -docs/ResourceOfCategory202204.md -docs/ResourceOfCommonLineItem.md -docs/ResourceOfCreative202110.md -docs/ResourceOfCreative202210.md -docs/ResourceOfLineItemBidMultipliers.md -docs/ResourceOfPreferredLineItem202110.md -docs/ResourceOfPreferredLineItemUpdateModel202110.md -docs/ResourceOfPromotedProduct202110.md -docs/ResourceOfTemplate.md -docs/ResourceOutcome.md -docs/ReviewStateModel.md -docs/RmLegacyAudienceCreateEntityV1.md -docs/RmLegacyAudienceCreateEntityV1Resource.md -docs/RmLegacyAudienceCreateEntityV1Response.md -docs/RmLegacyAudienceCreateEntityV2.md -docs/RmLegacyAudienceCreateEntityV2Resource.md -docs/RmLegacyAudienceCreateEntityV2Response.md -docs/RmLegacyAudienceCreateInputEntityV1.md -docs/RmLegacyAudienceCreateInputEntityV2.md -docs/RmLegacyAudienceGetEntityV1.md -docs/RmLegacyAudienceGetEntityV1ListResponse.md -docs/RmLegacyAudienceGetEntityV1Resource.md -docs/RmLegacyAudienceGetEntityV2.md -docs/RmLegacyAudienceGetEntityV2ListResponse.md -docs/RmLegacyAudienceGetEntityV2Resource.md -docs/RmLegacyAudienceUserBehaviorCreateV2.md -docs/RmLegacyAudienceUserBehaviorDetailsV2.md -docs/RmLegacySegmentCustomerList.md -docs/RmLegacySegmentUserBehaviorCreateV2.md -docs/RmLegacySegmentUserBehaviorV1.md -docs/RmLegacySegmentUserBehaviorV2.md -docs/RmcaCommonProblem.md -docs/Section.md -docs/SetBidModel.md -docs/SetBidsModel.md -docs/SetBidsModelRequest.md -docs/SetBidsModelResource.md -docs/StatusResponse.md -docs/StatusResponseResource.md -docs/StoreIdsUpdateModel202110Request.md -docs/StoreTarget202110Request.md -docs/StoreTarget202110Response.md -docs/Template.md -docs/TemplateListResponse.md -docs/TemplateResponse.md -docs/TemplateVariable.md -docs/TemplateVariableValue.md -docs/TextVariableSpecification.md -docs/TextVariableValue.md -docs/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.md -docs/ValueTypeResourceOfAddToBasketTarget202110.md -docs/ValueTypeResourceOfAudienceIdsUpdateModel202110.md -docs/ValueTypeResourceOfAudienceTarget202110.md -docs/ValueTypeResourceOfKeywordTarget202110.md -docs/ValueTypeResourceOfStoreIdsUpdateModel202110.md -docs/ValueTypeResourceOfStoreTarget202110.md -git_push.sh -gradle.properties -gradle/wrapper/gradle-wrapper.jar -gradle/wrapper/gradle-wrapper.properties -gradlew -gradlew.bat -pom.xml -settings.gradle -src/main/AndroidManifest.xml -src/main/java/com/criteo/api/retailmedia/v2023_04/ApiCallback.java -src/main/java/com/criteo/api/retailmedia/v2023_04/ApiClient.java -src/main/java/com/criteo/api/retailmedia/v2023_04/ApiClientBuilder.java -src/main/java/com/criteo/api/retailmedia/v2023_04/ApiException.java -src/main/java/com/criteo/api/retailmedia/v2023_04/ApiResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/Configuration.java -src/main/java/com/criteo/api/retailmedia/v2023_04/GzipRequestInterceptor.java -src/main/java/com/criteo/api/retailmedia/v2023_04/JSON.java -src/main/java/com/criteo/api/retailmedia/v2023_04/Pair.java -src/main/java/com/criteo/api/retailmedia/v2023_04/ProgressRequestBody.java -src/main/java/com/criteo/api/retailmedia/v2023_04/ProgressResponseBody.java -src/main/java/com/criteo/api/retailmedia/v2023_04/ServerConfiguration.java -src/main/java/com/criteo/api/retailmedia/v2023_04/ServerVariable.java -src/main/java/com/criteo/api/retailmedia/v2023_04/StringUtil.java -src/main/java/com/criteo/api/retailmedia/v2023_04/api/AnalyticsApi.java -src/main/java/com/criteo/api/retailmedia/v2023_04/api/AudienceApi.java -src/main/java/com/criteo/api/retailmedia/v2023_04/api/CampaignApi.java -src/main/java/com/criteo/api/retailmedia/v2023_04/api/GatewayApi.java -src/main/java/com/criteo/api/retailmedia/v2023_04/auth/ApiKeyAuth.java -src/main/java/com/criteo/api/retailmedia/v2023_04/auth/Authentication.java -src/main/java/com/criteo/api/retailmedia/v2023_04/auth/HttpBasicAuth.java -src/main/java/com/criteo/api/retailmedia/v2023_04/auth/HttpBearerAuth.java -src/main/java/com/criteo/api/retailmedia/v2023_04/auth/OAuth.java -src/main/java/com/criteo/api/retailmedia/v2023_04/auth/OAuthFlow.java -src/main/java/com/criteo/api/retailmedia/v2023_04/auth/OAuthOkHttpClient.java -src/main/java/com/criteo/api/retailmedia/v2023_04/auth/RetryingOAuth.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AbstractOpenApiSchema.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordsModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordsModelRequest.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordsModelResource.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddToBasketIdsUpdateModel202110Request.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddToBasketTarget202110Request.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddToBasketTarget202110Response.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApplicationSummaryModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApplicationSummaryModelResource.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApplicationSummaryModelResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApprovalStatusModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/Asset.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AssetResource.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AssetResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncCampaignsReport.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncCampaignsReportRequest.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncCampaignsReportResource.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncLineItemsReport.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncLineItemsReportRequest.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncLineItemsReportResource.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncReportResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemCreateModelRequest.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemPagedListResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemUpdateModelRequest.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AudienceIdsUpdateModel202110Request.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AudienceTarget202110Request.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/AudienceTarget202110Response.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/Balance202110PagedListResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/BalanceCampaign202110ListRequest.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/BalanceCampaign202110PagedListResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/CampaignAttributesV202301.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/CampaignV202301.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/Category202204.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/Category202204ListResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ChoiceOption.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ChoiceVariableSpecification.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ChoiceVariableValue.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ColorVariableValue.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonError.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonLineItemPagedListResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonLineItemResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonProblem.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonWarning.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202110ListResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202210.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202210ListResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202210Response.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/CreativeCreateModel202207.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/CreativeUpdateModel202207.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/EditableCampaignAttributesV202301.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAccount.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAddToBasketIdsUpdateModel202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAddToBasketTarget202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAuctionLineItem.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAuctionLineItemCreateModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAuctionLineItemUpdateModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAudienceIdsUpdateModel202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAudienceTarget202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalBalance202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalBrand.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalCatalogRequest.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalCatalogStatus.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalCommonLineItem.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalKeywordTarget202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalLineItemCapping202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalLineItemPage202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalLineItemPageCategory202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPreferredLineItem202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPreferredLineItemCreateModel202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPreferredLineItemUpdateModel202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPromotedProduct202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalRetailer.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalRetailerPages202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalStoreIdsUpdateModel202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalStoreTarget202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/FilesVariableValue.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/FilesVariablesSpecification.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/HyperlinkVariableValue.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/InputKeywordsModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/InputResourceOfAuctionLineItemCreateModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/InputResourceOfPreferredLineItemCreateModel202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndAccountAndAccount.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndBrandAndBrand.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfAccount.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfBrand.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfCampaignV202301.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfRetailer.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiRequestOfCatalogRequest.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiSingleResponseOfCampaignV202301.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiSingleResponseOfCatalogStatus.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiSingleResponseOfLineItemBidMultipliers.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordDataModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordTarget202110Request.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordTarget202110Response.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordsModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordsModelResource.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordsModelResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/LineItemBidMultipliers.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/LineItemBidMultipliersRequest.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/LineItemBidMultipliersResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/MatchTypeModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/NegotiationStateModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/PageMetadata.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/PageTypeEnvironment.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/PostCampaignV202301.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItem202110PagedListResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItem202110Response.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItemCreateModel202110Request.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItemUpdateModel202110Request.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProblemDetails.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/PromotedProduct202110ListRequest.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/PromotedProduct202110PagedListResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProposalStatusModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProposalStatusModelResource.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProposalStatusModelResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/PutCampaignV202301.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ReportOutcome.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfAuctionLineItem.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfAuctionLineItemUpdateModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfBalance202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfBalanceCampaign202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCategory202204.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCommonLineItem.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCreative202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCreative202210.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfLineItemBidMultipliers.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfPreferredLineItem202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfPreferredLineItemUpdateModel202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfPromotedProduct202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfTemplate.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOutcome.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ReviewStateModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV1.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV1Resource.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV1Response.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV2.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV2Resource.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV2Response.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateInputEntityV1.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateInputEntityV2.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV1.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV1ListResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV1Resource.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV2.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV2ListResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV2Resource.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceUserBehaviorCreateV2.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceUserBehaviorDetailsV2.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentCustomerList.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentUserBehaviorCreateV2.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentUserBehaviorV1.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentUserBehaviorV2.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmcaCommonProblem.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/Section.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidsModel.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidsModelRequest.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidsModelResource.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/StatusResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/StatusResponseResource.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/StoreIdsUpdateModel202110Request.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/StoreTarget202110Request.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/StoreTarget202110Response.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/Template.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateListResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateResponse.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateVariable.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateVariableValue.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/TextVariableSpecification.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/TextVariableValue.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAddToBasketTarget202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAudienceIdsUpdateModel202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAudienceTarget202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfKeywordTarget202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfStoreIdsUpdateModel202110.java -src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfStoreTarget202110.java -src/test/java/com/criteo/api/retailmedia/v2023_04/ExampleApplication.java -src/test/java/com/criteo/api/retailmedia/v2023_04/GatewayApiTest.java diff --git a/sdks/retailmedia_2023-04/docs/Balance202110PagedListResponse.md b/sdks/retailmedia_2023-04/docs/Balance202110PagedListResponse.md deleted file mode 100644 index ea0aab80..00000000 --- a/sdks/retailmedia_2023-04/docs/Balance202110PagedListResponse.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# Balance202110PagedListResponse - -Data model for a paged list of response resources - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | -|**data** | [**List<ResourceOfBalance202110>**](ResourceOfBalance202110.md) | | [optional] | -|**warnings** | [**List<ProblemDetails>**](ProblemDetails.md) | | [optional] [readonly] | -|**errors** | [**List<ProblemDetails>**](ProblemDetails.md) | | [optional] [readonly] | - - - diff --git a/sdks/retailmedia_2023-04/docs/ExternalBalance202110.md b/sdks/retailmedia_2023-04/docs/ExternalBalance202110.md deleted file mode 100644 index 0803d94e..00000000 --- a/sdks/retailmedia_2023-04/docs/ExternalBalance202110.md +++ /dev/null @@ -1,35 +0,0 @@ - - -# ExternalBalance202110 - -A Retail Media Balance used to determine the funds available for any or all campaigns in an account - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | | | -|**poNumber** | **String** | | | -|**memo** | **String** | | | -|**deposited** | **BigDecimal** | | | -|**spent** | **BigDecimal** | | | -|**remaining** | **BigDecimal** | | | -|**startDate** | **LocalDate** | Represents the Date as a year, month, and day in the format YYYY-MM-DD | | -|**endDate** | **LocalDate** | Represents the Date as a year, month, and day in the format YYYY-MM-DD | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | | | -|**createdAt** | **OffsetDateTime** | | | -|**updatedAt** | **OffsetDateTime** | | | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| UNKNOWN | "unknown" | -| SCHEDULED | "scheduled" | -| ACTIVE | "active" | -| ENDED | "ended" | - - - diff --git a/sdks/retailmedia_2023-07/.openapi-generator/FILES b/sdks/retailmedia_2023-07/.openapi-generator/FILES index b6b3853a..296bb2ab 100644 --- a/sdks/retailmedia_2023-07/.openapi-generator/FILES +++ b/sdks/retailmedia_2023-07/.openapi-generator/FILES @@ -6,6 +6,7 @@ README.md api/openapi.yaml build.gradle build.sbt +docs/AccountsApi.md docs/AddRemoveKeywordModel.md docs/AddRemoveKeywordsModel.md docs/AddRemoveKeywordsModelRequest.md @@ -37,6 +38,7 @@ docs/AudienceIdsUpdateModel202110Request.md docs/AudienceTarget202110Request.md docs/AudienceTarget202110Response.md docs/Balance202110PagedListResponse.md +docs/BalanceApi.md docs/BalanceCampaign202110ListRequest.md docs/BalanceCampaign202110PagedListResponse.md docs/CampaignApi.md @@ -219,8 +221,10 @@ src/main/java/com/criteo/api/retailmedia/v2023_07/ProgressResponseBody.java src/main/java/com/criteo/api/retailmedia/v2023_07/ServerConfiguration.java src/main/java/com/criteo/api/retailmedia/v2023_07/ServerVariable.java src/main/java/com/criteo/api/retailmedia/v2023_07/StringUtil.java +src/main/java/com/criteo/api/retailmedia/v2023_07/api/AccountsApi.java src/main/java/com/criteo/api/retailmedia/v2023_07/api/AnalyticsApi.java src/main/java/com/criteo/api/retailmedia/v2023_07/api/AudienceApi.java +src/main/java/com/criteo/api/retailmedia/v2023_07/api/BalanceApi.java src/main/java/com/criteo/api/retailmedia/v2023_07/api/CampaignApi.java src/main/java/com/criteo/api/retailmedia/v2023_07/api/GatewayApi.java src/main/java/com/criteo/api/retailmedia/v2023_07/auth/ApiKeyAuth.java diff --git a/sdks/retailmedia_2023-07/README.md b/sdks/retailmedia_2023-07/README.md index 2848847d..5a0e6235 100644 --- a/sdks/retailmedia_2023-07/README.md +++ b/sdks/retailmedia_2023-07/README.md @@ -8,7 +8,7 @@ More information: [https://developers.criteo.com/](https://developers.criteo.com Criteo API -- Package version: 2023.07.0.240626 +- Package version: 2023.07.0.240731 *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -38,7 +38,7 @@ Add this dependency to your project's POM: com.criteo criteo-api-retailmedia-sdk - 2023.07.0.240626 + 2023.07.0.240731 compile ``` @@ -48,7 +48,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.criteo:criteo-api-retailmedia-sdk:2023.07.0.240626" +compile "com.criteo:criteo-api-retailmedia-sdk:2023.07.0.240731" ``` ### Others @@ -61,7 +61,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* `build/libs/criteo-api-retailmedia-sdk-2023.07.0.240626.jar` +* `build/libs/criteo-api-retailmedia-sdk-2023.07.0.240731.jar` ## Example @@ -73,6 +73,7 @@ All URIs are relative to *https://api.criteo.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AccountsApi* | [**getApiV1ExternalAccounts**](docs/AccountsApi.md#getApiV1ExternalAccounts) | **GET** /2023-07/retail-media/accounts | *AnalyticsApi* | [**generateAsyncCampaignsReport**](docs/AnalyticsApi.md#generateAsyncCampaignsReport) | **POST** /2023-07/retail-media/reports/campaigns | *AnalyticsApi* | [**generateAsyncLineItemsReport**](docs/AnalyticsApi.md#generateAsyncLineItemsReport) | **POST** /2023-07/retail-media/reports/line-items | *AnalyticsApi* | [**getAsyncExportOutput**](docs/AnalyticsApi.md#getAsyncExportOutput) | **GET** /2023-07/retail-media/reports/{reportId}/output | @@ -81,14 +82,14 @@ Class | Method | HTTP request | Description *AudienceApi* | [**legacyGetAudienceV1**](docs/AudienceApi.md#legacyGetAudienceV1) | **GET** /2023-07/retail-media/accounts/{accountId}/audiences | *AudienceApi* | [**legacyGetAudienceV2**](docs/AudienceApi.md#legacyGetAudienceV2) | **GET** /2023-07/retail-media/v2/accounts/{accountId}/audiences | *AudienceApi* | [**legacyUpdateAudienceV2**](docs/AudienceApi.md#legacyUpdateAudienceV2) | **POST** /2023-07/retail-media/v2/accounts/{accountId}/audiences | +*BalanceApi* | [**getApi202110ExternalAccountBalancesByAccountId**](docs/BalanceApi.md#getApi202110ExternalAccountBalancesByAccountId) | **GET** /2023-07/retail-media/accounts/{account-id}/balances | +*BalanceApi* | [**getApi202110ExternalBalanceCampaignsByBalanceId**](docs/BalanceApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2023-07/retail-media/balances/{balance-id}/campaigns | *CampaignApi* | [**addRemoveKeywords**](docs/CampaignApi.md#addRemoveKeywords) | **POST** /2023-07/retail-media/line-items/{id}/keywords/add-remove | *CampaignApi* | [**createAsset**](docs/CampaignApi.md#createAsset) | **POST** /2023-07/retail-media/assets | *CampaignApi* | [**fetchKeywords**](docs/CampaignApi.md#fetchKeywords) | **GET** /2023-07/retail-media/line-items/{id}/keywords | *CampaignApi* | [**fetchProposal**](docs/CampaignApi.md#fetchProposal) | **GET** /2023-07/retail-media/preferred-deal-line-items/{id}/proposal | -*CampaignApi* | [**getApi202110ExternalAccountBalancesByAccountId**](docs/CampaignApi.md#getApi202110ExternalAccountBalancesByAccountId) | **GET** /2023-07/retail-media/accounts/{account-id}/balances | *CampaignApi* | [**getApi202110ExternalAccountCreativesByAccountId**](docs/CampaignApi.md#getApi202110ExternalAccountCreativesByAccountId) | **GET** /2023-07/retail-media/accounts/{account-id}/creatives | *CampaignApi* | [**getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId**](docs/CampaignApi.md#getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId) | **GET** /2023-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords | -*CampaignApi* | [**getApi202110ExternalBalanceCampaignsByBalanceId**](docs/CampaignApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2023-07/retail-media/balances/{balance-id}/campaigns | *CampaignApi* | [**getApi202110ExternalCampaignPreferredLineItemsByCampaignId**](docs/CampaignApi.md#getApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **GET** /2023-07/retail-media/campaigns/{campaign-id}/preferred-line-items | *CampaignApi* | [**getApi202110ExternalLineItemProductsByLineItemId**](docs/CampaignApi.md#getApi202110ExternalLineItemProductsByLineItemId) | **GET** /2023-07/retail-media/line-items/{line-item-id}/products | *CampaignApi* | [**getApi202110ExternalPreferredLineItemByLineItemId**](docs/CampaignApi.md#getApi202110ExternalPreferredLineItemByLineItemId) | **GET** /2023-07/retail-media/preferred-line-items/{line-item-id} | @@ -106,7 +107,6 @@ Class | Method | HTTP request | Description *CampaignApi* | [**getApi202301ExternalLineItemBidMultipliersByLineItemId**](docs/CampaignApi.md#getApi202301ExternalLineItemBidMultipliersByLineItemId) | **GET** /2023-07/retail-media/line-items/{line-item-id}/bid-multipliers | *CampaignApi* | [**getApiV1ExternalAccountBrandsByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /2023-07/retail-media/accounts/{accountId}/brands | *CampaignApi* | [**getApiV1ExternalAccountRetailersByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /2023-07/retail-media/accounts/{accountId}/retailers | -*CampaignApi* | [**getApiV1ExternalAccounts**](docs/CampaignApi.md#getApiV1ExternalAccounts) | **GET** /2023-07/retail-media/accounts | *CampaignApi* | [**getApiV1ExternalCatalogOutputByCatalogId**](docs/CampaignApi.md#getApiV1ExternalCatalogOutputByCatalogId) | **GET** /2023-07/retail-media/catalogs/{catalogId}/output | *CampaignApi* | [**getApiV1ExternalCatalogStatusByCatalogId**](docs/CampaignApi.md#getApiV1ExternalCatalogStatusByCatalogId) | **GET** /2023-07/retail-media/catalogs/{catalogId}/status | *CampaignApi* | [**getApiV2ExternalAccountLineItemsByAccountId**](docs/CampaignApi.md#getApiV2ExternalAccountLineItemsByAccountId) | **GET** /2023-07/retail-media/accounts/{account-id}/line-items | diff --git a/sdks/retailmedia_2023-07/api/openapi.yaml b/sdks/retailmedia_2023-07/api/openapi.yaml index d31c310f..be2ced43 100644 --- a/sdks/retailmedia_2023-07/api/openapi.yaml +++ b/sdks/retailmedia_2023-07/api/openapi.yaml @@ -49,6 +49,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -60,6 +61,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -67,12 +69,18 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfAccount' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfAccount' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfAccount' description: Success tags: - - Campaign + - Accounts x-accepts: application/json /2023-07/retail-media/accounts/{accountId}/brands: get: @@ -107,6 +115,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -118,6 +127,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -125,9 +135,15 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfBrand' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfBrand' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfBrand' description: Success tags: - Campaign @@ -165,6 +181,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -176,6 +193,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -183,9 +201,15 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' description: Success tags: - Campaign @@ -923,7 +947,10 @@ paths: description: Catalog download initiated. "400": content: - application/x-json-stream: {} + application/x-json-stream: + schema: + format: binary + type: string application/json: {} description: "The indicated catalog is not available for retrieval, wait\ \ for a success status." @@ -1417,7 +1444,7 @@ paths: $ref: '#/components/schemas/Balance202110PagedListResponse' description: Success tags: - - Campaign + - Balance x-accepts: application/json /2023-07/retail-media/accounts/{account-id}/campaigns: get: @@ -1832,7 +1859,7 @@ paths: $ref: '#/components/schemas/BalanceCampaign202110PagedListResponse' description: Success tags: - - Campaign + - Balance x-accepts: application/json /2023-07/retail-media/balances/{balance-id}/campaigns/append: post: @@ -2961,7 +2988,8 @@ paths: components: schemas: ApplicationSummaryModelResponse: - description: Response of ApplicationSummaryModel + description: A top-level object that encapsulates a Criteo API response for + a single value example: data: attributes: @@ -3022,17 +3050,16 @@ components: nullable: true readOnly: true type: array - uniqueItems: false errors: items: $ref: '#/components/schemas/CommonProblem' nullable: true readOnly: true type: array - uniqueItems: false type: object ApplicationSummaryModelResource: - description: A class that represents a ValueType in a guild compliant way + description: A top-level object that encapsulates a Criteo API response for + a single value example: attributes: organizationId: 6 @@ -3049,7 +3076,7 @@ components: $ref: '#/components/schemas/ApplicationSummaryModel' type: object CommonProblem: - description: Common problem object. Can be specialized as needed. + description: Common problem object. example: traceId: traceId traceIdentifier: traceIdentifier @@ -3085,7 +3112,7 @@ components: nullable: true type: string code: - description: "A machine-readable error code, expressed as a string value." + description: "A machine-readable error code, expressed as a string value." nullable: true type: string instance: @@ -3113,7 +3140,8 @@ components: type: string type: object ApplicationSummaryModel: - description: Model of ApplicationSummary + description: Used for the /me endpoint. Contains information about the currently + authenticated application that we accept to give to our clients example: organizationId: 6 name: name @@ -3235,8 +3263,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false JsonApiPageResponseOfBrand: description: A wrapper class to return a single page of with metadata @@ -3315,8 +3343,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false JsonApiPageResponseOfRetailer: description: A wrapper class to return a single page of with metadata @@ -3401,8 +3429,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false PageMetadata: description: Metadata related to the current request example: @@ -3441,7 +3469,6 @@ components: - currentPageIndex - currentPageSize type: object - x-nullable: false CommonError: description: A JSON:API Common error structure example: @@ -3507,7 +3534,6 @@ components: type: string x-nullable: false type: object - x-nullable: false CommonWarning: description: A JSON:API Base common warning example: @@ -3573,7 +3599,6 @@ components: type: string x-nullable: false type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndAccountAndAccount: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -3605,7 +3630,6 @@ components: - id - type type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndBrandAndBrand: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -3628,7 +3652,6 @@ components: - id - type type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndRetailerAndRetailer: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -3654,7 +3677,6 @@ components: - id - type type: object - x-nullable: false ExternalAccount: description: A Retail Media Account used to launch campaigns and line items example: @@ -3692,7 +3714,6 @@ components: countries: items: type: string - x-nullable: false type: array x-nullable: false currency: @@ -3709,6 +3730,7 @@ components: companyName: nullable: true type: string + x-nullable: true required: - countries - currency @@ -3717,7 +3739,6 @@ components: - timeZone - type type: object - x-nullable: false ExternalBrand: description: A Retail Media Brand used to represent a collection of products sold under the same umbrella name @@ -3732,7 +3753,6 @@ components: required: - name type: object - x-nullable: false ExternalRetailer: description: A Retail Media Retailer used to represent a selection of products from multiple brands @@ -3753,13 +3773,11 @@ components: - auction - preferred type: string - x-nullable: false type: array x-nullable: false required: - name type: object - x-nullable: false AssetResponse: description: A class implementing the response of the Criteo API as described in API Guild Guidelines with a single entity as body @@ -8420,6 +8438,8 @@ components: - salesChannel - environment - pageTypeName + - pageCategory + - taxonomyBreadcrumb - keyword - searchTerm type: string @@ -8594,6 +8614,8 @@ components: - salesChannel - environment - pageTypeName + - pageCategory + - taxonomyBreadcrumb - keyword - searchTerm type: string @@ -8660,6 +8682,7 @@ components: data: - attributes: createdAt: 2000-01-23T04:56:07.000+00:00 + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -8674,6 +8697,7 @@ components: type: type - attributes: createdAt: 2000-01-23T04:56:07.000+00:00 + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -10491,6 +10515,7 @@ components: example: attributes: createdAt: 2000-01-23T04:56:07.000+00:00 + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -11091,6 +11116,7 @@ components: any or all campaigns in an account example: createdAt: 2000-01-23T04:56:07.000+00:00 + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -11114,30 +11140,22 @@ components: deposited: format: decimal nullable: true - required: - - "false" type: number x-nullable: true spent: format: decimal nullable: true - required: - - "false" type: number x-nullable: true remaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true startDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string x-nullable: false endDate: @@ -11163,12 +11181,22 @@ components: format: date-time type: string x-nullable: false + privateMarketBillingType: + description: Billing type for Private Market. + enum: + - NotApplicable + - BillByRetailer + - BillByCriteo + - Unknown + type: string + x-nullable: false required: - createdAt - deposited - memo - name - poNumber + - privateMarketBillingType - remaining - spent - startDate @@ -11219,15 +11247,11 @@ components: budgetSpent: format: decimal nullable: true - required: - - "false" type: number x-nullable: true budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true status: @@ -11289,22 +11313,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -11388,8 +11406,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -11417,8 +11433,6 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true campaignId: @@ -11432,8 +11446,6 @@ components: budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true createdAt: @@ -11486,8 +11498,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -11498,29 +11508,21 @@ components: maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true bidStrategy: @@ -11552,8 +11554,6 @@ components: targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -11571,8 +11571,6 @@ components: budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true createdAt: @@ -11658,15 +11656,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: @@ -11793,8 +11787,6 @@ components: bidOverride: format: decimal nullable: true - required: - - "false" type: number x-nullable: true type: object @@ -11955,22 +11947,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -12039,8 +12025,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -12064,36 +12048,26 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -12141,8 +12115,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -12170,36 +12142,26 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -12255,15 +12217,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: @@ -12337,22 +12295,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -12450,15 +12402,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: diff --git a/sdks/retailmedia_2023-07/build.gradle b/sdks/retailmedia_2023-07/build.gradle index 8e4f18a6..92e52350 100644 --- a/sdks/retailmedia_2023-07/build.gradle +++ b/sdks/retailmedia_2023-07/build.gradle @@ -23,7 +23,7 @@ if (JavaVersion.current().isJava8Compatible()) { } group = 'com.criteo' -version = '2023.07.0.240626' +version = '2023.07.0.240731' repositories { jcenter() @@ -74,7 +74,7 @@ publishing { mavenJava(MavenPublication) { groupId 'com.criteo' artifactId 'criteo-api-retailmedia-sdk' - version '2023.07.0.240626' + version '2023.07.0.240731' from components.java artifact sourcesJar artifact javadocJar diff --git a/sdks/retailmedia_2023-07/docs/AccountsApi.md b/sdks/retailmedia_2023-07/docs/AccountsApi.md new file mode 100644 index 00000000..7ef9fb96 --- /dev/null +++ b/sdks/retailmedia_2023-07/docs/AccountsApi.md @@ -0,0 +1,102 @@ +# AccountsApi + +All URIs are relative to *https://api.criteo.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getApiV1ExternalAccounts**](AccountsApi.md#getApiV1ExternalAccounts) | **GET** /2023-07/retail-media/accounts | | + + + +## getApiV1ExternalAccounts + +> JsonApiPageResponseOfAccount getApiV1ExternalAccounts(limitToId, pageIndex, pageSize) + + + +Gets page of account objects that the current user can access + +### Example + +```java +package com.criteo.api.retailmedia.v2023_07; + +import com.criteo.api.retailmedia.v2023_07.ApiClient; +import com.criteo.api.retailmedia.v2023_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2023_07.ApiException; +import com.criteo.api.retailmedia.v2023_07.Configuration; +import com.criteo.api.retailmedia.v2023_07.auth.*; +import com.criteo.api.retailmedia.v2023_07.model.*; +import com.criteo.api.retailmedia.v2023_07.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request + try { + JsonApiPageResponseOfAccount result = apiInstance.getApiV1ExternalAccounts(limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#getApiV1ExternalAccounts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | + +### Return type + +[**JsonApiPageResponseOfAccount**](JsonApiPageResponseOfAccount.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + diff --git a/sdks/retailmedia_2023-07/docs/ApplicationSummaryModel.md b/sdks/retailmedia_2023-07/docs/ApplicationSummaryModel.md index 704b26ad..d5e84458 100644 --- a/sdks/retailmedia_2023-07/docs/ApplicationSummaryModel.md +++ b/sdks/retailmedia_2023-07/docs/ApplicationSummaryModel.md @@ -2,7 +2,7 @@ # ApplicationSummaryModel -Model of ApplicationSummary +Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients ## Properties diff --git a/sdks/retailmedia_2023-07/docs/ApplicationSummaryModelResource.md b/sdks/retailmedia_2023-07/docs/ApplicationSummaryModelResource.md index 81ed2c97..af688c5d 100644 --- a/sdks/retailmedia_2023-07/docs/ApplicationSummaryModelResource.md +++ b/sdks/retailmedia_2023-07/docs/ApplicationSummaryModelResource.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResource -A class that represents a ValueType in a guild compliant way +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/retailmedia_2023-07/docs/ApplicationSummaryModelResponse.md b/sdks/retailmedia_2023-07/docs/ApplicationSummaryModelResponse.md index 47b6bd74..658b5549 100644 --- a/sdks/retailmedia_2023-07/docs/ApplicationSummaryModelResponse.md +++ b/sdks/retailmedia_2023-07/docs/ApplicationSummaryModelResponse.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResponse -Response of ApplicationSummaryModel +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/retailmedia_2023-07/docs/AsyncCampaignsReport.md b/sdks/retailmedia_2023-07/docs/AsyncCampaignsReport.md index d735484a..18252b4c 100644 --- a/sdks/retailmedia_2023-07/docs/AsyncCampaignsReport.md +++ b/sdks/retailmedia_2023-07/docs/AsyncCampaignsReport.md @@ -116,6 +116,8 @@ Async Campaigns report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_2023-07/docs/AsyncLineItemsReport.md b/sdks/retailmedia_2023-07/docs/AsyncLineItemsReport.md index 9a3a2e0e..276cd5a1 100644 --- a/sdks/retailmedia_2023-07/docs/AsyncLineItemsReport.md +++ b/sdks/retailmedia_2023-07/docs/AsyncLineItemsReport.md @@ -116,6 +116,8 @@ Async Line Items report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_2023-07/docs/BalanceApi.md b/sdks/retailmedia_2023-07/docs/BalanceApi.md new file mode 100644 index 00000000..84e417a4 --- /dev/null +++ b/sdks/retailmedia_2023-07/docs/BalanceApi.md @@ -0,0 +1,200 @@ +# BalanceApi + +All URIs are relative to *https://api.criteo.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getApi202110ExternalAccountBalancesByAccountId**](BalanceApi.md#getApi202110ExternalAccountBalancesByAccountId) | **GET** /2023-07/retail-media/accounts/{account-id}/balances | | +| [**getApi202110ExternalBalanceCampaignsByBalanceId**](BalanceApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2023-07/retail-media/balances/{balance-id}/campaigns | | + + + +## getApi202110ExternalAccountBalancesByAccountId + +> Balance202110PagedListResponse getApi202110ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize) + + + +Gets page of balance objects for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2023_07; + +import com.criteo.api.retailmedia.v2023_07.ApiClient; +import com.criteo.api.retailmedia.v2023_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2023_07.ApiException; +import com.criteo.api.retailmedia.v2023_07.Configuration; +import com.criteo.api.retailmedia.v2023_07.auth.*; +import com.criteo.api.retailmedia.v2023_07.model.*; +import com.criteo.api.retailmedia.v2023_07.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account to get balances for + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + try { + Balance202110PagedListResponse result = apiInstance.getApi202110ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApi202110ExternalAccountBalancesByAccountId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account to get balances for | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | + +### Return type + +[**Balance202110PagedListResponse**](Balance202110PagedListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## getApi202110ExternalBalanceCampaignsByBalanceId + +> BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize) + + + +Gets page of campaigns for the given balanceId + +### Example + +```java +package com.criteo.api.retailmedia.v2023_07; + +import com.criteo.api.retailmedia.v2023_07.ApiClient; +import com.criteo.api.retailmedia.v2023_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2023_07.ApiException; +import com.criteo.api.retailmedia.v2023_07.Configuration; +import com.criteo.api.retailmedia.v2023_07.auth.*; +import com.criteo.api.retailmedia.v2023_07.model.*; +import com.criteo.api.retailmedia.v2023_07.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String balanceId = "balanceId_example"; // String | The balance to get campaigns from + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + try { + BalanceCampaign202110PagedListResponse result = apiInstance.getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApi202110ExternalBalanceCampaignsByBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **balanceId** | **String**| The balance to get campaigns from | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | + +### Return type + +[**BalanceCampaign202110PagedListResponse**](BalanceCampaign202110PagedListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + diff --git a/sdks/retailmedia_2023-07/docs/CampaignApi.md b/sdks/retailmedia_2023-07/docs/CampaignApi.md index 485e0da5..53260a05 100644 --- a/sdks/retailmedia_2023-07/docs/CampaignApi.md +++ b/sdks/retailmedia_2023-07/docs/CampaignApi.md @@ -8,10 +8,8 @@ All URIs are relative to *https://api.criteo.com* | [**createAsset**](CampaignApi.md#createAsset) | **POST** /2023-07/retail-media/assets | | | [**fetchKeywords**](CampaignApi.md#fetchKeywords) | **GET** /2023-07/retail-media/line-items/{id}/keywords | | | [**fetchProposal**](CampaignApi.md#fetchProposal) | **GET** /2023-07/retail-media/preferred-deal-line-items/{id}/proposal | | -| [**getApi202110ExternalAccountBalancesByAccountId**](CampaignApi.md#getApi202110ExternalAccountBalancesByAccountId) | **GET** /2023-07/retail-media/accounts/{account-id}/balances | | | [**getApi202110ExternalAccountCreativesByAccountId**](CampaignApi.md#getApi202110ExternalAccountCreativesByAccountId) | **GET** /2023-07/retail-media/accounts/{account-id}/creatives | | | [**getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId**](CampaignApi.md#getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId) | **GET** /2023-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords | | -| [**getApi202110ExternalBalanceCampaignsByBalanceId**](CampaignApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2023-07/retail-media/balances/{balance-id}/campaigns | | | [**getApi202110ExternalCampaignPreferredLineItemsByCampaignId**](CampaignApi.md#getApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **GET** /2023-07/retail-media/campaigns/{campaign-id}/preferred-line-items | | | [**getApi202110ExternalLineItemProductsByLineItemId**](CampaignApi.md#getApi202110ExternalLineItemProductsByLineItemId) | **GET** /2023-07/retail-media/line-items/{line-item-id}/products | | | [**getApi202110ExternalPreferredLineItemByLineItemId**](CampaignApi.md#getApi202110ExternalPreferredLineItemByLineItemId) | **GET** /2023-07/retail-media/preferred-line-items/{line-item-id} | | @@ -29,7 +27,6 @@ All URIs are relative to *https://api.criteo.com* | [**getApi202301ExternalLineItemBidMultipliersByLineItemId**](CampaignApi.md#getApi202301ExternalLineItemBidMultipliersByLineItemId) | **GET** /2023-07/retail-media/line-items/{line-item-id}/bid-multipliers | | | [**getApiV1ExternalAccountBrandsByAccountId**](CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /2023-07/retail-media/accounts/{accountId}/brands | | | [**getApiV1ExternalAccountRetailersByAccountId**](CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /2023-07/retail-media/accounts/{accountId}/retailers | | -| [**getApiV1ExternalAccounts**](CampaignApi.md#getApiV1ExternalAccounts) | **GET** /2023-07/retail-media/accounts | | | [**getApiV1ExternalCatalogOutputByCatalogId**](CampaignApi.md#getApiV1ExternalCatalogOutputByCatalogId) | **GET** /2023-07/retail-media/catalogs/{catalogId}/output | | | [**getApiV1ExternalCatalogStatusByCatalogId**](CampaignApi.md#getApiV1ExternalCatalogStatusByCatalogId) | **GET** /2023-07/retail-media/catalogs/{catalogId}/status | | | [**getApiV2ExternalAccountLineItemsByAccountId**](CampaignApi.md#getApiV2ExternalAccountLineItemsByAccountId) | **GET** /2023-07/retail-media/accounts/{account-id}/line-items | | @@ -431,101 +428,6 @@ public class Example { | **403** | Forbidden | - | -## getApi202110ExternalAccountBalancesByAccountId - -> Balance202110PagedListResponse getApi202110ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize) - - - -Gets page of balance objects for the given account id - -### Example - -```java -package com.criteo.api.retailmedia.v2023_07; - -import com.criteo.api.retailmedia.v2023_07.ApiClient; -import com.criteo.api.retailmedia.v2023_07.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_07.ApiException; -import com.criteo.api.retailmedia.v2023_07.Configuration; -import com.criteo.api.retailmedia.v2023_07.auth.*; -import com.criteo.api.retailmedia.v2023_07.model.*; -import com.criteo.api.retailmedia.v2023_07.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account to get balances for - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request - try { - Balance202110PagedListResponse result = apiInstance.getApi202110ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApi202110ExternalAccountBalancesByAccountId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account to get balances for | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | - -### Return type - -[**Balance202110PagedListResponse**](Balance202110PagedListResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - ## getApi202110ExternalAccountCreativesByAccountId > Creative202110ListResponse getApi202110ExternalAccountCreativesByAccountId(accountId) @@ -705,101 +607,6 @@ public class Example { | **400** | Bad Request | - | -## getApi202110ExternalBalanceCampaignsByBalanceId - -> BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize) - - - -Gets page of campaigns for the given balanceId - -### Example - -```java -package com.criteo.api.retailmedia.v2023_07; - -import com.criteo.api.retailmedia.v2023_07.ApiClient; -import com.criteo.api.retailmedia.v2023_07.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_07.ApiException; -import com.criteo.api.retailmedia.v2023_07.Configuration; -import com.criteo.api.retailmedia.v2023_07.auth.*; -import com.criteo.api.retailmedia.v2023_07.model.*; -import com.criteo.api.retailmedia.v2023_07.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String balanceId = "balanceId_example"; // String | The balance to get campaigns from - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request - try { - BalanceCampaign202110PagedListResponse result = apiInstance.getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApi202110ExternalBalanceCampaignsByBalanceId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **balanceId** | **String**| The balance to get campaigns from | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | - -### Return type - -[**BalanceCampaign202110PagedListResponse**](BalanceCampaign202110PagedListResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - ## getApi202110ExternalCampaignPreferredLineItemsByCampaignId > PreferredLineItem202110PagedListResponse getApi202110ExternalCampaignPreferredLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize) @@ -2219,8 +2026,8 @@ public class Example { CampaignApi apiInstance = new CampaignApi(defaultClient); String accountId = "accountId_example"; // String | The given account id List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { JsonApiPageResponseOfBrand result = apiInstance.getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize); System.out.println(result); @@ -2242,8 +2049,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **accountId** | **String**| The given account id | | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type @@ -2256,7 +2063,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/plain, application/json, text/json ### HTTP response details @@ -2314,8 +2121,8 @@ public class Example { CampaignApi apiInstance = new CampaignApi(defaultClient); String accountId = "accountId_example"; // String | The given account id List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { JsonApiPageResponseOfRetailer result = apiInstance.getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize); System.out.println(result); @@ -2337,8 +2144,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **accountId** | **String**| The given account id | | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type @@ -2351,100 +2158,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## getApiV1ExternalAccounts - -> JsonApiPageResponseOfAccount getApiV1ExternalAccounts(limitToId, pageIndex, pageSize) - - - -Gets page of account objects that the current user can access - -### Example - -```java -package com.criteo.api.retailmedia.v2023_07; - -import com.criteo.api.retailmedia.v2023_07.ApiClient; -import com.criteo.api.retailmedia.v2023_07.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_07.ApiException; -import com.criteo.api.retailmedia.v2023_07.Configuration; -import com.criteo.api.retailmedia.v2023_07.auth.*; -import com.criteo.api.retailmedia.v2023_07.model.*; -import com.criteo.api.retailmedia.v2023_07.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request - try { - JsonApiPageResponseOfAccount result = apiInstance.getApiV1ExternalAccounts(limitToId, pageIndex, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccounts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | - -### Return type - -[**JsonApiPageResponseOfAccount**](JsonApiPageResponseOfAccount.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/plain, application/json, text/json ### HTTP response details diff --git a/sdks/retailmedia_2023-07/docs/CommonProblem.md b/sdks/retailmedia_2023-07/docs/CommonProblem.md index 1ee7a1f1..3f7f164b 100644 --- a/sdks/retailmedia_2023-07/docs/CommonProblem.md +++ b/sdks/retailmedia_2023-07/docs/CommonProblem.md @@ -2,7 +2,7 @@ # CommonProblem -Common problem object. Can be specialized as needed. +Common problem object. ## Properties @@ -11,7 +11,7 @@ Common problem object. Can be specialized as needed. |**traceId** | **String** | The request correlation ID this problem comes from. | [optional] | |**traceIdentifier** | **String** | The request correlation ID this problem comes from. (deprecated, use traceId instead) | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The problem's category. | [optional] | -|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | +|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | |**instance** | **String** | A URI that identifies the specific occurrence of the problem. | [optional] | |**title** | **String** | A short human-readable description of the problem type | [optional] | |**detail** | **String** | A human-readable explanation specific to this occurrence of the problem | [optional] | diff --git a/sdks/retailmedia_2023-07/docs/ExternalBalance202110.md b/sdks/retailmedia_2023-07/docs/ExternalBalance202110.md index 0803d94e..a53fcf60 100644 --- a/sdks/retailmedia_2023-07/docs/ExternalBalance202110.md +++ b/sdks/retailmedia_2023-07/docs/ExternalBalance202110.md @@ -19,6 +19,7 @@ A Retail Media Balance used to determine the funds available for any or all camp |**status** | [**StatusEnum**](#StatusEnum) | | | |**createdAt** | **OffsetDateTime** | | | |**updatedAt** | **OffsetDateTime** | | | +|**privateMarketBillingType** | [**PrivateMarketBillingTypeEnum**](#PrivateMarketBillingTypeEnum) | Billing type for Private Market. | | @@ -33,3 +34,14 @@ A Retail Media Balance used to determine the funds available for any or all camp +## Enum: PrivateMarketBillingTypeEnum + +| Name | Value | +|---- | -----| +| NOTAPPLICABLE | "NotApplicable" | +| BILLBYRETAILER | "BillByRetailer" | +| BILLBYCRITEO | "BillByCriteo" | +| UNKNOWN | "Unknown" | + + + diff --git a/sdks/retailmedia_2023-07/docs/JsonApiPageResponseOfAccount.md b/sdks/retailmedia_2023-07/docs/JsonApiPageResponseOfAccount.md index af50ec88..aa059cfb 100644 --- a/sdks/retailmedia_2023-07/docs/JsonApiPageResponseOfAccount.md +++ b/sdks/retailmedia_2023-07/docs/JsonApiPageResponseOfAccount.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndAccountAndAccount>**](JsonApiBodyWithIdOfInt64AndAccountAndAccount.md) | | | diff --git a/sdks/retailmedia_2023-07/docs/JsonApiPageResponseOfBrand.md b/sdks/retailmedia_2023-07/docs/JsonApiPageResponseOfBrand.md index 0c2714ac..83498f93 100644 --- a/sdks/retailmedia_2023-07/docs/JsonApiPageResponseOfBrand.md +++ b/sdks/retailmedia_2023-07/docs/JsonApiPageResponseOfBrand.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndBrandAndBrand>**](JsonApiBodyWithIdOfInt64AndBrandAndBrand.md) | | | diff --git a/sdks/retailmedia_2023-07/docs/JsonApiPageResponseOfRetailer.md b/sdks/retailmedia_2023-07/docs/JsonApiPageResponseOfRetailer.md index e62ca2fd..4c29b7d7 100644 --- a/sdks/retailmedia_2023-07/docs/JsonApiPageResponseOfRetailer.md +++ b/sdks/retailmedia_2023-07/docs/JsonApiPageResponseOfRetailer.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndRetailerAndRetailer>**](JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md) | | | diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/ApiClient.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/ApiClient.java index 00d3477d..a12b20b2 100644 --- a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/ApiClient.java +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/ApiClient.java @@ -213,7 +213,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2023.07.0.240626/java"); + setUserAgent("OpenAPI-Generator/2023.07.0.240731/java"); authentications = new HashMap(); } diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/api/AccountsApi.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/api/AccountsApi.java new file mode 100644 index 00000000..3c54d3b7 --- /dev/null +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/api/AccountsApi.java @@ -0,0 +1,215 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2023-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2023_07.api; + +import com.criteo.api.retailmedia.v2023_07.ApiCallback; +import com.criteo.api.retailmedia.v2023_07.ApiClient; +import com.criteo.api.retailmedia.v2023_07.ApiException; +import com.criteo.api.retailmedia.v2023_07.ApiResponse; +import com.criteo.api.retailmedia.v2023_07.Configuration; +import com.criteo.api.retailmedia.v2023_07.Pair; +import com.criteo.api.retailmedia.v2023_07.ProgressRequestBody; +import com.criteo.api.retailmedia.v2023_07.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.criteo.api.retailmedia.v2023_07.model.JsonApiPageResponseOfAccount; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class AccountsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public AccountsApi() { + this(Configuration.getDefaultApiClient()); + } + + public AccountsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getApiV1ExternalAccounts + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2023-07/retail-media/accounts"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + return getApiV1ExternalAccountsCall(limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return JsonApiPageResponseOfAccount + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountsWithHttpInfo(limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return ApiResponse<JsonApiPageResponseOfAccount> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV1ExternalAccountsWithHttpInfo(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountsAsync(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/api/BalanceApi.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/api/BalanceApi.java new file mode 100644 index 00000000..9975cb48 --- /dev/null +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/api/BalanceApi.java @@ -0,0 +1,371 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2023-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2023_07.api; + +import com.criteo.api.retailmedia.v2023_07.ApiCallback; +import com.criteo.api.retailmedia.v2023_07.ApiClient; +import com.criteo.api.retailmedia.v2023_07.ApiException; +import com.criteo.api.retailmedia.v2023_07.ApiResponse; +import com.criteo.api.retailmedia.v2023_07.Configuration; +import com.criteo.api.retailmedia.v2023_07.Pair; +import com.criteo.api.retailmedia.v2023_07.ProgressRequestBody; +import com.criteo.api.retailmedia.v2023_07.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.criteo.api.retailmedia.v2023_07.model.Balance202110PagedListResponse; +import com.criteo.api.retailmedia.v2023_07.model.BalanceCampaign202110PagedListResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class BalanceApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public BalanceApi() { + this(Configuration.getDefaultApiClient()); + } + + public BalanceApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getApi202110ExternalAccountBalancesByAccountId + * @param accountId The account to get balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApi202110ExternalAccountBalancesByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2023-07/retail-media/accounts/{account-id}/balances" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApi202110ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApi202110ExternalAccountBalancesByAccountId(Async)"); + } + + return getApi202110ExternalAccountBalancesByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Gets page of balance objects for the given account id + * @param accountId The account to get balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return Balance202110PagedListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public Balance202110PagedListResponse getApi202110ExternalAccountBalancesByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApi202110ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Gets page of balance objects for the given account id + * @param accountId The account to get balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return ApiResponse<Balance202110PagedListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApi202110ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApi202110ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets page of balance objects for the given account id + * @param accountId The account to get balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApi202110ExternalAccountBalancesByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApi202110ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApi202110ExternalBalanceCampaignsByBalanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2023-07/retail-media/balances/{balance-id}/campaigns" + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling getApi202110ExternalBalanceCampaignsByBalanceId(Async)"); + } + + return getApi202110ExternalBalanceCampaignsByBalanceIdCall(balanceId, limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return BalanceCampaign202110PagedListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(balanceId, limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return ApiResponse<BalanceCampaign202110PagedListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdAsync(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/api/CampaignApi.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/api/CampaignApi.java index c16c4739..e761a259 100644 --- a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/api/CampaignApi.java +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/api/CampaignApi.java @@ -39,7 +39,6 @@ import com.criteo.api.retailmedia.v2023_07.model.AudienceIdsUpdateModel202110Request; import com.criteo.api.retailmedia.v2023_07.model.AudienceTarget202110Request; import com.criteo.api.retailmedia.v2023_07.model.AudienceTarget202110Response; -import com.criteo.api.retailmedia.v2023_07.model.Balance202110PagedListResponse; import com.criteo.api.retailmedia.v2023_07.model.BalanceCampaign202110ListRequest; import com.criteo.api.retailmedia.v2023_07.model.BalanceCampaign202110PagedListResponse; import com.criteo.api.retailmedia.v2023_07.model.Category202204; @@ -53,7 +52,6 @@ import com.criteo.api.retailmedia.v2023_07.model.CreativeUpdateModel202207; import com.criteo.api.retailmedia.v2023_07.model.ExternalRetailerPages202110; import java.io.File; -import com.criteo.api.retailmedia.v2023_07.model.JsonApiPageResponseOfAccount; import com.criteo.api.retailmedia.v2023_07.model.JsonApiPageResponseOfBrand; import com.criteo.api.retailmedia.v2023_07.model.JsonApiPageResponseOfCampaignV202301; import com.criteo.api.retailmedia.v2023_07.model.JsonApiPageResponseOfRetailer; @@ -646,153 +644,6 @@ public okhttp3.Call fetchProposalAsync(String id, final ApiCallback - Status Code Description Response Headers - 200 Success - - - */ - public okhttp3.Call getApi202110ExternalAccountBalancesByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-07/retail-media/accounts/{account-id}/balances" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApi202110ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApi202110ExternalAccountBalancesByAccountId(Async)"); - } - - return getApi202110ExternalAccountBalancesByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of balance objects for the given account id - * @param accountId The account to get balances for (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return Balance202110PagedListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public Balance202110PagedListResponse getApi202110ExternalAccountBalancesByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApi202110ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of balance objects for the given account id - * @param accountId The account to get balances for (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<Balance202110PagedListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApi202110ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApi202110ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of balance objects for the given account id - * @param accountId The account to get balances for (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApi202110ExternalAccountBalancesByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApi202110ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getApi202110ExternalAccountCreativesByAccountId * @param accountId External account id to retrieve creatives for (required) @@ -1043,153 +894,6 @@ public okhttp3.Call getApi202110ExternalAuctionLineItemTargetingKeywordsByLineIt localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getApi202110ExternalBalanceCampaignsByBalanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-07/retail-media/balances/{balance-id}/campaigns" - .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling getApi202110ExternalBalanceCampaignsByBalanceId(Async)"); - } - - return getApi202110ExternalBalanceCampaignsByBalanceIdCall(balanceId, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return BalanceCampaign202110PagedListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(balanceId, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<BalanceCampaign202110PagedListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdAsync(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getApi202110ExternalCampaignPreferredLineItemsByCampaignId * @param campaignId The given campaign id (required) @@ -3183,8 +2887,8 @@ public okhttp3.Call getApi202301ExternalLineItemBidMultipliersByLineItemIdAsync( * Build call for getApiV1ExternalAccountBrandsByAccountId * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3233,7 +2937,9 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountI } final String[] localVarAccepts = { - "application/json" + "text/plain", + "application/json", + "text/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3267,8 +2973,8 @@ private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall( * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @return JsonApiPageResponseOfBrand * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3287,8 +2993,8 @@ public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(Strin * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @return ApiResponse<JsonApiPageResponseOfBrand> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3308,8 +3014,8 @@ public ApiResponse getApiV1ExternalAccountBrandsByAc * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3330,8 +3036,8 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdAsync(String account * Build call for getApiV1ExternalAccountRetailersByAccountId * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3380,7 +3086,9 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accou } final String[] localVarAccepts = { - "application/json" + "text/plain", + "application/json", + "text/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3414,8 +3122,8 @@ private okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCa * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @return JsonApiPageResponseOfRetailer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3434,8 +3142,8 @@ public JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @return ApiResponse<JsonApiPageResponseOfRetailer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3455,8 +3163,8 @@ public ApiResponse getApiV1ExternalAccountRetaile * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3473,143 +3181,6 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdAsync(String acco localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getApiV1ExternalAccounts - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-07/retail-media/accounts"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - return getApiV1ExternalAccountsCall(limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of account objects that the current user can access - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return JsonApiPageResponseOfAccount - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountsWithHttpInfo(limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of account objects that the current user can access - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<JsonApiPageResponseOfAccount> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApiV1ExternalAccountsWithHttpInfo(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of account objects that the current user can access - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV1ExternalAccountsAsync(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getApiV1ExternalCatalogOutputByCatalogId * @param catalogId A catalog ID returned from an account catalog request. (required) diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ApplicationSummaryModel.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ApplicationSummaryModel.java index 9af3aed7..85de4bbe 100644 --- a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ApplicationSummaryModel.java +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ApplicationSummaryModel.java @@ -45,7 +45,7 @@ import com.criteo.api.retailmedia.v2023_07.JSON; /** - * Model of ApplicationSummary + * Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModel { diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ApplicationSummaryModelResource.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ApplicationSummaryModelResource.java index 7527b54d..bf9c1776 100644 --- a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ApplicationSummaryModelResource.java +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ApplicationSummaryModelResource.java @@ -46,7 +46,7 @@ import com.criteo.api.retailmedia.v2023_07.JSON; /** - * A class that represents a ValueType in a guild compliant way + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResource { diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ApplicationSummaryModelResponse.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ApplicationSummaryModelResponse.java index 1fb4f4b5..632c6a97 100644 --- a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ApplicationSummaryModelResponse.java +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ApplicationSummaryModelResponse.java @@ -49,7 +49,7 @@ import com.criteo.api.retailmedia.v2023_07.JSON; /** - * Response of ApplicationSummaryModel + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResponse { diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/AsyncCampaignsReport.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/AsyncCampaignsReport.java index 2217cb09..c6457ec6 100644 --- a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/AsyncCampaignsReport.java +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/AsyncCampaignsReport.java @@ -439,6 +439,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/AsyncLineItemsReport.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/AsyncLineItemsReport.java index a580b70e..c3bd2a10 100644 --- a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/AsyncLineItemsReport.java +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/AsyncLineItemsReport.java @@ -439,6 +439,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/CommonProblem.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/CommonProblem.java index 1f36c4b6..44782f6a 100644 --- a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/CommonProblem.java +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/CommonProblem.java @@ -47,7 +47,7 @@ import com.criteo.api.retailmedia.v2023_07.JSON; /** - * Common problem object. Can be specialized as needed. + * Common problem object. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CommonProblem { @@ -222,7 +222,7 @@ public CommonProblem code(String code) { } /** - * A machine-readable error code, expressed as a string value. + * A machine-readable error code, expressed as a string value. * @return code **/ @javax.annotation.Nullable diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ExternalBalance202110.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ExternalBalance202110.java index 3baaf241..d0460f95 100644 --- a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ExternalBalance202110.java +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/ExternalBalance202110.java @@ -147,6 +147,61 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private OffsetDateTime updatedAt; + /** + * Billing type for Private Market. + */ + @JsonAdapter(PrivateMarketBillingTypeEnum.Adapter.class) + public enum PrivateMarketBillingTypeEnum { + NOTAPPLICABLE("NotApplicable"), + + BILLBYRETAILER("BillByRetailer"), + + BILLBYCRITEO("BillByCriteo"), + + UNKNOWN("Unknown"); + + private String value; + + PrivateMarketBillingTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivateMarketBillingTypeEnum fromValue(String value) { + for (PrivateMarketBillingTypeEnum b : PrivateMarketBillingTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivateMarketBillingTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivateMarketBillingTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivateMarketBillingTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_PRIVATE_MARKET_BILLING_TYPE = "privateMarketBillingType"; + @SerializedName(SERIALIZED_NAME_PRIVATE_MARKET_BILLING_TYPE) + private PrivateMarketBillingTypeEnum privateMarketBillingType; + public ExternalBalance202110() { } @@ -391,6 +446,28 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } + + public ExternalBalance202110 privateMarketBillingType(PrivateMarketBillingTypeEnum privateMarketBillingType) { + + this.privateMarketBillingType = privateMarketBillingType; + return this; + } + + /** + * Billing type for Private Market. + * @return privateMarketBillingType + **/ + @javax.annotation.Nonnull + + public PrivateMarketBillingTypeEnum getPrivateMarketBillingType() { + return privateMarketBillingType; + } + + + public void setPrivateMarketBillingType(PrivateMarketBillingTypeEnum privateMarketBillingType) { + this.privateMarketBillingType = privateMarketBillingType; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -456,7 +533,8 @@ public boolean equals(Object o) { Objects.equals(this.endDate, externalBalance202110.endDate) && Objects.equals(this.status, externalBalance202110.status) && Objects.equals(this.createdAt, externalBalance202110.createdAt) && - Objects.equals(this.updatedAt, externalBalance202110.updatedAt)&& + Objects.equals(this.updatedAt, externalBalance202110.updatedAt) && + Objects.equals(this.privateMarketBillingType, externalBalance202110.privateMarketBillingType)&& Objects.equals(this.additionalProperties, externalBalance202110.additionalProperties); } @@ -466,7 +544,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, poNumber, memo, deposited, spent, remaining, startDate, endDate, status, createdAt, updatedAt, additionalProperties); + return Objects.hash(name, poNumber, memo, deposited, spent, remaining, startDate, endDate, status, createdAt, updatedAt, privateMarketBillingType, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -491,6 +569,7 @@ public String toString() { sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" privateMarketBillingType: ").append(toIndentedString(privateMarketBillingType)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -525,6 +604,7 @@ private String toIndentedString(Object o) { openapiFields.add("status"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); + openapiFields.add("privateMarketBillingType"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -538,6 +618,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("status"); openapiRequiredFields.add("createdAt"); openapiRequiredFields.add("updatedAt"); + openapiRequiredFields.add("privateMarketBillingType"); } /** @@ -571,6 +652,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (!jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } + if (!jsonObj.get("privateMarketBillingType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `privateMarketBillingType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privateMarketBillingType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/JsonApiPageResponseOfAccount.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/JsonApiPageResponseOfAccount.java index b9157ab9..146bf75a 100644 --- a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/JsonApiPageResponseOfAccount.java +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/JsonApiPageResponseOfAccount.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfAccount metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/JsonApiPageResponseOfBrand.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/JsonApiPageResponseOfBrand.java index 1efe8215..aa12ce5e 100644 --- a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/JsonApiPageResponseOfBrand.java +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/JsonApiPageResponseOfBrand.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfBrand metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/JsonApiPageResponseOfRetailer.java b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/JsonApiPageResponseOfRetailer.java index f31c3d29..087cd984 100644 --- a/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/JsonApiPageResponseOfRetailer.java +++ b/sdks/retailmedia_2023-07/src/main/java/com/criteo/api/retailmedia/v2023_07/model/JsonApiPageResponseOfRetailer.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfRetailer metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2023-10/.openapi-generator/FILES b/sdks/retailmedia_2023-10/.openapi-generator/FILES index 8556d0ed..cd23e969 100644 --- a/sdks/retailmedia_2023-10/.openapi-generator/FILES +++ b/sdks/retailmedia_2023-10/.openapi-generator/FILES @@ -6,6 +6,7 @@ README.md api/openapi.yaml build.gradle build.sbt +docs/AccountsApi.md docs/AddFundsToBalanceRequest.md docs/AddRemoveKeywordModel.md docs/AddRemoveKeywordsModel.md @@ -40,6 +41,7 @@ docs/AudienceApi.md docs/AudienceIdsUpdateModel202110Request.md docs/AudienceTarget202110Request.md docs/AudienceTarget202110Response.md +docs/BalanceApi.md docs/BalanceCampaign202110ListRequest.md docs/BalanceCampaign202110PagedListResponse.md docs/BalanceResponse.md @@ -235,8 +237,10 @@ src/main/java/com/criteo/api/retailmedia/v2023_10/ProgressResponseBody.java src/main/java/com/criteo/api/retailmedia/v2023_10/ServerConfiguration.java src/main/java/com/criteo/api/retailmedia/v2023_10/ServerVariable.java src/main/java/com/criteo/api/retailmedia/v2023_10/StringUtil.java +src/main/java/com/criteo/api/retailmedia/v2023_10/api/AccountsApi.java src/main/java/com/criteo/api/retailmedia/v2023_10/api/AnalyticsApi.java src/main/java/com/criteo/api/retailmedia/v2023_10/api/AudienceApi.java +src/main/java/com/criteo/api/retailmedia/v2023_10/api/BalanceApi.java src/main/java/com/criteo/api/retailmedia/v2023_10/api/CampaignApi.java src/main/java/com/criteo/api/retailmedia/v2023_10/api/GatewayApi.java src/main/java/com/criteo/api/retailmedia/v2023_10/auth/ApiKeyAuth.java diff --git a/sdks/retailmedia_2023-10/README.md b/sdks/retailmedia_2023-10/README.md index 0c0f5caa..18fbccd7 100644 --- a/sdks/retailmedia_2023-10/README.md +++ b/sdks/retailmedia_2023-10/README.md @@ -8,7 +8,7 @@ More information: [https://developers.criteo.com/](https://developers.criteo.com Criteo API -- Package version: 2023.10.0.240626 +- Package version: 2023.10.0.240731 *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -38,7 +38,7 @@ Add this dependency to your project's POM: com.criteo criteo-api-retailmedia-sdk - 2023.10.0.240626 + 2023.10.0.240731 compile ``` @@ -48,7 +48,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.criteo:criteo-api-retailmedia-sdk:2023.10.0.240626" +compile "com.criteo:criteo-api-retailmedia-sdk:2023.10.0.240731" ``` ### Others @@ -61,7 +61,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* `build/libs/criteo-api-retailmedia-sdk-2023.10.0.240626.jar` +* `build/libs/criteo-api-retailmedia-sdk-2023.10.0.240731.jar` ## Example @@ -73,6 +73,7 @@ All URIs are relative to *https://api.criteo.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AccountsApi* | [**getApiV1ExternalAccounts**](docs/AccountsApi.md#getApiV1ExternalAccounts) | **GET** /2023-10/retail-media/accounts | *AnalyticsApi* | [**generateAsyncCampaignsReport**](docs/AnalyticsApi.md#generateAsyncCampaignsReport) | **POST** /2023-10/retail-media/reports/campaigns | *AnalyticsApi* | [**generateAsyncLineItemsReport**](docs/AnalyticsApi.md#generateAsyncLineItemsReport) | **POST** /2023-10/retail-media/reports/line-items | *AnalyticsApi* | [**generateAsyncRevenueReport**](docs/AnalyticsApi.md#generateAsyncRevenueReport) | **POST** /2023-10/retail-media/reports/revenue | @@ -82,13 +83,19 @@ Class | Method | HTTP request | Description *AudienceApi* | [**legacyGetAudienceV1**](docs/AudienceApi.md#legacyGetAudienceV1) | **GET** /2023-10/retail-media/accounts/{accountId}/audiences | *AudienceApi* | [**legacyGetAudienceV2**](docs/AudienceApi.md#legacyGetAudienceV2) | **GET** /2023-10/retail-media/v2/accounts/{accountId}/audiences | *AudienceApi* | [**legacyUpdateAudienceV2**](docs/AudienceApi.md#legacyUpdateAudienceV2) | **POST** /2023-10/retail-media/v2/accounts/{accountId}/audiences | +*BalanceApi* | [**getApi202110ExternalBalanceCampaignsByBalanceId**](docs/BalanceApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2023-10/retail-media/balances/{balance-id}/campaigns | +*BalanceApi* | [**getApiV1ExternalAccountBalancesByAccountId**](docs/BalanceApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2023-10/retail-media/accounts/{account-id}/balances | +*BalanceApi* | [**getApiV1ExternalAccountByAccountIdAndBalanceId**](docs/BalanceApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId} | +*BalanceApi* | [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](docs/BalanceApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId} | +*BalanceApi* | [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](docs/BalanceApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | +*BalanceApi* | [**postApiV1ExternalAccountBalancesByAccountId**](docs/BalanceApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2023-10/retail-media/accounts/{account-id}/balances | +*BalanceApi* | [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](docs/BalanceApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | *CampaignApi* | [**addRemoveKeywords**](docs/CampaignApi.md#addRemoveKeywords) | **POST** /2023-10/retail-media/line-items/{id}/keywords/add-remove | *CampaignApi* | [**createAsset**](docs/CampaignApi.md#createAsset) | **POST** /2023-10/retail-media/assets | *CampaignApi* | [**fetchKeywords**](docs/CampaignApi.md#fetchKeywords) | **GET** /2023-10/retail-media/line-items/{id}/keywords | *CampaignApi* | [**fetchProposal**](docs/CampaignApi.md#fetchProposal) | **GET** /2023-10/retail-media/preferred-deal-line-items/{id}/proposal | *CampaignApi* | [**getApi202110ExternalAccountCreativesByAccountId**](docs/CampaignApi.md#getApi202110ExternalAccountCreativesByAccountId) | **GET** /2023-10/retail-media/accounts/{account-id}/creatives | *CampaignApi* | [**getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId**](docs/CampaignApi.md#getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId) | **GET** /2023-10/retail-media/auction-line-items/{line-item-id}/targeting/keywords | -*CampaignApi* | [**getApi202110ExternalBalanceCampaignsByBalanceId**](docs/CampaignApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2023-10/retail-media/balances/{balance-id}/campaigns | *CampaignApi* | [**getApi202110ExternalCampaignPreferredLineItemsByCampaignId**](docs/CampaignApi.md#getApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **GET** /2023-10/retail-media/campaigns/{campaign-id}/preferred-line-items | *CampaignApi* | [**getApi202110ExternalLineItemProductsByLineItemId**](docs/CampaignApi.md#getApi202110ExternalLineItemProductsByLineItemId) | **GET** /2023-10/retail-media/line-items/{line-item-id}/products | *CampaignApi* | [**getApi202110ExternalPreferredLineItemByLineItemId**](docs/CampaignApi.md#getApi202110ExternalPreferredLineItemByLineItemId) | **GET** /2023-10/retail-media/preferred-line-items/{line-item-id} | @@ -104,18 +111,14 @@ Class | Method | HTTP request | Description *CampaignApi* | [**getApi202301ExternalAccountCampaignsByAccountId**](docs/CampaignApi.md#getApi202301ExternalAccountCampaignsByAccountId) | **GET** /2023-10/retail-media/accounts/{account-id}/campaigns | *CampaignApi* | [**getApi202301ExternalCampaignByCampaignId**](docs/CampaignApi.md#getApi202301ExternalCampaignByCampaignId) | **GET** /2023-10/retail-media/campaigns/{campaignId} | *CampaignApi* | [**getApi202301ExternalLineItemBidMultipliersByLineItemId**](docs/CampaignApi.md#getApi202301ExternalLineItemBidMultipliersByLineItemId) | **GET** /2023-10/retail-media/line-items/{line-item-id}/bid-multipliers | -*CampaignApi* | [**getApiV1ExternalAccountBalancesByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2023-10/retail-media/accounts/{account-id}/balances | *CampaignApi* | [**getApiV1ExternalAccountBrandsByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /2023-10/retail-media/accounts/{accountId}/brands | -*CampaignApi* | [**getApiV1ExternalAccountByAccountIdAndBalanceId**](docs/CampaignApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId} | *CampaignApi* | [**getApiV1ExternalAccountRetailersByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /2023-10/retail-media/accounts/{accountId}/retailers | -*CampaignApi* | [**getApiV1ExternalAccounts**](docs/CampaignApi.md#getApiV1ExternalAccounts) | **GET** /2023-10/retail-media/accounts | *CampaignApi* | [**getApiV1ExternalCatalogOutputByCatalogId**](docs/CampaignApi.md#getApiV1ExternalCatalogOutputByCatalogId) | **GET** /2023-10/retail-media/catalogs/{catalogId}/output | *CampaignApi* | [**getApiV1ExternalCatalogStatusByCatalogId**](docs/CampaignApi.md#getApiV1ExternalCatalogStatusByCatalogId) | **GET** /2023-10/retail-media/catalogs/{catalogId}/status | *CampaignApi* | [**getApiV2ExternalAccountLineItemsByAccountId**](docs/CampaignApi.md#getApiV2ExternalAccountLineItemsByAccountId) | **GET** /2023-10/retail-media/accounts/{account-id}/line-items | *CampaignApi* | [**getApiV2ExternalAuctionLineItemByLineItemId**](docs/CampaignApi.md#getApiV2ExternalAuctionLineItemByLineItemId) | **GET** /2023-10/retail-media/auction-line-items/{line-item-id} | *CampaignApi* | [**getApiV2ExternalCampaignAuctionLineItemsByCampaignId**](docs/CampaignApi.md#getApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **GET** /2023-10/retail-media/campaigns/{campaign-id}/auction-line-items | *CampaignApi* | [**getApiV2ExternalLineItemByLineItemId**](docs/CampaignApi.md#getApiV2ExternalLineItemByLineItemId) | **GET** /2023-10/retail-media/line-items/{line-item-id} | -*CampaignApi* | [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](docs/CampaignApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId} | *CampaignApi* | [**postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId**](docs/CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId) | **POST** /2023-10/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append | *CampaignApi* | [**postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId**](docs/CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId) | **POST** /2023-10/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete | *CampaignApi* | [**postApi202110ExternalBalanceCampaignsAppendByBalanceId**](docs/CampaignApi.md#postApi202110ExternalBalanceCampaignsAppendByBalanceId) | **POST** /2023-10/retail-media/balances/{balance-id}/campaigns/append | @@ -134,10 +137,7 @@ Class | Method | HTTP request | Description *CampaignApi* | [**postApi202210ExternalAccountCreativesByAccountId**](docs/CampaignApi.md#postApi202210ExternalAccountCreativesByAccountId) | **POST** /2023-10/retail-media/accounts/{account-id}/creatives | *CampaignApi* | [**postApi202210ExternalAccountCreativesSearchByAccountId**](docs/CampaignApi.md#postApi202210ExternalAccountCreativesSearchByAccountId) | **POST** /2023-10/retail-media/accounts/{account-id}/creatives/search | *CampaignApi* | [**postApi202301ExternalAccountCampaignsByAccountId**](docs/CampaignApi.md#postApi202301ExternalAccountCampaignsByAccountId) | **POST** /2023-10/retail-media/accounts/{account-id}/campaigns | -*CampaignApi* | [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](docs/CampaignApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | -*CampaignApi* | [**postApiV1ExternalAccountBalancesByAccountId**](docs/CampaignApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2023-10/retail-media/accounts/{account-id}/balances | *CampaignApi* | [**postApiV1ExternalAccountCatalogsByAccountId**](docs/CampaignApi.md#postApiV1ExternalAccountCatalogsByAccountId) | **POST** /2023-10/retail-media/accounts/{accountId}/catalogs | -*CampaignApi* | [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](docs/CampaignApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | *CampaignApi* | [**postApiV2ExternalCampaignAuctionLineItemsByCampaignId**](docs/CampaignApi.md#postApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **POST** /2023-10/retail-media/campaigns/{campaign-id}/auction-line-items | *CampaignApi* | [**putApi202110ExternalPreferredLineItemByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemByLineItemId) | **PUT** /2023-10/retail-media/preferred-line-items/{line-item-id} | *CampaignApi* | [**putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **PUT** /2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | diff --git a/sdks/retailmedia_2023-10/api/openapi.yaml b/sdks/retailmedia_2023-10/api/openapi.yaml index f3402577..4bf6baa0 100644 --- a/sdks/retailmedia_2023-10/api/openapi.yaml +++ b/sdks/retailmedia_2023-10/api/openapi.yaml @@ -49,6 +49,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -60,6 +61,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -67,12 +69,18 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfAccount' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfAccount' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfAccount' description: Success tags: - - Campaign + - Accounts x-accepts: application/json /2023-10/retail-media/accounts/{accountId}/brands: get: @@ -107,6 +115,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -118,6 +127,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -125,9 +135,15 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfBrand' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfBrand' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfBrand' description: Success tags: - Campaign @@ -165,6 +181,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -176,6 +193,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -183,9 +201,15 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' description: Success tags: - Campaign @@ -923,7 +947,10 @@ paths: description: Catalog download initiated. "400": content: - application/x-json-stream: {} + application/x-json-stream: + schema: + format: binary + type: string application/json: {} description: "The indicated catalog is not available for retrieval, wait\ \ for a success status." @@ -1480,7 +1507,7 @@ paths: $ref: '#/components/schemas/BalanceResponsePagedListResponse' description: Success tags: - - Campaign + - Balance x-accepts: application/json post: description: Create balance for the given account id @@ -1510,7 +1537,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json /2023-10/retail-media/accounts/{account-id}/balances/{balanceId}: @@ -1544,7 +1571,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-accepts: application/json patch: description: Modify a balance for the given account id @@ -1583,7 +1610,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json /2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds: @@ -1624,7 +1651,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json /2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates: @@ -1665,7 +1692,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json /2023-10/retail-media/accounts/{account-id}/campaigns: @@ -2081,7 +2108,7 @@ paths: $ref: '#/components/schemas/BalanceCampaign202110PagedListResponse' description: Success tags: - - Campaign + - Balance x-accepts: application/json /2023-10/retail-media/balances/{balance-id}/campaigns/append: post: @@ -3210,7 +3237,8 @@ paths: components: schemas: ApplicationSummaryModelResponse: - description: Response of ApplicationSummaryModel + description: A top-level object that encapsulates a Criteo API response for + a single value example: data: attributes: @@ -3271,17 +3299,16 @@ components: nullable: true readOnly: true type: array - uniqueItems: false errors: items: $ref: '#/components/schemas/CommonProblem' nullable: true readOnly: true type: array - uniqueItems: false type: object ApplicationSummaryModelResource: - description: A class that represents a ValueType in a guild compliant way + description: A top-level object that encapsulates a Criteo API response for + a single value example: attributes: organizationId: 6 @@ -3298,7 +3325,7 @@ components: $ref: '#/components/schemas/ApplicationSummaryModel' type: object CommonProblem: - description: Common problem object. Can be specialized as needed. + description: Common problem object. example: traceId: traceId traceIdentifier: traceIdentifier @@ -3334,7 +3361,7 @@ components: nullable: true type: string code: - description: "A machine-readable error code, expressed as a string value." + description: "A machine-readable error code, expressed as a string value." nullable: true type: string instance: @@ -3362,7 +3389,8 @@ components: type: string type: object ApplicationSummaryModel: - description: Model of ApplicationSummary + description: Used for the /me endpoint. Contains information about the currently + authenticated application that we accept to give to our clients example: organizationId: 6 name: name @@ -3484,8 +3512,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false JsonApiPageResponseOfBrand: description: A wrapper class to return a single page of with metadata @@ -3564,8 +3592,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false JsonApiPageResponseOfRetailer: description: A wrapper class to return a single page of with metadata @@ -3650,8 +3678,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false PageMetadata: description: Metadata related to the current request example: @@ -3690,7 +3718,6 @@ components: - currentPageIndex - currentPageSize type: object - x-nullable: false CommonError: description: A JSON:API Common error structure example: @@ -3756,7 +3783,6 @@ components: type: string x-nullable: false type: object - x-nullable: false CommonWarning: description: A JSON:API Base common warning example: @@ -3822,7 +3848,6 @@ components: type: string x-nullable: false type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndAccountAndAccount: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -3854,7 +3879,6 @@ components: - id - type type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndBrandAndBrand: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -3877,7 +3901,6 @@ components: - id - type type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndRetailerAndRetailer: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -3903,7 +3926,6 @@ components: - id - type type: object - x-nullable: false ExternalAccount: description: A Retail Media Account used to launch campaigns and line items example: @@ -3941,7 +3963,6 @@ components: countries: items: type: string - x-nullable: false type: array x-nullable: false currency: @@ -3958,6 +3979,7 @@ components: companyName: nullable: true type: string + x-nullable: true required: - countries - currency @@ -3966,7 +3988,6 @@ components: - timeZone - type type: object - x-nullable: false ExternalBrand: description: A Retail Media Brand used to represent a collection of products sold under the same umbrella name @@ -3981,7 +4002,6 @@ components: required: - name type: object - x-nullable: false ExternalRetailer: description: A Retail Media Retailer used to represent a selection of products from multiple brands @@ -4002,13 +4022,11 @@ components: - auction - preferred type: string - x-nullable: false type: array x-nullable: false required: - name type: object - x-nullable: false AssetResponse: description: A class implementing the response of the Criteo API as described in API Guild Guidelines with a single entity as body @@ -8420,6 +8438,9 @@ components: example: data: attributes: + advertiserTypes: + - retailer + - retailer campaignType: all clickAttributionWindow: none endDate: 2000-01-23T04:56:07.000+00:00 @@ -8543,6 +8564,9 @@ components: a single value example: attributes: + advertiserTypes: + - retailer + - retailer campaignType: all clickAttributionWindow: none endDate: 2000-01-23T04:56:07.000+00:00 @@ -8743,6 +8767,8 @@ components: - salesChannel - environment - pageTypeName + - pageCategory + - taxonomyBreadcrumb - keyword - searchTerm type: string @@ -8917,6 +8943,8 @@ components: - salesChannel - environment - pageTypeName + - pageCategory + - taxonomyBreadcrumb - keyword - searchTerm type: string @@ -8973,6 +9001,9 @@ components: AsyncRevenueReport: description: Async Revenue report body request example: + advertiserTypes: + - retailer + - retailer campaignType: all clickAttributionWindow: none endDate: 2000-01-23T04:56:07.000+00:00 @@ -9000,13 +9031,13 @@ components: - date properties: ids: - description: Campaign ids to report on + description: Supply account ids to report on items: type: string nullable: true type: array id: - description: Campaign id to report on + description: Supply account id to report on nullable: true type: string reportType: @@ -9043,6 +9074,16 @@ components: - sponsorship nullable: true type: string + advertiserTypes: + description: "Filter on the type of advertiser: retailer, brand, seller" + items: + enum: + - retailer + - brand + - seller + type: string + nullable: true + type: array skuRelations: description: "Filter on sku relations: Same SKU, Same Parent SKU, Same Category,\ \ Same Brand or Same Seller" @@ -9115,6 +9156,7 @@ components: - accountId - accountName - accountTypeName + - advertiserType - campaignId - campaignName - campaignTypeName @@ -9138,6 +9180,7 @@ components: - advProductName - advProductGtin - advProductMpn + - buyType - soldBy - saleChannel - attributionSettings @@ -9182,6 +9225,7 @@ components: - transactions - assistedSales - assistedUnits + - revenue - openAuctionRevenue - preferredDealsRevenue - ctr @@ -9234,6 +9278,7 @@ components: currentPageIndex: 1 data: - attributes: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -9251,6 +9296,7 @@ components: id: id type: type - attributes: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -9336,6 +9382,7 @@ components: example: data: attributes: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -11219,6 +11266,7 @@ components: description: Data model for a Resource example: attributes: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -11918,6 +11966,7 @@ components: description: A Retail Media Balance used to determine the funds available for any or all campaigns in an account example: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -11949,30 +11998,22 @@ components: description: Amount of billable funds allotted to the balance. format: decimal nullable: true - required: - - "false" type: number x-nullable: true spent: format: decimal nullable: true - required: - - "false" type: number x-nullable: true remaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true startDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -12015,6 +12056,15 @@ components: - OffsiteAwareness type: string x-nullable: false + privateMarketBillingType: + description: Billing type for Private Market. + enum: + - NotApplicable + - BillByRetailer + - BillByCriteo + - Unknown + type: string + x-nullable: false required: - balanceType - createdAt @@ -12023,6 +12073,7 @@ components: - memo - name - poNumber + - privateMarketBillingType - remaining - salesForceId - spendType @@ -12075,15 +12126,11 @@ components: budgetSpent: format: decimal nullable: true - required: - - "false" type: number x-nullable: true budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true status: @@ -12145,22 +12192,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -12244,8 +12285,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -12273,8 +12312,6 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true campaignId: @@ -12288,8 +12325,6 @@ components: budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true createdAt: @@ -12342,8 +12377,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -12354,29 +12387,21 @@ components: maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true bidStrategy: @@ -12408,8 +12433,6 @@ components: targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -12427,8 +12450,6 @@ components: budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true createdAt: @@ -12514,15 +12535,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: @@ -12649,8 +12666,6 @@ components: bidOverride: format: decimal nullable: true - required: - - "false" type: number x-nullable: true type: object @@ -12773,16 +12788,12 @@ components: description: Amount of billable funds allotted to the balance. format: decimal nullable: true - required: - - "false" type: number x-nullable: true startDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -12974,22 +12985,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -13058,8 +13063,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -13083,36 +13086,26 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -13160,8 +13153,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -13189,36 +13180,26 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -13274,15 +13255,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: @@ -13356,22 +13333,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -13469,15 +13440,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: diff --git a/sdks/retailmedia_2023-10/build.gradle b/sdks/retailmedia_2023-10/build.gradle index bf1e6fa9..17e246ac 100644 --- a/sdks/retailmedia_2023-10/build.gradle +++ b/sdks/retailmedia_2023-10/build.gradle @@ -23,7 +23,7 @@ if (JavaVersion.current().isJava8Compatible()) { } group = 'com.criteo' -version = '2023.10.0.240626' +version = '2023.10.0.240731' repositories { jcenter() @@ -74,7 +74,7 @@ publishing { mavenJava(MavenPublication) { groupId 'com.criteo' artifactId 'criteo-api-retailmedia-sdk' - version '2023.10.0.240626' + version '2023.10.0.240731' from components.java artifact sourcesJar artifact javadocJar diff --git a/sdks/retailmedia_2023-10/docs/AccountsApi.md b/sdks/retailmedia_2023-10/docs/AccountsApi.md new file mode 100644 index 00000000..44fb6ee6 --- /dev/null +++ b/sdks/retailmedia_2023-10/docs/AccountsApi.md @@ -0,0 +1,102 @@ +# AccountsApi + +All URIs are relative to *https://api.criteo.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getApiV1ExternalAccounts**](AccountsApi.md#getApiV1ExternalAccounts) | **GET** /2023-10/retail-media/accounts | | + + + +## getApiV1ExternalAccounts + +> JsonApiPageResponseOfAccount getApiV1ExternalAccounts(limitToId, pageIndex, pageSize) + + + +Gets page of account objects that the current user can access + +### Example + +```java +package com.criteo.api.retailmedia.v2023_10; + +import com.criteo.api.retailmedia.v2023_10.ApiClient; +import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; +import com.criteo.api.retailmedia.v2023_10.ApiException; +import com.criteo.api.retailmedia.v2023_10.Configuration; +import com.criteo.api.retailmedia.v2023_10.auth.*; +import com.criteo.api.retailmedia.v2023_10.model.*; +import com.criteo.api.retailmedia.v2023_10.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request + try { + JsonApiPageResponseOfAccount result = apiInstance.getApiV1ExternalAccounts(limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#getApiV1ExternalAccounts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | + +### Return type + +[**JsonApiPageResponseOfAccount**](JsonApiPageResponseOfAccount.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + diff --git a/sdks/retailmedia_2023-10/docs/ApplicationSummaryModel.md b/sdks/retailmedia_2023-10/docs/ApplicationSummaryModel.md index 704b26ad..d5e84458 100644 --- a/sdks/retailmedia_2023-10/docs/ApplicationSummaryModel.md +++ b/sdks/retailmedia_2023-10/docs/ApplicationSummaryModel.md @@ -2,7 +2,7 @@ # ApplicationSummaryModel -Model of ApplicationSummary +Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients ## Properties diff --git a/sdks/retailmedia_2023-10/docs/ApplicationSummaryModelResource.md b/sdks/retailmedia_2023-10/docs/ApplicationSummaryModelResource.md index 81ed2c97..af688c5d 100644 --- a/sdks/retailmedia_2023-10/docs/ApplicationSummaryModelResource.md +++ b/sdks/retailmedia_2023-10/docs/ApplicationSummaryModelResource.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResource -A class that represents a ValueType in a guild compliant way +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/retailmedia_2023-10/docs/ApplicationSummaryModelResponse.md b/sdks/retailmedia_2023-10/docs/ApplicationSummaryModelResponse.md index 47b6bd74..658b5549 100644 --- a/sdks/retailmedia_2023-10/docs/ApplicationSummaryModelResponse.md +++ b/sdks/retailmedia_2023-10/docs/ApplicationSummaryModelResponse.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResponse -Response of ApplicationSummaryModel +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/retailmedia_2023-10/docs/AsyncCampaignsReport.md b/sdks/retailmedia_2023-10/docs/AsyncCampaignsReport.md index d735484a..18252b4c 100644 --- a/sdks/retailmedia_2023-10/docs/AsyncCampaignsReport.md +++ b/sdks/retailmedia_2023-10/docs/AsyncCampaignsReport.md @@ -116,6 +116,8 @@ Async Campaigns report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_2023-10/docs/AsyncLineItemsReport.md b/sdks/retailmedia_2023-10/docs/AsyncLineItemsReport.md index 9a3a2e0e..276cd5a1 100644 --- a/sdks/retailmedia_2023-10/docs/AsyncLineItemsReport.md +++ b/sdks/retailmedia_2023-10/docs/AsyncLineItemsReport.md @@ -116,6 +116,8 @@ Async Line Items report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_2023-10/docs/AsyncRevenueReport.md b/sdks/retailmedia_2023-10/docs/AsyncRevenueReport.md index bb77396b..16ae32dc 100644 --- a/sdks/retailmedia_2023-10/docs/AsyncRevenueReport.md +++ b/sdks/retailmedia_2023-10/docs/AsyncRevenueReport.md @@ -8,12 +8,13 @@ Async Revenue report body request | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**ids** | **List<String>** | Campaign ids to report on | [optional] | -|**id** | **String** | Campaign id to report on | [optional] | +|**ids** | **List<String>** | Supply account ids to report on | [optional] | +|**id** | **String** | Supply account id to report on | [optional] | |**reportType** | [**ReportTypeEnum**](#ReportTypeEnum) | Type of report | [optional] | |**revenueType** | [**RevenueTypeEnum**](#RevenueTypeEnum) | Type of revenue | [optional] | |**soldBy** | [**SoldByEnum**](#SoldByEnum) | Filter on the seller: Indirect Sold, Direct Sold or Private Market | [optional] | |**buyType** | [**BuyTypeEnum**](#BuyTypeEnum) | Filter on buy type: Auction, Preferred Deals or Sponsorship | [optional] | +|**advertiserTypes** | [**List<AdvertiserTypesEnum>**](#List<AdvertiserTypesEnum>) | Filter on the type of advertiser: retailer, brand, seller | [optional] | |**skuRelations** | [**List<SkuRelationsEnum>**](#List<SkuRelationsEnum>) | Filter on sku relations: Same SKU, Same Parent SKU, Same Category, Same Brand or Same Seller | [optional] | |**format** | [**FormatEnum**](#FormatEnum) | Format of the output | [optional] | |**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Filter the type of campaigns to report on: sponsoredProducts or onSiteDisplays | [optional] | @@ -69,6 +70,16 @@ Async Revenue report body request +## Enum: List<AdvertiserTypesEnum> + +| Name | Value | +|---- | -----| +| RETAILER | "retailer" | +| BRAND | "brand" | +| SELLER | "seller" | + + + ## Enum: List<SkuRelationsEnum> | Name | Value | @@ -145,6 +156,7 @@ Async Revenue report body request | ACCOUNTID | "accountId" | | ACCOUNTNAME | "accountName" | | ACCOUNTTYPENAME | "accountTypeName" | +| ADVERTISERTYPE | "advertiserType" | | CAMPAIGNID | "campaignId" | | CAMPAIGNNAME | "campaignName" | | CAMPAIGNTYPENAME | "campaignTypeName" | @@ -168,6 +180,7 @@ Async Revenue report body request | ADVPRODUCTNAME | "advProductName" | | ADVPRODUCTGTIN | "advProductGtin" | | ADVPRODUCTMPN | "advProductMpn" | +| BUYTYPE | "buyType" | | SOLDBY | "soldBy" | | SALECHANNEL | "saleChannel" | | ATTRIBUTIONSETTINGS | "attributionSettings" | @@ -212,6 +225,7 @@ Async Revenue report body request | TRANSACTIONS | "transactions" | | ASSISTEDSALES | "assistedSales" | | ASSISTEDUNITS | "assistedUnits" | +| REVENUE | "revenue" | | OPENAUCTIONREVENUE | "openAuctionRevenue" | | PREFERREDDEALSREVENUE | "preferredDealsRevenue" | | CTR | "ctr" | diff --git a/sdks/retailmedia_2023-10/docs/BalanceApi.md b/sdks/retailmedia_2023-10/docs/BalanceApi.md new file mode 100644 index 00000000..a98fc93e --- /dev/null +++ b/sdks/retailmedia_2023-10/docs/BalanceApi.md @@ -0,0 +1,666 @@ +# BalanceApi + +All URIs are relative to *https://api.criteo.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getApi202110ExternalBalanceCampaignsByBalanceId**](BalanceApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2023-10/retail-media/balances/{balance-id}/campaigns | | +| [**getApiV1ExternalAccountBalancesByAccountId**](BalanceApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2023-10/retail-media/accounts/{account-id}/balances | | +| [**getApiV1ExternalAccountByAccountIdAndBalanceId**](BalanceApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId} | | +| [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](BalanceApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId} | | +| [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](BalanceApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | | +| [**postApiV1ExternalAccountBalancesByAccountId**](BalanceApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2023-10/retail-media/accounts/{account-id}/balances | | +| [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](BalanceApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | | + + + +## getApi202110ExternalBalanceCampaignsByBalanceId + +> BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize) + + + +Gets page of campaigns for the given balanceId + +### Example + +```java +package com.criteo.api.retailmedia.v2023_10; + +import com.criteo.api.retailmedia.v2023_10.ApiClient; +import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; +import com.criteo.api.retailmedia.v2023_10.ApiException; +import com.criteo.api.retailmedia.v2023_10.Configuration; +import com.criteo.api.retailmedia.v2023_10.auth.*; +import com.criteo.api.retailmedia.v2023_10.model.*; +import com.criteo.api.retailmedia.v2023_10.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String balanceId = "balanceId_example"; // String | The balance to get campaigns from + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + try { + BalanceCampaign202110PagedListResponse result = apiInstance.getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApi202110ExternalBalanceCampaignsByBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **balanceId** | **String**| The balance to get campaigns from | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | + +### Return type + +[**BalanceCampaign202110PagedListResponse**](BalanceCampaign202110PagedListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## getApiV1ExternalAccountBalancesByAccountId + +> BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize) + + + +Get page of balances for the given accountId. + +### Example + +```java +package com.criteo.api.retailmedia.v2023_10; + +import com.criteo.api.retailmedia.v2023_10.ApiClient; +import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; +import com.criteo.api.retailmedia.v2023_10.ApiException; +import com.criteo.api.retailmedia.v2023_10.Configuration; +import com.criteo.api.retailmedia.v2023_10.auth.*; +import com.criteo.api.retailmedia.v2023_10.model.*; +import com.criteo.api.retailmedia.v2023_10.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account to get page of balances for + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request + try { + BalanceResponsePagedListResponse result = apiInstance.getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApiV1ExternalAccountBalancesByAccountId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account to get page of balances for | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | + +### Return type + +[**BalanceResponsePagedListResponse**](BalanceResponsePagedListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## getApiV1ExternalAccountByAccountIdAndBalanceId + +> BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId) + + + +Get a balance for the given account id and balance id + +### Example + +```java +package com.criteo.api.retailmedia.v2023_10; + +import com.criteo.api.retailmedia.v2023_10.ApiClient; +import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; +import com.criteo.api.retailmedia.v2023_10.ApiException; +import com.criteo.api.retailmedia.v2023_10.Configuration; +import com.criteo.api.retailmedia.v2023_10.auth.*; +import com.criteo.api.retailmedia.v2023_10.model.*; +import com.criteo.api.retailmedia.v2023_10.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance id + try { + BalanceResponse result = apiInstance.getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApiV1ExternalAccountByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance id | | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## patchApiV1ExternalAccountByAccountIdAndBalanceId + +> BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest) + + + +Modify a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2023_10; + +import com.criteo.api.retailmedia.v2023_10.ApiClient; +import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; +import com.criteo.api.retailmedia.v2023_10.ApiException; +import com.criteo.api.retailmedia.v2023_10.Configuration; +import com.criteo.api.retailmedia.v2023_10.auth.*; +import com.criteo.api.retailmedia.v2023_10.model.*; +import com.criteo.api.retailmedia.v2023_10.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to change the dates + UpdateBalanceModelRequest updateBalanceModelRequest = new UpdateBalanceModelRequest(); // UpdateBalanceModelRequest | + try { + BalanceResponse result = apiInstance.patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#patchApiV1ExternalAccountByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to change the dates | | +| **updateBalanceModelRequest** | [**UpdateBalanceModelRequest**](UpdateBalanceModelRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId + +> BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest) + + + +Add funds to a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2023_10; + +import com.criteo.api.retailmedia.v2023_10.ApiClient; +import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; +import com.criteo.api.retailmedia.v2023_10.ApiException; +import com.criteo.api.retailmedia.v2023_10.Configuration; +import com.criteo.api.retailmedia.v2023_10.auth.*; +import com.criteo.api.retailmedia.v2023_10.model.*; +import com.criteo.api.retailmedia.v2023_10.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to add funds to + AddFundsToBalanceRequest addFundsToBalanceRequest = new AddFundsToBalanceRequest(); // AddFundsToBalanceRequest | + try { + BalanceResponse result = apiInstance.postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to add funds to | | +| **addFundsToBalanceRequest** | [**AddFundsToBalanceRequest**](AddFundsToBalanceRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## postApiV1ExternalAccountBalancesByAccountId + +> BalanceResponse postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest) + + + +Create balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2023_10; + +import com.criteo.api.retailmedia.v2023_10.ApiClient; +import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; +import com.criteo.api.retailmedia.v2023_10.ApiException; +import com.criteo.api.retailmedia.v2023_10.Configuration; +import com.criteo.api.retailmedia.v2023_10.auth.*; +import com.criteo.api.retailmedia.v2023_10.model.*; +import com.criteo.api.retailmedia.v2023_10.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account to create balances for + CreateBalanceRequest createBalanceRequest = new CreateBalanceRequest(); // CreateBalanceRequest | + try { + BalanceResponse result = apiInstance.postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV1ExternalAccountBalancesByAccountId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account to create balances for | | +| **createBalanceRequest** | [**CreateBalanceRequest**](CreateBalanceRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Success | - | + + +## postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId + +> BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest) + + + +Change dates of a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2023_10; + +import com.criteo.api.retailmedia.v2023_10.ApiClient; +import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; +import com.criteo.api.retailmedia.v2023_10.ApiException; +import com.criteo.api.retailmedia.v2023_10.Configuration; +import com.criteo.api.retailmedia.v2023_10.auth.*; +import com.criteo.api.retailmedia.v2023_10.model.*; +import com.criteo.api.retailmedia.v2023_10.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to change the dates + ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest = new ChangeDatesOfBalanceRequest(); // ChangeDatesOfBalanceRequest | + try { + BalanceResponse result = apiInstance.postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to change the dates | | +| **changeDatesOfBalanceRequest** | [**ChangeDatesOfBalanceRequest**](ChangeDatesOfBalanceRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + diff --git a/sdks/retailmedia_2023-10/docs/CampaignApi.md b/sdks/retailmedia_2023-10/docs/CampaignApi.md index 83a3afac..09994ca5 100644 --- a/sdks/retailmedia_2023-10/docs/CampaignApi.md +++ b/sdks/retailmedia_2023-10/docs/CampaignApi.md @@ -10,7 +10,6 @@ All URIs are relative to *https://api.criteo.com* | [**fetchProposal**](CampaignApi.md#fetchProposal) | **GET** /2023-10/retail-media/preferred-deal-line-items/{id}/proposal | | | [**getApi202110ExternalAccountCreativesByAccountId**](CampaignApi.md#getApi202110ExternalAccountCreativesByAccountId) | **GET** /2023-10/retail-media/accounts/{account-id}/creatives | | | [**getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId**](CampaignApi.md#getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId) | **GET** /2023-10/retail-media/auction-line-items/{line-item-id}/targeting/keywords | | -| [**getApi202110ExternalBalanceCampaignsByBalanceId**](CampaignApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2023-10/retail-media/balances/{balance-id}/campaigns | | | [**getApi202110ExternalCampaignPreferredLineItemsByCampaignId**](CampaignApi.md#getApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **GET** /2023-10/retail-media/campaigns/{campaign-id}/preferred-line-items | | | [**getApi202110ExternalLineItemProductsByLineItemId**](CampaignApi.md#getApi202110ExternalLineItemProductsByLineItemId) | **GET** /2023-10/retail-media/line-items/{line-item-id}/products | | | [**getApi202110ExternalPreferredLineItemByLineItemId**](CampaignApi.md#getApi202110ExternalPreferredLineItemByLineItemId) | **GET** /2023-10/retail-media/preferred-line-items/{line-item-id} | | @@ -26,18 +25,14 @@ All URIs are relative to *https://api.criteo.com* | [**getApi202301ExternalAccountCampaignsByAccountId**](CampaignApi.md#getApi202301ExternalAccountCampaignsByAccountId) | **GET** /2023-10/retail-media/accounts/{account-id}/campaigns | | | [**getApi202301ExternalCampaignByCampaignId**](CampaignApi.md#getApi202301ExternalCampaignByCampaignId) | **GET** /2023-10/retail-media/campaigns/{campaignId} | | | [**getApi202301ExternalLineItemBidMultipliersByLineItemId**](CampaignApi.md#getApi202301ExternalLineItemBidMultipliersByLineItemId) | **GET** /2023-10/retail-media/line-items/{line-item-id}/bid-multipliers | | -| [**getApiV1ExternalAccountBalancesByAccountId**](CampaignApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2023-10/retail-media/accounts/{account-id}/balances | | | [**getApiV1ExternalAccountBrandsByAccountId**](CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /2023-10/retail-media/accounts/{accountId}/brands | | -| [**getApiV1ExternalAccountByAccountIdAndBalanceId**](CampaignApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId} | | | [**getApiV1ExternalAccountRetailersByAccountId**](CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /2023-10/retail-media/accounts/{accountId}/retailers | | -| [**getApiV1ExternalAccounts**](CampaignApi.md#getApiV1ExternalAccounts) | **GET** /2023-10/retail-media/accounts | | | [**getApiV1ExternalCatalogOutputByCatalogId**](CampaignApi.md#getApiV1ExternalCatalogOutputByCatalogId) | **GET** /2023-10/retail-media/catalogs/{catalogId}/output | | | [**getApiV1ExternalCatalogStatusByCatalogId**](CampaignApi.md#getApiV1ExternalCatalogStatusByCatalogId) | **GET** /2023-10/retail-media/catalogs/{catalogId}/status | | | [**getApiV2ExternalAccountLineItemsByAccountId**](CampaignApi.md#getApiV2ExternalAccountLineItemsByAccountId) | **GET** /2023-10/retail-media/accounts/{account-id}/line-items | | | [**getApiV2ExternalAuctionLineItemByLineItemId**](CampaignApi.md#getApiV2ExternalAuctionLineItemByLineItemId) | **GET** /2023-10/retail-media/auction-line-items/{line-item-id} | | | [**getApiV2ExternalCampaignAuctionLineItemsByCampaignId**](CampaignApi.md#getApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **GET** /2023-10/retail-media/campaigns/{campaign-id}/auction-line-items | | | [**getApiV2ExternalLineItemByLineItemId**](CampaignApi.md#getApiV2ExternalLineItemByLineItemId) | **GET** /2023-10/retail-media/line-items/{line-item-id} | | -| [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](CampaignApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId} | | | [**postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId**](CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId) | **POST** /2023-10/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append | | | [**postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId**](CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId) | **POST** /2023-10/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete | | | [**postApi202110ExternalBalanceCampaignsAppendByBalanceId**](CampaignApi.md#postApi202110ExternalBalanceCampaignsAppendByBalanceId) | **POST** /2023-10/retail-media/balances/{balance-id}/campaigns/append | | @@ -56,10 +51,7 @@ All URIs are relative to *https://api.criteo.com* | [**postApi202210ExternalAccountCreativesByAccountId**](CampaignApi.md#postApi202210ExternalAccountCreativesByAccountId) | **POST** /2023-10/retail-media/accounts/{account-id}/creatives | | | [**postApi202210ExternalAccountCreativesSearchByAccountId**](CampaignApi.md#postApi202210ExternalAccountCreativesSearchByAccountId) | **POST** /2023-10/retail-media/accounts/{account-id}/creatives/search | | | [**postApi202301ExternalAccountCampaignsByAccountId**](CampaignApi.md#postApi202301ExternalAccountCampaignsByAccountId) | **POST** /2023-10/retail-media/accounts/{account-id}/campaigns | | -| [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](CampaignApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | | -| [**postApiV1ExternalAccountBalancesByAccountId**](CampaignApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2023-10/retail-media/accounts/{account-id}/balances | | | [**postApiV1ExternalAccountCatalogsByAccountId**](CampaignApi.md#postApiV1ExternalAccountCatalogsByAccountId) | **POST** /2023-10/retail-media/accounts/{accountId}/catalogs | | -| [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](CampaignApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | | | [**postApiV2ExternalCampaignAuctionLineItemsByCampaignId**](CampaignApi.md#postApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **POST** /2023-10/retail-media/campaigns/{campaign-id}/auction-line-items | | | [**putApi202110ExternalPreferredLineItemByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemByLineItemId) | **PUT** /2023-10/retail-media/preferred-line-items/{line-item-id} | | | [**putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **PUT** /2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | | @@ -615,101 +607,6 @@ public class Example { | **400** | Bad Request | - | -## getApi202110ExternalBalanceCampaignsByBalanceId - -> BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize) - - - -Gets page of campaigns for the given balanceId - -### Example - -```java -package com.criteo.api.retailmedia.v2023_10; - -import com.criteo.api.retailmedia.v2023_10.ApiClient; -import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_10.ApiException; -import com.criteo.api.retailmedia.v2023_10.Configuration; -import com.criteo.api.retailmedia.v2023_10.auth.*; -import com.criteo.api.retailmedia.v2023_10.model.*; -import com.criteo.api.retailmedia.v2023_10.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String balanceId = "balanceId_example"; // String | The balance to get campaigns from - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request - try { - BalanceCampaign202110PagedListResponse result = apiInstance.getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApi202110ExternalBalanceCampaignsByBalanceId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **balanceId** | **String**| The balance to get campaigns from | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | - -### Return type - -[**BalanceCampaign202110PagedListResponse**](BalanceCampaign202110PagedListResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - ## getApi202110ExternalCampaignPreferredLineItemsByCampaignId > PreferredLineItem202110PagedListResponse getApi202110ExternalCampaignPreferredLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize) @@ -2080,13 +1977,13 @@ public class Example { | **200** | Success | - | -## getApiV1ExternalAccountBalancesByAccountId +## getApiV1ExternalAccountBrandsByAccountId -> BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize) +> JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize) -Get page of balances for the given accountId. +Gets page of retailer objects that are associated with the given account ### Example @@ -2127,15 +2024,15 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account to get page of balances for + String accountId = "accountId_example"; // String | The given account id List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { - BalanceResponsePagedListResponse result = apiInstance.getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize); + JsonApiPageResponseOfBrand result = apiInstance.getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountBalancesByAccountId"); + System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountBrandsByAccountId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2150,14 +2047,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account to get page of balances for | | +| **accountId** | **String**| The given account id | | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | | **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | | **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type -[**BalanceResponsePagedListResponse**](BalanceResponsePagedListResponse.md) +[**JsonApiPageResponseOfBrand**](JsonApiPageResponseOfBrand.md) ### Authorization @@ -2166,7 +2063,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/plain, application/json, text/json ### HTTP response details @@ -2175,9 +2072,9 @@ public class Example { | **200** | Success | - | -## getApiV1ExternalAccountBrandsByAccountId +## getApiV1ExternalAccountRetailersByAccountId -> JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize) +> JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize) @@ -2224,13 +2121,13 @@ public class Example { CampaignApi apiInstance = new CampaignApi(defaultClient); String accountId = "accountId_example"; // String | The given account id List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { - JsonApiPageResponseOfBrand result = apiInstance.getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize); + JsonApiPageResponseOfRetailer result = apiInstance.getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountBrandsByAccountId"); + System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountRetailersByAccountId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2247,12 +2144,12 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **accountId** | **String**| The given account id | | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type -[**JsonApiPageResponseOfBrand**](JsonApiPageResponseOfBrand.md) +[**JsonApiPageResponseOfRetailer**](JsonApiPageResponseOfRetailer.md) ### Authorization @@ -2261,7 +2158,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/plain, application/json, text/json ### HTTP response details @@ -2270,13 +2167,13 @@ public class Example { | **200** | Success | - | -## getApiV1ExternalAccountByAccountIdAndBalanceId +## getApiV1ExternalCatalogOutputByCatalogId -> BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId) +> File getApiV1ExternalCatalogOutputByCatalogId(catalogId) -Get a balance for the given account id and balance id +Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. ### Example @@ -2317,13 +2214,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account of the balance - String balanceId = "balanceId_example"; // String | The balance id + String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. try { - BalanceResponse result = apiInstance.getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId); + File result = apiInstance.getApiV1ExternalCatalogOutputByCatalogId(catalogId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountByAccountIdAndBalanceId"); + System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogOutputByCatalogId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2338,12 +2234,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account of the balance | | -| **balanceId** | **String**| The balance id | | +| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | ### Return type -[**BalanceResponse**](BalanceResponse.md) +[**File**](File.md) ### Authorization @@ -2352,22 +2247,23 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: application/x-json-stream, application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Success | - | +| **200** | Catalog download initiated. | - | +| **400** | The indicated catalog is not available for retrieval, wait for a success status. | - | -## getApiV1ExternalAccountRetailersByAccountId +## getApiV1ExternalCatalogStatusByCatalogId -> JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize) +> JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(catalogId) -Gets page of retailer objects that are associated with the given account +Check the status of a catalog request. ### Example @@ -2408,15 +2304,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The given account id - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. try { - JsonApiPageResponseOfRetailer result = apiInstance.getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize); + JsonApiSingleResponseOfCatalogStatus result = apiInstance.getApiV1ExternalCatalogStatusByCatalogId(catalogId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountRetailersByAccountId"); + System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogStatusByCatalogId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2431,14 +2324,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The given account id | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | ### Return type -[**JsonApiPageResponseOfRetailer**](JsonApiPageResponseOfRetailer.md) +[**JsonApiSingleResponseOfCatalogStatus**](JsonApiSingleResponseOfCatalogStatus.md) ### Authorization @@ -2453,16 +2343,16 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Success | - | +| **200** | Catalog request found. | - | -## getApiV1ExternalAccounts +## getApiV2ExternalAccountLineItemsByAccountId -> JsonApiPageResponseOfAccount getApiV1ExternalAccounts(limitToId, pageIndex, pageSize) +> CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize) -Gets page of account objects that the current user can access +Gets page of line item objects for the given account id ### Example @@ -2503,14 +2393,17 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); + String accountId = "accountId_example"; // String | The given account id + List limitToCampaignId = Arrays.asList(); // List | The campaign ids that you would like to limit your result set to + String limitToType = "Unknown"; // String | The campaign types that you would like to limit your result set to List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request try { - JsonApiPageResponseOfAccount result = apiInstance.getApiV1ExternalAccounts(limitToId, pageIndex, pageSize); + CommonLineItemPagedListResponse result = apiInstance.getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccounts"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalAccountLineItemsByAccountId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2525,13 +2418,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The given account id | | +| **limitToCampaignId** | [**List<String>**](String.md)| The campaign ids that you would like to limit your result set to | [optional] | +| **limitToType** | **String**| The campaign types that you would like to limit your result set to | [optional] [enum: Unknown, Auction, Preferred] | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | | **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | | **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | ### Return type -[**JsonApiPageResponseOfAccount**](JsonApiPageResponseOfAccount.md) +[**CommonLineItemPagedListResponse**](CommonLineItemPagedListResponse.md) ### Authorization @@ -2549,13 +2445,13 @@ public class Example { | **200** | Success | - | -## getApiV1ExternalCatalogOutputByCatalogId +## getApiV2ExternalAuctionLineItemByLineItemId -> File getApiV1ExternalCatalogOutputByCatalogId(catalogId) +> AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(lineItemId) -Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. +Gets the auction line item for the given line item id ### Example @@ -2596,12 +2492,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. + String lineItemId = "lineItemId_example"; // String | The given line item id try { - File result = apiInstance.getApiV1ExternalCatalogOutputByCatalogId(catalogId); + AuctionLineItemResponse result = apiInstance.getApiV2ExternalAuctionLineItemByLineItemId(lineItemId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogOutputByCatalogId"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalAuctionLineItemByLineItemId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2616,11 +2512,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | +| **lineItemId** | **String**| The given line item id | | ### Return type -[**File**](File.md) +[**AuctionLineItemResponse**](AuctionLineItemResponse.md) ### Authorization @@ -2629,23 +2525,23 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/x-json-stream, application/json +- **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Catalog download initiated. | - | -| **400** | The indicated catalog is not available for retrieval, wait for a success status. | - | +| **200** | Success | - | +| **400** | Bad Request | - | -## getApiV1ExternalCatalogStatusByCatalogId +## getApiV2ExternalCampaignAuctionLineItemsByCampaignId -> JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(catalogId) +> AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize) -Check the status of a catalog request. +Gets page of auction line item objects for the given campaign id ### Example @@ -2686,12 +2582,15 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. + String campaignId = "campaignId_example"; // String | The given campaign id + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request try { - JsonApiSingleResponseOfCatalogStatus result = apiInstance.getApiV1ExternalCatalogStatusByCatalogId(catalogId); + AuctionLineItemPagedListResponse result = apiInstance.getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogStatusByCatalogId"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalCampaignAuctionLineItemsByCampaignId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2706,11 +2605,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | +| **campaignId** | **String**| The given campaign id | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | ### Return type -[**JsonApiSingleResponseOfCatalogStatus**](JsonApiSingleResponseOfCatalogStatus.md) +[**AuctionLineItemPagedListResponse**](AuctionLineItemPagedListResponse.md) ### Authorization @@ -2725,16 +2627,17 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Catalog request found. | - | +| **200** | Success | - | +| **400** | Bad Request | - | -## getApiV2ExternalAccountLineItemsByAccountId +## getApiV2ExternalLineItemByLineItemId -> CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize) +> CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(lineItemId) -Gets page of line item objects for the given account id +Gets the line item for the given line item id ### Example @@ -2775,17 +2678,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The given account id - List limitToCampaignId = Arrays.asList(); // List | The campaign ids that you would like to limit your result set to - String limitToType = "Unknown"; // String | The campaign types that you would like to limit your result set to - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + String lineItemId = "lineItemId_example"; // String | The given line item id try { - CommonLineItemPagedListResponse result = apiInstance.getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); + CommonLineItemResponse result = apiInstance.getApiV2ExternalLineItemByLineItemId(lineItemId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalAccountLineItemsByAccountId"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalLineItemByLineItemId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2800,16 +2698,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The given account id | | -| **limitToCampaignId** | [**List<String>**](String.md)| The campaign ids that you would like to limit your result set to | [optional] | -| **limitToType** | **String**| The campaign types that you would like to limit your result set to | [optional] [enum: Unknown, Auction, Preferred] | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **lineItemId** | **String**| The given line item id | | ### Return type -[**CommonLineItemPagedListResponse**](CommonLineItemPagedListResponse.md) +[**CommonLineItemResponse**](CommonLineItemResponse.md) ### Authorization @@ -2827,13 +2720,13 @@ public class Example { | **200** | Success | - | -## getApiV2ExternalAuctionLineItemByLineItemId +## postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId -> AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(lineItemId) +> KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(lineItemId, keywordTarget202110Request) -Gets the auction line item for the given line item id +This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. ### Example @@ -2874,12 +2767,13 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String lineItemId = "lineItemId_example"; // String | The given line item id + String lineItemId = "lineItemId_example"; // String | The line item to interact with + KeywordTarget202110Request keywordTarget202110Request = new KeywordTarget202110Request(); // KeywordTarget202110Request | try { - AuctionLineItemResponse result = apiInstance.getApiV2ExternalAuctionLineItemByLineItemId(lineItemId); + KeywordTarget202110Response result = apiInstance.postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(lineItemId, keywordTarget202110Request); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalAuctionLineItemByLineItemId"); + System.err.println("Exception when calling CampaignApi#postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2894,377 +2788,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **lineItemId** | **String**| The given line item id | | - -### Return type - -[**AuctionLineItemResponse**](AuctionLineItemResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | -| **400** | Bad Request | - | - - -## getApiV2ExternalCampaignAuctionLineItemsByCampaignId - -> AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize) - - - -Gets page of auction line item objects for the given campaign id - -### Example - -```java -package com.criteo.api.retailmedia.v2023_10; - -import com.criteo.api.retailmedia.v2023_10.ApiClient; -import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_10.ApiException; -import com.criteo.api.retailmedia.v2023_10.Configuration; -import com.criteo.api.retailmedia.v2023_10.auth.*; -import com.criteo.api.retailmedia.v2023_10.model.*; -import com.criteo.api.retailmedia.v2023_10.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String campaignId = "campaignId_example"; // String | The given campaign id - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request - try { - AuctionLineItemPagedListResponse result = apiInstance.getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalCampaignAuctionLineItemsByCampaignId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The given campaign id | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | - -### Return type - -[**AuctionLineItemPagedListResponse**](AuctionLineItemPagedListResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | -| **400** | Bad Request | - | - - -## getApiV2ExternalLineItemByLineItemId - -> CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(lineItemId) - - - -Gets the line item for the given line item id - -### Example - -```java -package com.criteo.api.retailmedia.v2023_10; - -import com.criteo.api.retailmedia.v2023_10.ApiClient; -import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_10.ApiException; -import com.criteo.api.retailmedia.v2023_10.Configuration; -import com.criteo.api.retailmedia.v2023_10.auth.*; -import com.criteo.api.retailmedia.v2023_10.model.*; -import com.criteo.api.retailmedia.v2023_10.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String lineItemId = "lineItemId_example"; // String | The given line item id - try { - CommonLineItemResponse result = apiInstance.getApiV2ExternalLineItemByLineItemId(lineItemId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalLineItemByLineItemId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **lineItemId** | **String**| The given line item id | | - -### Return type - -[**CommonLineItemResponse**](CommonLineItemResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## patchApiV1ExternalAccountByAccountIdAndBalanceId - -> BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest) - - - -Modify a balance for the given account id - -### Example - -```java -package com.criteo.api.retailmedia.v2023_10; - -import com.criteo.api.retailmedia.v2023_10.ApiClient; -import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_10.ApiException; -import com.criteo.api.retailmedia.v2023_10.Configuration; -import com.criteo.api.retailmedia.v2023_10.auth.*; -import com.criteo.api.retailmedia.v2023_10.model.*; -import com.criteo.api.retailmedia.v2023_10.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account of the balance - String balanceId = "balanceId_example"; // String | The balance to change the dates - UpdateBalanceModelRequest updateBalanceModelRequest = new UpdateBalanceModelRequest(); // UpdateBalanceModelRequest | - try { - BalanceResponse result = apiInstance.patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#patchApiV1ExternalAccountByAccountIdAndBalanceId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account of the balance | | -| **balanceId** | **String**| The balance to change the dates | | -| **updateBalanceModelRequest** | [**UpdateBalanceModelRequest**](UpdateBalanceModelRequest.md)| | [optional] | - -### Return type - -[**BalanceResponse**](BalanceResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId - -> KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(lineItemId, keywordTarget202110Request) - - - -This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. - -### Example - -```java -package com.criteo.api.retailmedia.v2023_10; - -import com.criteo.api.retailmedia.v2023_10.ApiClient; -import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_10.ApiException; -import com.criteo.api.retailmedia.v2023_10.Configuration; -import com.criteo.api.retailmedia.v2023_10.auth.*; -import com.criteo.api.retailmedia.v2023_10.model.*; -import com.criteo.api.retailmedia.v2023_10.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String lineItemId = "lineItemId_example"; // String | The line item to interact with - KeywordTarget202110Request keywordTarget202110Request = new KeywordTarget202110Request(); // KeywordTarget202110Request | - try { - KeywordTarget202110Response result = apiInstance.postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(lineItemId, keywordTarget202110Request); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **lineItemId** | **String**| The line item to interact with | | -| **keywordTarget202110Request** | [**KeywordTarget202110Request**](KeywordTarget202110Request.md)| | [optional] | +| **lineItemId** | **String**| The line item to interact with | | +| **keywordTarget202110Request** | [**KeywordTarget202110Request**](KeywordTarget202110Request.md)| | [optional] | ### Return type @@ -4840,190 +4365,6 @@ public class Example { | **201** | Success | - | -## postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId - -> BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest) - - - -Add funds to a balance for the given account id - -### Example - -```java -package com.criteo.api.retailmedia.v2023_10; - -import com.criteo.api.retailmedia.v2023_10.ApiClient; -import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_10.ApiException; -import com.criteo.api.retailmedia.v2023_10.Configuration; -import com.criteo.api.retailmedia.v2023_10.auth.*; -import com.criteo.api.retailmedia.v2023_10.model.*; -import com.criteo.api.retailmedia.v2023_10.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account of the balance - String balanceId = "balanceId_example"; // String | The balance to add funds to - AddFundsToBalanceRequest addFundsToBalanceRequest = new AddFundsToBalanceRequest(); // AddFundsToBalanceRequest | - try { - BalanceResponse result = apiInstance.postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account of the balance | | -| **balanceId** | **String**| The balance to add funds to | | -| **addFundsToBalanceRequest** | [**AddFundsToBalanceRequest**](AddFundsToBalanceRequest.md)| | [optional] | - -### Return type - -[**BalanceResponse**](BalanceResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## postApiV1ExternalAccountBalancesByAccountId - -> BalanceResponse postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest) - - - -Create balance for the given account id - -### Example - -```java -package com.criteo.api.retailmedia.v2023_10; - -import com.criteo.api.retailmedia.v2023_10.ApiClient; -import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_10.ApiException; -import com.criteo.api.retailmedia.v2023_10.Configuration; -import com.criteo.api.retailmedia.v2023_10.auth.*; -import com.criteo.api.retailmedia.v2023_10.model.*; -import com.criteo.api.retailmedia.v2023_10.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account to create balances for - CreateBalanceRequest createBalanceRequest = new CreateBalanceRequest(); // CreateBalanceRequest | - try { - BalanceResponse result = apiInstance.postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#postApiV1ExternalAccountBalancesByAccountId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account to create balances for | | -| **createBalanceRequest** | [**CreateBalanceRequest**](CreateBalanceRequest.md)| | [optional] | - -### Return type - -[**BalanceResponse**](BalanceResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Success | - | - - ## postApiV1ExternalAccountCatalogsByAccountId > JsonApiSingleResponseOfCatalogStatus postApiV1ExternalAccountCatalogsByAccountId(accountId, jsonApiRequestOfCatalogRequest) @@ -5115,99 +4456,6 @@ public class Example { | **200** | Catalog request successfully created | - | -## postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId - -> BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest) - - - -Change dates of a balance for the given account id - -### Example - -```java -package com.criteo.api.retailmedia.v2023_10; - -import com.criteo.api.retailmedia.v2023_10.ApiClient; -import com.criteo.api.retailmedia.v2023_10.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_10.ApiException; -import com.criteo.api.retailmedia.v2023_10.Configuration; -import com.criteo.api.retailmedia.v2023_10.auth.*; -import com.criteo.api.retailmedia.v2023_10.model.*; -import com.criteo.api.retailmedia.v2023_10.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account of the balance - String balanceId = "balanceId_example"; // String | The balance to change the dates - ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest = new ChangeDatesOfBalanceRequest(); // ChangeDatesOfBalanceRequest | - try { - BalanceResponse result = apiInstance.postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account of the balance | | -| **balanceId** | **String**| The balance to change the dates | | -| **changeDatesOfBalanceRequest** | [**ChangeDatesOfBalanceRequest**](ChangeDatesOfBalanceRequest.md)| | [optional] | - -### Return type - -[**BalanceResponse**](BalanceResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - ## postApiV2ExternalCampaignAuctionLineItemsByCampaignId > AuctionLineItemResponse postApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, auctionLineItemCreateModelRequest) diff --git a/sdks/retailmedia_2023-10/docs/CommonProblem.md b/sdks/retailmedia_2023-10/docs/CommonProblem.md index 1ee7a1f1..3f7f164b 100644 --- a/sdks/retailmedia_2023-10/docs/CommonProblem.md +++ b/sdks/retailmedia_2023-10/docs/CommonProblem.md @@ -2,7 +2,7 @@ # CommonProblem -Common problem object. Can be specialized as needed. +Common problem object. ## Properties @@ -11,7 +11,7 @@ Common problem object. Can be specialized as needed. |**traceId** | **String** | The request correlation ID this problem comes from. | [optional] | |**traceIdentifier** | **String** | The request correlation ID this problem comes from. (deprecated, use traceId instead) | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The problem's category. | [optional] | -|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | +|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | |**instance** | **String** | A URI that identifies the specific occurrence of the problem. | [optional] | |**title** | **String** | A short human-readable description of the problem type | [optional] | |**detail** | **String** | A human-readable explanation specific to this occurrence of the problem | [optional] | diff --git a/sdks/retailmedia_2023-10/docs/ExternalBalanceResponse.md b/sdks/retailmedia_2023-10/docs/ExternalBalanceResponse.md index 15a6dde1..127b9534 100644 --- a/sdks/retailmedia_2023-10/docs/ExternalBalanceResponse.md +++ b/sdks/retailmedia_2023-10/docs/ExternalBalanceResponse.md @@ -22,6 +22,7 @@ A Retail Media Balance used to determine the funds available for any or all camp |**balanceType** | [**BalanceTypeEnum**](#BalanceTypeEnum) | Type of the balance | | |**salesForceId** | **String** | SalesForceId the balance is linked to. | | |**spendType** | [**SpendTypeEnum**](#SpendTypeEnum) | Spend Type of the balance. | | +|**privateMarketBillingType** | [**PrivateMarketBillingTypeEnum**](#PrivateMarketBillingTypeEnum) | Billing type for Private Market. | | @@ -56,3 +57,14 @@ A Retail Media Balance used to determine the funds available for any or all camp +## Enum: PrivateMarketBillingTypeEnum + +| Name | Value | +|---- | -----| +| NOTAPPLICABLE | "NotApplicable" | +| BILLBYRETAILER | "BillByRetailer" | +| BILLBYCRITEO | "BillByCriteo" | +| UNKNOWN | "Unknown" | + + + diff --git a/sdks/retailmedia_2023-10/docs/JsonApiPageResponseOfAccount.md b/sdks/retailmedia_2023-10/docs/JsonApiPageResponseOfAccount.md index af50ec88..aa059cfb 100644 --- a/sdks/retailmedia_2023-10/docs/JsonApiPageResponseOfAccount.md +++ b/sdks/retailmedia_2023-10/docs/JsonApiPageResponseOfAccount.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndAccountAndAccount>**](JsonApiBodyWithIdOfInt64AndAccountAndAccount.md) | | | diff --git a/sdks/retailmedia_2023-10/docs/JsonApiPageResponseOfBrand.md b/sdks/retailmedia_2023-10/docs/JsonApiPageResponseOfBrand.md index 0c2714ac..83498f93 100644 --- a/sdks/retailmedia_2023-10/docs/JsonApiPageResponseOfBrand.md +++ b/sdks/retailmedia_2023-10/docs/JsonApiPageResponseOfBrand.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndBrandAndBrand>**](JsonApiBodyWithIdOfInt64AndBrandAndBrand.md) | | | diff --git a/sdks/retailmedia_2023-10/docs/JsonApiPageResponseOfRetailer.md b/sdks/retailmedia_2023-10/docs/JsonApiPageResponseOfRetailer.md index e62ca2fd..4c29b7d7 100644 --- a/sdks/retailmedia_2023-10/docs/JsonApiPageResponseOfRetailer.md +++ b/sdks/retailmedia_2023-10/docs/JsonApiPageResponseOfRetailer.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndRetailerAndRetailer>**](JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md) | | | diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/ApiClient.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/ApiClient.java index 93453cbb..10479bef 100644 --- a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/ApiClient.java +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/ApiClient.java @@ -213,7 +213,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2023.10.0.240626/java"); + setUserAgent("OpenAPI-Generator/2023.10.0.240731/java"); authentications = new HashMap(); } diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/api/AccountsApi.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/api/AccountsApi.java new file mode 100644 index 00000000..4b102e68 --- /dev/null +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/api/AccountsApi.java @@ -0,0 +1,215 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2023-10 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2023_10.api; + +import com.criteo.api.retailmedia.v2023_10.ApiCallback; +import com.criteo.api.retailmedia.v2023_10.ApiClient; +import com.criteo.api.retailmedia.v2023_10.ApiException; +import com.criteo.api.retailmedia.v2023_10.ApiResponse; +import com.criteo.api.retailmedia.v2023_10.Configuration; +import com.criteo.api.retailmedia.v2023_10.Pair; +import com.criteo.api.retailmedia.v2023_10.ProgressRequestBody; +import com.criteo.api.retailmedia.v2023_10.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.criteo.api.retailmedia.v2023_10.model.JsonApiPageResponseOfAccount; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class AccountsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public AccountsApi() { + this(Configuration.getDefaultApiClient()); + } + + public AccountsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getApiV1ExternalAccounts + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2023-10/retail-media/accounts"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + return getApiV1ExternalAccountsCall(limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return JsonApiPageResponseOfAccount + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountsWithHttpInfo(limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return ApiResponse<JsonApiPageResponseOfAccount> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV1ExternalAccountsWithHttpInfo(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountsAsync(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/api/BalanceApi.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/api/BalanceApi.java new file mode 100644 index 00000000..3a0f08b7 --- /dev/null +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/api/BalanceApi.java @@ -0,0 +1,1051 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2023-10 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2023_10.api; + +import com.criteo.api.retailmedia.v2023_10.ApiCallback; +import com.criteo.api.retailmedia.v2023_10.ApiClient; +import com.criteo.api.retailmedia.v2023_10.ApiException; +import com.criteo.api.retailmedia.v2023_10.ApiResponse; +import com.criteo.api.retailmedia.v2023_10.Configuration; +import com.criteo.api.retailmedia.v2023_10.Pair; +import com.criteo.api.retailmedia.v2023_10.ProgressRequestBody; +import com.criteo.api.retailmedia.v2023_10.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.criteo.api.retailmedia.v2023_10.model.AddFundsToBalanceRequest; +import com.criteo.api.retailmedia.v2023_10.model.BalanceCampaign202110PagedListResponse; +import com.criteo.api.retailmedia.v2023_10.model.BalanceResponse; +import com.criteo.api.retailmedia.v2023_10.model.BalanceResponsePagedListResponse; +import com.criteo.api.retailmedia.v2023_10.model.ChangeDatesOfBalanceRequest; +import com.criteo.api.retailmedia.v2023_10.model.CreateBalanceRequest; +import com.criteo.api.retailmedia.v2023_10.model.UpdateBalanceModelRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class BalanceApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public BalanceApi() { + this(Configuration.getDefaultApiClient()); + } + + public BalanceApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getApi202110ExternalBalanceCampaignsByBalanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2023-10/retail-media/balances/{balance-id}/campaigns" + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling getApi202110ExternalBalanceCampaignsByBalanceId(Async)"); + } + + return getApi202110ExternalBalanceCampaignsByBalanceIdCall(balanceId, limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return BalanceCampaign202110PagedListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(balanceId, limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return ApiResponse<BalanceCampaign202110PagedListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdAsync(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiV1ExternalAccountBalancesByAccountId + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2023-10/retail-media/accounts/{account-id}/balances" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountBalancesByAccountId(Async)"); + } + + return getApiV1ExternalAccountBalancesByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Get page of balances for the given accountId. + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return BalanceResponsePagedListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Get page of balances for the given accountId. + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return ApiResponse<BalanceResponsePagedListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get page of balances for the given accountId. + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiV1ExternalAccountByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2023-10/retail-media/accounts/{account-id}/balances/{balanceId}" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + return getApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, _callback); + + } + + /** + * + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId); + return localVarResp.getData(); + } + + /** + * + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for patchApiV1ExternalAccountByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateBalanceModelRequest; + + // create path and map variables + String localVarPath = "/2023-10/retail-media/accounts/{account-id}/balances/{balanceId}" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + return patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, updateBalanceModelRequest, _callback); + + } + + /** + * + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { + ApiResponse localVarResp = patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, updateBalanceModelRequest); + return localVarResp.getData(); + } + + /** + * + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { + okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = addFundsToBalanceRequest; + + // create path and map variables + String localVarPath = "/2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); + } + + return postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(accountId, balanceId, addFundsToBalanceRequest, _callback); + + } + + /** + * + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, addFundsToBalanceRequest); + return localVarResp.getData(); + } + + /** + * + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdAsync(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV1ExternalAccountBalancesByAccountId + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createBalanceRequest; + + // create path and map variables + String localVarPath = "/2023-10/retail-media/accounts/{account-id}/balances" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountBalancesByAccountId(Async)"); + } + + return postApiV1ExternalAccountBalancesByAccountIdCall(accountId, createBalanceRequest, _callback); + + } + + /** + * + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public BalanceResponse postApiV1ExternalAccountBalancesByAccountId(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, createBalanceRequest); + return localVarResp.getData(); + } + + /** + * + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public ApiResponse postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = changeDatesOfBalanceRequest; + + // create path and map variables + String localVarPath = "/2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); + } + + return postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); + + } + + /** + * + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, changeDatesOfBalanceRequest); + return localVarResp.getData(); + } + + /** + * + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdAsync(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/api/CampaignApi.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/api/CampaignApi.java index 1d620c5d..a04df78a 100644 --- a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/api/CampaignApi.java +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/api/CampaignApi.java @@ -27,7 +27,6 @@ import java.io.IOException; -import com.criteo.api.retailmedia.v2023_10.model.AddFundsToBalanceRequest; import com.criteo.api.retailmedia.v2023_10.model.AddRemoveKeywordsModelRequest; import com.criteo.api.retailmedia.v2023_10.model.AddToBasketIdsUpdateModel202110Request; import com.criteo.api.retailmedia.v2023_10.model.AddToBasketTarget202110Request; @@ -42,14 +41,10 @@ import com.criteo.api.retailmedia.v2023_10.model.AudienceTarget202110Response; import com.criteo.api.retailmedia.v2023_10.model.BalanceCampaign202110ListRequest; import com.criteo.api.retailmedia.v2023_10.model.BalanceCampaign202110PagedListResponse; -import com.criteo.api.retailmedia.v2023_10.model.BalanceResponse; -import com.criteo.api.retailmedia.v2023_10.model.BalanceResponsePagedListResponse; import com.criteo.api.retailmedia.v2023_10.model.Category202204; import com.criteo.api.retailmedia.v2023_10.model.Category202204ListResponse; -import com.criteo.api.retailmedia.v2023_10.model.ChangeDatesOfBalanceRequest; import com.criteo.api.retailmedia.v2023_10.model.CommonLineItemPagedListResponse; import com.criteo.api.retailmedia.v2023_10.model.CommonLineItemResponse; -import com.criteo.api.retailmedia.v2023_10.model.CreateBalanceRequest; import com.criteo.api.retailmedia.v2023_10.model.Creative202110ListResponse; import com.criteo.api.retailmedia.v2023_10.model.Creative202210ListResponse; import com.criteo.api.retailmedia.v2023_10.model.Creative202210Response; @@ -57,7 +52,6 @@ import com.criteo.api.retailmedia.v2023_10.model.CreativeUpdateModel202207; import com.criteo.api.retailmedia.v2023_10.model.ExternalRetailerPages202110; import java.io.File; -import com.criteo.api.retailmedia.v2023_10.model.JsonApiPageResponseOfAccount; import com.criteo.api.retailmedia.v2023_10.model.JsonApiPageResponseOfBrand; import com.criteo.api.retailmedia.v2023_10.model.JsonApiPageResponseOfCampaignV202301; import com.criteo.api.retailmedia.v2023_10.model.JsonApiPageResponseOfRetailer; @@ -86,7 +80,6 @@ import com.criteo.api.retailmedia.v2023_10.model.StoreTarget202110Response; import com.criteo.api.retailmedia.v2023_10.model.TemplateListResponse; import com.criteo.api.retailmedia.v2023_10.model.TemplateResponse; -import com.criteo.api.retailmedia.v2023_10.model.UpdateBalanceModelRequest; import java.lang.reflect.Type; import java.util.ArrayList; @@ -901,153 +894,6 @@ public okhttp3.Call getApi202110ExternalAuctionLineItemTargetingKeywordsByLineIt localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getApi202110ExternalBalanceCampaignsByBalanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-10/retail-media/balances/{balance-id}/campaigns" - .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling getApi202110ExternalBalanceCampaignsByBalanceId(Async)"); - } - - return getApi202110ExternalBalanceCampaignsByBalanceIdCall(balanceId, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return BalanceCampaign202110PagedListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(balanceId, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<BalanceCampaign202110PagedListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdAsync(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getApi202110ExternalCampaignPreferredLineItemsByCampaignId * @param campaignId The given campaign id (required) @@ -3038,8 +2884,8 @@ public okhttp3.Call getApi202301ExternalLineItemBidMultipliersByLineItemIdAsync( return localVarCall; } /** - * Build call for getApiV1ExternalAccountBalancesByAccountId - * @param accountId The account to get page of balances for (required) + * Build call for getApiV1ExternalAccountBrandsByAccountId + * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) @@ -3052,7 +2898,7 @@ public okhttp3.Call getApi202301ExternalLineItemBidMultipliersByLineItemIdAsync( 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3069,8 +2915,8 @@ public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accoun Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts/{account-id}/balances" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2023-10/retail-media/accounts/{accountId}/brands" + .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3091,7 +2937,9 @@ public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accoun } final String[] localVarAccepts = { - "application/json" + "text/plain", + "application/json", + "text/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3110,24 +2958,24 @@ public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accoun } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountBalancesByAccountId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountBrandsByAccountId(Async)"); } - return getApiV1ExternalAccountBalancesByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + return getApiV1ExternalAccountBrandsByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); } /** * - * Get page of balances for the given accountId. - * @param accountId The account to get page of balances for (required) + * Gets page of retailer objects that are associated with the given account + * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) - * @return BalanceResponsePagedListResponse + * @return JsonApiPageResponseOfBrand * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3135,19 +2983,19 @@ private okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCal
200 Success -
*/ - public BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountBrandsByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); return localVarResp.getData(); } /** * - * Get page of balances for the given accountId. - * @param accountId The account to get page of balances for (required) + * Gets page of retailer objects that are associated with the given account + * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) - * @return ApiResponse<BalanceResponsePagedListResponse> + * @return ApiResponse<JsonApiPageResponseOfBrand> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3155,16 +3003,16 @@ public BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccount
200 Success -
*/ - public ApiResponse getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV1ExternalAccountBrandsByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Get page of balances for the given accountId. - * @param accountId The account to get page of balances for (required) + * Gets page of retailer objects that are associated with the given account + * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) @@ -3177,19 +3025,19 @@ public ApiResponse getApiV1ExternalAccountBala 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalAccountBrandsByAccountId + * Build call for getApiV1ExternalAccountRetailersByAccountId * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3199,7 +3047,7 @@ public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdAsync(String accou 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3216,7 +3064,7 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts/{accountId}/brands" + String localVarPath = "/2023-10/retail-media/accounts/{accountId}/retailers" .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -3238,7 +3086,9 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountI } final String[] localVarAccepts = { - "application/json" + "text/plain", + "application/json", + "text/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3257,13 +3107,13 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountI } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountBrandsByAccountId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountRetailersByAccountId(Async)"); } - return getApiV1ExternalAccountBrandsByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + return getApiV1ExternalAccountRetailersByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); } @@ -3272,9 +3122,9 @@ private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall( * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return JsonApiPageResponseOfBrand + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return JsonApiPageResponseOfRetailer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3282,8 +3132,8 @@ private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(
200 Success -
*/ - public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountBrandsByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + public JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountRetailersByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); return localVarResp.getData(); } @@ -3292,9 +3142,9 @@ public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(Strin * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<JsonApiPageResponseOfBrand> + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return ApiResponse<JsonApiPageResponseOfRetailer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3302,9 +3152,9 @@ public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(Strin
200 Success -
*/ - public ApiResponse getApiV1ExternalAccountBrandsByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV1ExternalAccountRetailersByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -3313,8 +3163,8 @@ public ApiResponse getApiV1ExternalAccountBrandsByAc * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3324,27 +3174,27 @@ public ApiResponse getApiV1ExternalAccountBrandsByAc 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalAccountByAccountIdAndBalanceId - * @param accountId The account of the balance (required) - * @param balanceId The balance id (required) + * Build call for getApiV1ExternalCatalogOutputByCatalogId + * @param catalogId A catalog ID returned from an account catalog request. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Success -
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
*/ - public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdCall(String catalogId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3361,9 +3211,8 @@ public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String ac Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts/{account-id}/balances/{balanceId}" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2023-10/retail-media/catalogs/{catalogId}/output" + .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3372,6 +3221,7 @@ public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String ac Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + "application/x-json-stream", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); @@ -3391,95 +3241,87 @@ public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String ac } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); - } - - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + private okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(String catalogId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'catalogId' is set + if (catalogId == null) { + throw new ApiException("Missing the required parameter 'catalogId' when calling getApiV1ExternalCatalogOutputByCatalogId(Async)"); } - return getApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, _callback); + return getApiV1ExternalCatalogOutputByCatalogIdCall(catalogId, _callback); } /** * - * Get a balance for the given account id and balance id - * @param accountId The account of the balance (required) - * @param balanceId The balance id (required) - * @return BalanceResponse + * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. + * @param catalogId A catalog ID returned from an account catalog request. (required) + * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Success -
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
*/ - public BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId); + public File getApiV1ExternalCatalogOutputByCatalogId(String catalogId) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalCatalogOutputByCatalogIdWithHttpInfo(catalogId); return localVarResp.getData(); } /** * - * Get a balance for the given account id and balance id - * @param accountId The account of the balance (required) - * @param balanceId The balance id (required) - * @return ApiResponse<BalanceResponse> + * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. + * @param catalogId A catalog ID returned from an account catalog request. (required) + * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Success -
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
*/ - public ApiResponse getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV1ExternalCatalogOutputByCatalogIdWithHttpInfo(String catalogId) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(catalogId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Get a balance for the given account id and balance id - * @param accountId The account of the balance (required) - * @param balanceId The balance id (required) + * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. + * @param catalogId A catalog ID returned from an account catalog request. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Success -
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
*/ - public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdAsync(String catalogId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(catalogId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalAccountRetailersByAccountId - * @param accountId The given account id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * Build call for getApiV1ExternalCatalogStatusByCatalogId + * @param catalogId A catalog ID returned from an account catalog request. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request found. -
*/ - public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdCall(String catalogId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3496,8 +3338,8 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accou Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts/{accountId}/retailers" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2023-10/retail-media/catalogs/{catalogId}/status" + .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3505,18 +3347,6 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accou Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - final String[] localVarAccepts = { "application/json" }; @@ -3537,82 +3367,76 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accou } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountRetailersByAccountId(Async)"); + private okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(String catalogId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'catalogId' is set + if (catalogId == null) { + throw new ApiException("Missing the required parameter 'catalogId' when calling getApiV1ExternalCatalogStatusByCatalogId(Async)"); } - return getApiV1ExternalAccountRetailersByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + return getApiV1ExternalCatalogStatusByCatalogIdCall(catalogId, _callback); } /** * - * Gets page of retailer objects that are associated with the given account - * @param accountId The given account id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return JsonApiPageResponseOfRetailer + * Check the status of a catalog request. + * @param catalogId A catalog ID returned from an account catalog request. (required) + * @return JsonApiSingleResponseOfCatalogStatus * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request found. -
*/ - public JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountRetailersByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + public JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(String catalogId) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalCatalogStatusByCatalogIdWithHttpInfo(catalogId); return localVarResp.getData(); } /** * - * Gets page of retailer objects that are associated with the given account - * @param accountId The given account id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<JsonApiPageResponseOfRetailer> + * Check the status of a catalog request. + * @param catalogId A catalog ID returned from an account catalog request. (required) + * @return ApiResponse<JsonApiSingleResponseOfCatalogStatus> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request found. -
*/ - public ApiResponse getApiV1ExternalAccountRetailersByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV1ExternalCatalogStatusByCatalogIdWithHttpInfo(String catalogId) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(catalogId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Gets page of retailer objects that are associated with the given account - * @param accountId The given account id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * Check the status of a catalog request. + * @param catalogId A catalog ID returned from an account catalog request. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request found. -
*/ - public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdAsync(String catalogId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(catalogId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalAccounts + * Build call for getApiV2ExternalAccountLineItemsByAccountId + * @param accountId The given account id (required) + * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) + * @param limitToType The campaign types that you would like to limit your result set to (optional) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) * @param pageSize The maximum number of items you would like to receive in this request (optional) @@ -3625,7 +3449,7 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdAsync(String acco 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdCall(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3642,7 +3466,8 @@ public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts"; + String localVarPath = "/2023-10/retail-media/accounts/{account-id}/line-items" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3650,6 +3475,14 @@ public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (limitToCampaignId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToCampaignId", limitToCampaignId)); + } + + if (limitToType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limitToType", limitToType)); + } + if (limitToId != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); } @@ -3682,18 +3515,26 @@ public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - return getApiV1ExternalAccountsCall(limitToId, pageIndex, pageSize, _callback); + private okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV2ExternalAccountLineItemsByAccountId(Async)"); + } + + return getApiV2ExternalAccountLineItemsByAccountIdCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, _callback); } /** * - * Gets page of account objects that the current user can access + * Gets page of line item objects for the given account id + * @param accountId The given account id (required) + * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) + * @param limitToType The campaign types that you would like to limit your result set to (optional) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return JsonApiPageResponseOfAccount + * @return CommonLineItemPagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3701,18 +3542,21 @@ private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List lim
200 Success -
*/ - public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountsWithHttpInfo(limitToId, pageIndex, pageSize); + public CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalAccountLineItemsByAccountIdWithHttpInfo(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); return localVarResp.getData(); } /** * - * Gets page of account objects that the current user can access + * Gets page of line item objects for the given account id + * @param accountId The given account id (required) + * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) + * @param limitToType The campaign types that you would like to limit your result set to (optional) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<JsonApiPageResponseOfAccount> + * @return ApiResponse<CommonLineItemPagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3720,15 +3564,18 @@ public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitT
200 Success -
*/ - public ApiResponse getApiV1ExternalAccountsWithHttpInfo(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV2ExternalAccountLineItemsByAccountIdWithHttpInfo(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Gets page of account objects that the current user can access + * Gets page of line item objects for the given account id + * @param accountId The given account id (required) + * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) + * @param limitToType The campaign types that you would like to limit your result set to (optional) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) * @param pageSize The maximum number of items you would like to receive in this request (optional) @@ -3741,27 +3588,27 @@ public ApiResponse getApiV1ExternalAccountsWithHtt 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountsAsync(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdAsync(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalCatalogOutputByCatalogId - * @param catalogId A catalog ID returned from an account catalog request. (required) + * Build call for getApiV2ExternalAuctionLineItemByLineItemId + * @param lineItemId The given line item id (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - + +
Status Code Description Response Headers
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdCall(String catalogId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3778,8 +3625,8 @@ public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdCall(String catalogI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-10/retail-media/catalogs/{catalogId}/output" - .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); + String localVarPath = "/2023-10/retail-media/auction-line-items/{line-item-id}" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3788,7 +3635,6 @@ public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdCall(String catalogI Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/x-json-stream", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); @@ -3808,87 +3654,91 @@ public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdCall(String catalogI } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(String catalogId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'catalogId' is set - if (catalogId == null) { - throw new ApiException("Missing the required parameter 'catalogId' when calling getApiV1ExternalCatalogOutputByCatalogId(Async)"); + private okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalAuctionLineItemByLineItemId(Async)"); } - return getApiV1ExternalCatalogOutputByCatalogIdCall(catalogId, _callback); + return getApiV2ExternalAuctionLineItemByLineItemIdCall(lineItemId, _callback); } /** * - * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @return File + * Gets the auction line item for the given line item id + * @param lineItemId The given line item id (required) + * @return AuctionLineItemResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + +
Status Code Description Response Headers
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
200 Success -
400 Bad Request -
*/ - public File getApiV1ExternalCatalogOutputByCatalogId(String catalogId) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalCatalogOutputByCatalogIdWithHttpInfo(catalogId); + public AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(String lineItemId) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalAuctionLineItemByLineItemIdWithHttpInfo(lineItemId); return localVarResp.getData(); } /** * - * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @return ApiResponse<File> + * Gets the auction line item for the given line item id + * @param lineItemId The given line item id (required) + * @return ApiResponse<AuctionLineItemResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + +
Status Code Description Response Headers
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
200 Success -
400 Bad Request -
*/ - public ApiResponse getApiV1ExternalCatalogOutputByCatalogIdWithHttpInfo(String catalogId) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(catalogId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV2ExternalAuctionLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(lineItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. - * @param catalogId A catalog ID returned from an account catalog request. (required) + * Gets the auction line item for the given line item id + * @param lineItemId The given line item id (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - + +
Status Code Description Response Headers
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdAsync(String catalogId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(catalogId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalCatalogStatusByCatalogId - * @param catalogId A catalog ID returned from an account catalog request. (required) + * Build call for getApiV2ExternalCampaignAuctionLineItemsByCampaignId + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Catalog request found. -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdCall(String catalogId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3905,8 +3755,8 @@ public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdCall(String catalogI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-10/retail-media/catalogs/{catalogId}/status" - .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); + String localVarPath = "/2023-10/retail-media/campaigns/{campaign-id}/auction-line-items" + .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3914,6 +3764,18 @@ public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdCall(String catalogI Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + final String[] localVarAccepts = { "application/json" }; @@ -3934,1001 +3796,45 @@ public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdCall(String catalogI } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(String catalogId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'catalogId' is set - if (catalogId == null) { - throw new ApiException("Missing the required parameter 'catalogId' when calling getApiV1ExternalCatalogStatusByCatalogId(Async)"); + private okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling getApiV2ExternalCampaignAuctionLineItemsByCampaignId(Async)"); } - return getApiV1ExternalCatalogStatusByCatalogIdCall(catalogId, _callback); + return getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(campaignId, limitToId, pageIndex, pageSize, _callback); } /** * - * Check the status of a catalog request. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @return JsonApiSingleResponseOfCatalogStatus + * Gets page of auction line item objects for the given campaign id + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return AuctionLineItemPagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Catalog request found. -
200 Success -
400 Bad Request -
*/ - public JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(String catalogId) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalCatalogStatusByCatalogIdWithHttpInfo(catalogId); + public AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(campaignId, limitToId, pageIndex, pageSize); return localVarResp.getData(); } /** * - * Check the status of a catalog request. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @return ApiResponse<JsonApiSingleResponseOfCatalogStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Catalog request found. -
- */ - public ApiResponse getApiV1ExternalCatalogStatusByCatalogIdWithHttpInfo(String catalogId) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(catalogId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Check the status of a catalog request. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Catalog request found. -
- */ - public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdAsync(String catalogId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(catalogId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV2ExternalAccountLineItemsByAccountId - * @param accountId The given account id (required) - * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) - * @param limitToType The campaign types that you would like to limit your result set to (optional) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdCall(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts/{account-id}/line-items" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToCampaignId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToCampaignId", limitToCampaignId)); - } - - if (limitToType != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limitToType", limitToType)); - } - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV2ExternalAccountLineItemsByAccountId(Async)"); - } - - return getApiV2ExternalAccountLineItemsByAccountIdCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of line item objects for the given account id - * @param accountId The given account id (required) - * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) - * @param limitToType The campaign types that you would like to limit your result set to (optional) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return CommonLineItemPagedListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalAccountLineItemsByAccountIdWithHttpInfo(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of line item objects for the given account id - * @param accountId The given account id (required) - * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) - * @param limitToType The campaign types that you would like to limit your result set to (optional) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<CommonLineItemPagedListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApiV2ExternalAccountLineItemsByAccountIdWithHttpInfo(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of line item objects for the given account id - * @param accountId The given account id (required) - * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) - * @param limitToType The campaign types that you would like to limit your result set to (optional) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdAsync(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV2ExternalAuctionLineItemByLineItemId - * @param lineItemId The given line item id (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-10/retail-media/auction-line-items/{line-item-id}" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalAuctionLineItemByLineItemId(Async)"); - } - - return getApiV2ExternalAuctionLineItemByLineItemIdCall(lineItemId, _callback); - - } - - /** - * - * Gets the auction line item for the given line item id - * @param lineItemId The given line item id (required) - * @return AuctionLineItemResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(String lineItemId) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalAuctionLineItemByLineItemIdWithHttpInfo(lineItemId); - return localVarResp.getData(); - } - - /** - * - * Gets the auction line item for the given line item id - * @param lineItemId The given line item id (required) - * @return ApiResponse<AuctionLineItemResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public ApiResponse getApiV2ExternalAuctionLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(lineItemId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets the auction line item for the given line item id - * @param lineItemId The given line item id (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV2ExternalCampaignAuctionLineItemsByCampaignId - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-10/retail-media/campaigns/{campaign-id}/auction-line-items" - .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'campaignId' is set - if (campaignId == null) { - throw new ApiException("Missing the required parameter 'campaignId' when calling getApiV2ExternalCampaignAuctionLineItemsByCampaignId(Async)"); - } - - return getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(campaignId, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of auction line item objects for the given campaign id - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return AuctionLineItemPagedListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(campaignId, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of auction line item objects for the given campaign id - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<AuctionLineItemPagedListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public ApiResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of auction line item objects for the given campaign id - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdAsync(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV2ExternalLineItemByLineItemId - * @param lineItemId The given line item id (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV2ExternalLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-10/retail-media/line-items/{line-item-id}" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalLineItemByLineItemId(Async)"); - } - - return getApiV2ExternalLineItemByLineItemIdCall(lineItemId, _callback); - - } - - /** - * - * Gets the line item for the given line item id - * @param lineItemId The given line item id (required) - * @return CommonLineItemResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(String lineItemId) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalLineItemByLineItemIdWithHttpInfo(lineItemId); - return localVarResp.getData(); - } - - /** - * - * Gets the line item for the given line item id - * @param lineItemId The given line item id (required) - * @return ApiResponse<CommonLineItemResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApiV2ExternalLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets the line item for the given line item id - * @param lineItemId The given line item id (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV2ExternalLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for patchApiV1ExternalAccountByAccountIdAndBalanceId - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param updateBalanceModelRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateBalanceModelRequest; - - // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts/{account-id}/balances/{balanceId}" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); - } - - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); - } - - return patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, updateBalanceModelRequest, _callback); - - } - - /** - * - * Modify a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param updateBalanceModelRequest (optional) - * @return BalanceResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { - ApiResponse localVarResp = patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, updateBalanceModelRequest); - return localVarResp.getData(); - } - - /** - * - * Modify a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param updateBalanceModelRequest (optional) - * @return ApiResponse<BalanceResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { - okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Modify a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param updateBalanceModelRequest (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = keywordTarget202110Request; - - // create path and map variables - String localVarPath = "/2023-10/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(Async)"); - } - - return postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdCall(lineItemId, keywordTarget202110Request, _callback); - - } - - /** - * - * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @return KeywordTarget202110Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdWithHttpInfo(lineItemId, keywordTarget202110Request); - return localVarResp.getData(); - } - - /** - * - * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @return ApiResponse<KeywordTarget202110Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public ApiResponse postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdWithHttpInfo(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdAsync(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = keywordTarget202110Request; - - // create path and map variables - String localVarPath = "/2023-10/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId(Async)"); - } - - return postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdCall(lineItemId, keywordTarget202110Request, _callback); - - } - - /** - * - * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @return KeywordTarget202110Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdWithHttpInfo(lineItemId, keywordTarget202110Request); - return localVarResp.getData(); - } - - /** - * - * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @return ApiResponse<KeywordTarget202110Response> + * Gets page of auction line item objects for the given campaign id + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return ApiResponse<AuctionLineItemPagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4937,17 +3843,19 @@ public KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargeting
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdWithHttpInfo(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) + * Gets page of auction line item objects for the given campaign id + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -4958,17 +3866,16 @@ public ApiResponse postApi202110ExternalAuctionLine 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdAsync(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdAsync(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalBalanceCampaignsAppendByBalanceId - * @param balanceId The balance to add campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * Build call for getApiV2ExternalLineItemByLineItemId + * @param lineItemId The given line item id (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4978,7 +3885,7 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteB 200 Success - */ - public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4992,11 +3899,11 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(S basePath = null; } - Object localVarPostBody = balanceCampaign202110ListRequest; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-10/retail-media/balances/{balance-id}/campaigns/append" - .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2023-10/retail-media/line-items/{line-item-id}" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5013,7 +3920,6 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(S } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -5021,26 +3927,25 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(S } String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling postApi202110ExternalBalanceCampaignsAppendByBalanceId(Async)"); + private okhttp3.Call getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalLineItemByLineItemId(Async)"); } - return postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(balanceId, balanceCampaign202110ListRequest, _callback); + return getApiV2ExternalLineItemByLineItemIdCall(lineItemId, _callback); } /** * - * appends one or more campaigns to the specified balance - * @param balanceId The balance to add campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) - * @return BalanceCampaign202110PagedListResponse + * Gets the line item for the given line item id + * @param lineItemId The given line item id (required) + * @return CommonLineItemResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5048,17 +3953,16 @@ private okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdValid
200 Success -
*/ - public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampaignsAppendByBalanceId(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalBalanceCampaignsAppendByBalanceIdWithHttpInfo(balanceId, balanceCampaign202110ListRequest); + public CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(String lineItemId) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalLineItemByLineItemIdWithHttpInfo(lineItemId); return localVarResp.getData(); } /** * - * appends one or more campaigns to the specified balance - * @param balanceId The balance to add campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) - * @return ApiResponse<BalanceCampaign202110PagedListResponse> + * Gets the line item for the given line item id + * @param lineItemId The given line item id (required) + * @return ApiResponse<CommonLineItemResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5066,17 +3970,16 @@ public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampai
200 Success -
*/ - public ApiResponse postApi202110ExternalBalanceCampaignsAppendByBalanceIdWithHttpInfo(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV2ExternalLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * appends one or more campaigns to the specified balance - * @param balanceId The balance to add campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * Gets the line item for the given line item id + * @param lineItemId The given line item id (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5086,17 +3989,17 @@ public ApiResponse postApi202110External 200 Success - */ - public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdAsync(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalBalanceCampaignsDeleteByBalanceId - * @param balanceId The balance to remove campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * Build call for postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5104,9 +4007,10 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdAsync( +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5120,11 +4024,11 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(S basePath = null; } - Object localVarPostBody = balanceCampaign202110ListRequest; + Object localVarPostBody = keywordTarget202110Request; // create path and map variables - String localVarPath = "/2023-10/retail-media/balances/{balance-id}/campaigns/delete" - .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2023-10/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5153,58 +4057,60 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(S } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling postApi202110ExternalBalanceCampaignsDeleteByBalanceId(Async)"); + private okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(Async)"); } - return postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(balanceId, balanceCampaign202110ListRequest, _callback); + return postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdCall(lineItemId, keywordTarget202110Request, _callback); } /** * - * Removes one or more campaigns on the specified balance - * @param balanceId The balance to remove campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) - * @return BalanceCampaign202110PagedListResponse + * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) + * @return KeywordTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampaignsDeleteByBalanceId(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdWithHttpInfo(balanceId, balanceCampaign202110ListRequest); + public KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdWithHttpInfo(lineItemId, keywordTarget202110Request); return localVarResp.getData(); } /** * - * Removes one or more campaigns on the specified balance - * @param balanceId The balance to remove campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) - * @return ApiResponse<BalanceCampaign202110PagedListResponse> + * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) + * @return ApiResponse<KeywordTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalBalanceCampaignsDeleteByBalanceIdWithHttpInfo(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdWithHttpInfo(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Removes one or more campaigns on the specified balance - * @param balanceId The balance to remove campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5212,30 +4118,31 @@ public ApiResponse postApi202110External +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdAsync(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdAsync(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalCampaignPreferredLineItemsByCampaignId - * @param campaignId The given campaign id (required) - * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) + * Build call for postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdCall(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5249,11 +4156,11 @@ public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdC basePath = null; } - Object localVarPostBody = preferredLineItemCreateModel202110Request; + Object localVarPostBody = keywordTarget202110Request; // create path and map variables - String localVarPath = "/2023-10/retail-media/campaigns/{campaign-id}/preferred-line-items" - .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); + String localVarPath = "/2023-10/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5282,81 +4189,81 @@ public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdC } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'campaignId' is set - if (campaignId == null) { - throw new ApiException("Missing the required parameter 'campaignId' when calling postApi202110ExternalCampaignPreferredLineItemsByCampaignId(Async)"); + private okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId(Async)"); } - return postApi202110ExternalCampaignPreferredLineItemsByCampaignIdCall(campaignId, preferredLineItemCreateModel202110Request, _callback); + return postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdCall(lineItemId, keywordTarget202110Request, _callback); } /** * - * Creates a new preferred line item with the specified settings - * @param campaignId The given campaign id (required) - * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) - * @return PreferredLineItem202110Response + * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) + * @return KeywordTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public PreferredLineItem202110Response postApi202110ExternalCampaignPreferredLineItemsByCampaignId(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdWithHttpInfo(campaignId, preferredLineItemCreateModel202110Request); + public KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdWithHttpInfo(lineItemId, keywordTarget202110Request); return localVarResp.getData(); } /** * - * Creates a new preferred line item with the specified settings - * @param campaignId The given campaign id (required) - * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) - * @return ApiResponse<PreferredLineItem202110Response> + * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) + * @return ApiResponse<KeywordTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalCampaignPreferredLineItemsByCampaignIdWithHttpInfo(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(campaignId, preferredLineItemCreateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdWithHttpInfo(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Creates a new preferred line item with the specified settings - * @param campaignId The given campaign id (required) - * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) + * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdAsync(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdAsync(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(campaignId, preferredLineItemCreateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalLineItemProductsAppendByLineItemId - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest the products to append to this line item (optional) + * Build call for postApi202110ExternalBalanceCampaignsAppendByBalanceId + * @param balanceId The balance to add campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5366,7 +4273,7 @@ public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdA 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5380,11 +4287,11 @@ public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdCall( basePath = null; } - Object localVarPostBody = promotedProduct202110ListRequest; + Object localVarPostBody = balanceCampaign202110ListRequest; // create path and map variables - String localVarPath = "/2023-10/retail-media/line-items/{line-item-id}/products/append" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2023-10/retail-media/balances/{balance-id}/campaigns/append" + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5413,22 +4320,22 @@ public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsAppendByLineItemId(Async)"); + private okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApi202110ExternalBalanceCampaignsAppendByBalanceId(Async)"); } - return postApi202110ExternalLineItemProductsAppendByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); + return postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(balanceId, balanceCampaign202110ListRequest, _callback); } /** * - * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest the products to append to this line item (optional) - * @return PromotedProduct202110PagedListResponse + * appends one or more campaigns to the specified balance + * @param balanceId The balance to add campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * @return BalanceCampaign202110PagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5436,17 +4343,17 @@ private okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdVali
200 Success -
*/ - public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProductsAppendByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalLineItemProductsAppendByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampaignsAppendByBalanceId(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalBalanceCampaignsAppendByBalanceIdWithHttpInfo(balanceId, balanceCampaign202110ListRequest); return localVarResp.getData(); } /** * - * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest the products to append to this line item (optional) - * @return ApiResponse<PromotedProduct202110PagedListResponse> + * appends one or more campaigns to the specified balance + * @param balanceId The balance to add campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * @return ApiResponse<BalanceCampaign202110PagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5454,17 +4361,17 @@ public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProdu
200 Success -
*/ - public ApiResponse postApi202110ExternalLineItemProductsAppendByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalBalanceCampaignsAppendByBalanceIdWithHttpInfo(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest the products to append to this line item (optional) + * appends one or more campaigns to the specified balance + * @param balanceId The balance to add campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5474,17 +4381,17 @@ public ApiResponse postApi202110External 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdAsync(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalLineItemProductsDeleteByLineItemId - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest (optional) + * Build call for postApi202110ExternalBalanceCampaignsDeleteByBalanceId + * @param balanceId The balance to remove campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5494,7 +4401,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdAsync 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5508,11 +4415,11 @@ public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdCall( basePath = null; } - Object localVarPostBody = promotedProduct202110ListRequest; + Object localVarPostBody = balanceCampaign202110ListRequest; // create path and map variables - String localVarPath = "/2023-10/retail-media/line-items/{line-item-id}/products/delete" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2023-10/retail-media/balances/{balance-id}/campaigns/delete" + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5541,22 +4448,22 @@ public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsDeleteByLineItemId(Async)"); + private okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApi202110ExternalBalanceCampaignsDeleteByBalanceId(Async)"); } - return postApi202110ExternalLineItemProductsDeleteByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); + return postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(balanceId, balanceCampaign202110ListRequest, _callback); } /** * - * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest (optional) - * @return PromotedProduct202110PagedListResponse + * Removes one or more campaigns on the specified balance + * @param balanceId The balance to remove campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * @return BalanceCampaign202110PagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5564,17 +4471,17 @@ private okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdVali
200 Success -
*/ - public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProductsDeleteByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalLineItemProductsDeleteByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampaignsDeleteByBalanceId(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdWithHttpInfo(balanceId, balanceCampaign202110ListRequest); return localVarResp.getData(); } /** * - * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest (optional) - * @return ApiResponse<PromotedProduct202110PagedListResponse> + * Removes one or more campaigns on the specified balance + * @param balanceId The balance to remove campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * @return ApiResponse<BalanceCampaign202110PagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5582,17 +4489,17 @@ public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProdu
200 Success -
*/ - public ApiResponse postApi202110ExternalLineItemProductsDeleteByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalBalanceCampaignsDeleteByBalanceIdWithHttpInfo(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest (optional) + * Removes one or more campaigns on the specified balance + * @param balanceId The balance to remove campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5602,27 +4509,28 @@ public ApiResponse postApi202110External 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdAsync(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalLineItemProductsPauseByLineItemId - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) + * Build call for postApi202110ExternalCampaignPreferredLineItemsByCampaignId + * @param campaignId The given campaign id (required) + * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Success -
201 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdCall(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5636,11 +4544,11 @@ public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(S basePath = null; } - Object localVarPostBody = promotedProduct202110ListRequest; + Object localVarPostBody = preferredLineItemCreateModel202110Request; // create path and map variables - String localVarPath = "/2023-10/retail-media/line-items/{line-item-id}/products/pause" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2023-10/retail-media/campaigns/{campaign-id}/preferred-line-items" + .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5649,6 +4557,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(S Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -5668,74 +4577,81 @@ public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(S } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsPauseByLineItemId(Async)"); + private okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling postApi202110ExternalCampaignPreferredLineItemsByCampaignId(Async)"); } - return postApi202110ExternalLineItemProductsPauseByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); + return postApi202110ExternalCampaignPreferredLineItemsByCampaignIdCall(campaignId, preferredLineItemCreateModel202110Request, _callback); } /** * - * This endpoint pauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) + * Creates a new preferred line item with the specified settings + * @param campaignId The given campaign id (required) + * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) + * @return PreferredLineItem202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Success -
201 Success -
400 Bad Request -
*/ - public void postApi202110ExternalLineItemProductsPauseByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - postApi202110ExternalLineItemProductsPauseByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + public PreferredLineItem202110Response postApi202110ExternalCampaignPreferredLineItemsByCampaignId(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdWithHttpInfo(campaignId, preferredLineItemCreateModel202110Request); + return localVarResp.getData(); } /** * - * This endpoint pauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) - * @return ApiResponse<Void> + * Creates a new preferred line item with the specified settings + * @param campaignId The given campaign id (required) + * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) + * @return ApiResponse<PreferredLineItem202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Success -
201 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalLineItemProductsPauseByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); - return localVarApiClient.execute(localVarCall); + public ApiResponse postApi202110ExternalCampaignPreferredLineItemsByCampaignIdWithHttpInfo(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(campaignId, preferredLineItemCreateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint pauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) + * Creates a new preferred line item with the specified settings + * @param campaignId The given campaign id (required) + * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Success -
201 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdAsync(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(campaignId, preferredLineItemCreateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalLineItemProductsUnpauseByLineItemId - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) + * Build call for postApi202110ExternalLineItemProductsAppendByLineItemId + * @param lineItemId The line item to interact with (required) + * @param promotedProduct202110ListRequest the products to append to this line item (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5745,7 +4661,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdAsync( 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5762,7 +4678,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2023-10/retail-media/line-items/{line-item-id}/products/unpause" + String localVarPath = "/2023-10/retail-media/line-items/{line-item-id}/products/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -5772,6 +4688,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -5791,21 +4708,22 @@ public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsUnpauseByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsAppendByLineItemId(Async)"); } - return postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); + return postApi202110ExternalLineItemProductsAppendByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); } /** * - * This endpoint unpauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) + * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. + * @param lineItemId The line item to interact with (required) + * @param promotedProduct202110ListRequest the products to append to this line item (optional) + * @return PromotedProduct202110PagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5813,16 +4731,17 @@ private okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdVal
200 Success -
*/ - public void postApi202110ExternalLineItemProductsUnpauseByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - postApi202110ExternalLineItemProductsUnpauseByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProductsAppendByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalLineItemProductsAppendByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + return localVarResp.getData(); } /** * - * This endpoint unpauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) - * @return ApiResponse<Void> + * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. + * @param lineItemId The line item to interact with (required) + * @param promotedProduct202110ListRequest the products to append to this line item (optional) + * @return ApiResponse<PromotedProduct202110PagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5830,16 +4749,17 @@ public void postApi202110ExternalLineItemProductsUnpauseByLineItemId(String line
200 Success -
*/ - public ApiResponse postApi202110ExternalLineItemProductsUnpauseByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); - return localVarApiClient.execute(localVarCall); + public ApiResponse postApi202110ExternalLineItemProductsAppendByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint unpauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) + * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. + * @param lineItemId The line item to interact with (required) + * @param promotedProduct202110ListRequest the products to append to this line item (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5849,16 +4769,17 @@ public ApiResponse postApi202110ExternalLineItemProductsUnpauseByLineItemI 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId + * Build call for postApi202110ExternalLineItemProductsDeleteByLineItemId * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) + * @param promotedProduct202110ListRequest (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5866,10 +4787,9 @@ public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdAsyn -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5883,10 +4803,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAp basePath = null; } - Object localVarPostBody = addToBasketIdsUpdateModel202110Request; + Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append" + String localVarPath = "/2023-10/retail-media/line-items/{line-item-id}/products/delete" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -5916,60 +4836,58 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAp } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsDeleteByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); + return postApi202110ExternalLineItemProductsDeleteByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); } /** * - * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. + * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) - * @return AddToBasketTarget202110Response + * @param promotedProduct202110ListRequest (optional) + * @return PromotedProduct202110PagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public AddToBasketTarget202110Response postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdWithHttpInfo(lineItemId, addToBasketIdsUpdateModel202110Request); + public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProductsDeleteByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalLineItemProductsDeleteByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); return localVarResp.getData(); } /** * - * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. + * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) - * @return ApiResponse<AddToBasketTarget202110Response> + * @param promotedProduct202110ListRequest (optional) + * @return ApiResponse<PromotedProduct202110PagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdWithHttpInfo(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalLineItemProductsDeleteByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. + * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) + * @param promotedProduct202110ListRequest (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5977,20 +4895,19 @@ public ApiResponse postApi202110ExternalPreferr -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdAsync(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId - * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) + * Build call for postApi202110ExternalLineItemProductsPauseByLineItemId + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5998,10 +4915,9 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAp -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6015,10 +4931,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDe basePath = null; } - Object localVarPostBody = addToBasketIdsUpdateModel202110Request; + Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete" + String localVarPath = "/2023-10/retail-media/line-items/{line-item-id}/products/pause" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6028,7 +4944,6 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDe Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -6048,60 +4963,55 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDe } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsPauseByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); + return postApi202110ExternalLineItemProductsPauseByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); } /** * - * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. - * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) - * @return AddToBasketTarget202110Response + * This endpoint pauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public AddToBasketTarget202110Response postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdWithHttpInfo(lineItemId, addToBasketIdsUpdateModel202110Request); - return localVarResp.getData(); + public void postApi202110ExternalLineItemProductsPauseByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + postApi202110ExternalLineItemProductsPauseByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); } /** * - * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. - * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) - * @return ApiResponse<AddToBasketTarget202110Response> + * This endpoint pauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdWithHttpInfo(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse postApi202110ExternalLineItemProductsPauseByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); + return localVarApiClient.execute(localVarCall); } /** * (asynchronously) - * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. - * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) + * This endpoint pauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6109,20 +5019,18 @@ public ApiResponse postApi202110ExternalPreferr -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdAsync(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId - * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) + * Build call for postApi202110ExternalLineItemProductsUnpauseByLineItemId + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6130,10 +5038,9 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDe -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6147,10 +5054,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppe basePath = null; } - Object localVarPostBody = audienceIdsUpdateModel202110Request; + Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append" + String localVarPath = "/2023-10/retail-media/line-items/{line-item-id}/products/unpause" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6160,7 +5067,6 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppe Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -6180,60 +5086,55 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppe } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsUnpauseByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); + return postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); } /** * - * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. - * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) - * @return AudienceTarget202110Response + * This endpoint unpauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdWithHttpInfo(lineItemId, audienceIdsUpdateModel202110Request); - return localVarResp.getData(); + public void postApi202110ExternalLineItemProductsUnpauseByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + postApi202110ExternalLineItemProductsUnpauseByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); } /** * - * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. - * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) - * @return ApiResponse<AudienceTarget202110Response> + * This endpoint unpauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdWithHttpInfo(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse postApi202110ExternalLineItemProductsUnpauseByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); + return localVarApiClient.execute(localVarCall); } /** * (asynchronously) - * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. - * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) + * This endpoint unpauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6241,20 +5142,18 @@ public ApiResponse postApi202110ExternalPreferredL -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdAsync(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId + * Build call for postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) + * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6265,7 +5164,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppe 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6279,10 +5178,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDele basePath = null; } - Object localVarPostBody = audienceIdsUpdateModel202110Request; + Object localVarPostBody = addToBasketIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete" + String localVarPath = "/2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6312,22 +5211,22 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDele } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); + return postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); } /** * - * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) - * @return AudienceTarget202110Response + * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) + * @return AddToBasketTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6336,17 +5235,17 @@ private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDel
400 Bad Request -
*/ - public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdWithHttpInfo(lineItemId, audienceIdsUpdateModel202110Request); + public AddToBasketTarget202110Response postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdWithHttpInfo(lineItemId, addToBasketIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) - * @return ApiResponse<AudienceTarget202110Response> + * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) + * @return ApiResponse<AddToBasketTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6355,17 +5254,17 @@ public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTarget
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdWithHttpInfo(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdWithHttpInfo(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) + * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6376,17 +5275,17 @@ public ApiResponse postApi202110ExternalPreferredL 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdAsync(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdAsync(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId + * Build call for postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) + * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6397,7 +5296,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDele 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6411,10 +5310,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendB basePath = null; } - Object localVarPostBody = storeIdsUpdateModel202110Request; + Object localVarPostBody = addToBasketIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append" + String localVarPath = "/2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6444,22 +5343,22 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendB } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdCall(lineItemId, storeIdsUpdateModel202110Request, _callback); + return postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); } /** * - * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) - * @return StoreTarget202110Response + * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) + * @return AddToBasketTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6468,17 +5367,17 @@ private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppend
400 Bad Request -
*/ - public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdWithHttpInfo(lineItemId, storeIdsUpdateModel202110Request); + public AddToBasketTarget202110Response postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdWithHttpInfo(lineItemId, addToBasketIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) - * @return ApiResponse<StoreTarget202110Response> + * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) + * @return ApiResponse<AddToBasketTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6487,17 +5386,17 @@ public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargeting
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdWithHttpInfo(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdWithHttpInfo(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) + * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6508,17 +5407,17 @@ public ApiResponse postApi202110ExternalPreferredLine 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdAsync(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdAsync(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId + * Build call for postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) + * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6529,7 +5428,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendB 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6543,10 +5442,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteB basePath = null; } - Object localVarPostBody = storeIdsUpdateModel202110Request; + Object localVarPostBody = audienceIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete" + String localVarPath = "/2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6576,22 +5475,22 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteB } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdCall(lineItemId, storeIdsUpdateModel202110Request, _callback); + return postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); } /** * - * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) - * @return StoreTarget202110Response + * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) + * @return AudienceTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6600,17 +5499,17 @@ private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDelete
400 Bad Request -
*/ - public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdWithHttpInfo(lineItemId, storeIdsUpdateModel202110Request); + public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdWithHttpInfo(lineItemId, audienceIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) - * @return ApiResponse<StoreTarget202110Response> + * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) + * @return ApiResponse<AudienceTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6619,17 +5518,17 @@ public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargeting
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdWithHttpInfo(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdWithHttpInfo(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) + * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6640,27 +5539,28 @@ public ApiResponse postApi202110ExternalPreferredLine 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdAsync(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdAsync(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202210ExternalAccountCreativesByAccountId - * @param accountId External account id to create a creative for (required) - * @param creativeCreateModel202207 The creative to create (optional) + * Build call for postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId + * @param lineItemId The line item to interact with (required) + * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
201 Creatives created -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdCall(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6674,11 +5574,11 @@ public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdCall(String basePath = null; } - Object localVarPostBody = creativeCreateModel202207; + Object localVarPostBody = audienceIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts/{account-id}/creatives" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -6707,88 +5607,92 @@ public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdCall(String } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApi202210ExternalAccountCreativesByAccountId(Async)"); + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId(Async)"); } - return postApi202210ExternalAccountCreativesByAccountIdCall(accountId, creativeCreateModel202207, _callback); + return postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); } /** * - * Create a creative for an account - * @param accountId External account id to create a creative for (required) - * @param creativeCreateModel202207 The creative to create (optional) - * @return Creative202210Response + * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * @param lineItemId The line item to interact with (required) + * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) + * @return AudienceTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
201 Creatives created -
200 Success -
400 Bad Request -
*/ - public Creative202210Response postApi202210ExternalAccountCreativesByAccountId(String accountId, CreativeCreateModel202207 creativeCreateModel202207) throws ApiException { - ApiResponse localVarResp = postApi202210ExternalAccountCreativesByAccountIdWithHttpInfo(accountId, creativeCreateModel202207); + public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdWithHttpInfo(lineItemId, audienceIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * Create a creative for an account - * @param accountId External account id to create a creative for (required) - * @param creativeCreateModel202207 The creative to create (optional) - * @return ApiResponse<Creative202210Response> + * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * @param lineItemId The line item to interact with (required) + * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) + * @return ApiResponse<AudienceTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
201 Creatives created -
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202210ExternalAccountCreativesByAccountIdWithHttpInfo(String accountId, CreativeCreateModel202207 creativeCreateModel202207) throws ApiException { - okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(accountId, creativeCreateModel202207, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdWithHttpInfo(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Create a creative for an account - * @param accountId External account id to create a creative for (required) - * @param creativeCreateModel202207 The creative to create (optional) + * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * @param lineItemId The line item to interact with (required) + * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
201 Creatives created -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdAsync(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdAsync(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(accountId, creativeCreateModel202207, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202210ExternalAccountCreativesSearchByAccountId - * @param accountId External account id to retrieve creatives for (required) - * @param creativeIds Creatives to filter by (optional) + * Build call for postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Creatives found -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6802,11 +5706,11 @@ public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(S basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = storeIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts/{account-id}/creatives/search" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -6814,10 +5718,6 @@ public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(S Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (creativeIds != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "creative-ids", creativeIds)); - } - final String[] localVarAccepts = { "application/json" }; @@ -6827,6 +5727,7 @@ public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(S } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -6838,88 +5739,92 @@ public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(S } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApi202210ExternalAccountCreativesSearchByAccountId(Async)"); + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId(Async)"); } - return postApi202210ExternalAccountCreativesSearchByAccountIdCall(accountId, creativeIds, _callback); + return postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdCall(lineItemId, storeIdsUpdateModel202110Request, _callback); } /** * - * Get account creatives - * @param accountId External account id to retrieve creatives for (required) - * @param creativeIds Creatives to filter by (optional) - * @return Creative202210ListResponse + * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) + * @return StoreTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Creatives found -
200 Success -
400 Bad Request -
*/ - public Creative202210ListResponse postApi202210ExternalAccountCreativesSearchByAccountId(String accountId, List creativeIds) throws ApiException { - ApiResponse localVarResp = postApi202210ExternalAccountCreativesSearchByAccountIdWithHttpInfo(accountId, creativeIds); + public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdWithHttpInfo(lineItemId, storeIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * Get account creatives - * @param accountId External account id to retrieve creatives for (required) - * @param creativeIds Creatives to filter by (optional) - * @return ApiResponse<Creative202210ListResponse> + * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) + * @return ApiResponse<StoreTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Creatives found -
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202210ExternalAccountCreativesSearchByAccountIdWithHttpInfo(String accountId, List creativeIds) throws ApiException { - okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(accountId, creativeIds, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdWithHttpInfo(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Get account creatives - * @param accountId External account id to retrieve creatives for (required) - * @param creativeIds Creatives to filter by (optional) + * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Creatives found -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdAsync(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdAsync(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(accountId, creativeIds, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202301ExternalAccountCampaignsByAccountId - * @param accountId The account to request the campaign for. (required) - * @param postCampaignV202301 Creatable campaign attributes (optional) + * Build call for postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdCall(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6933,11 +5838,11 @@ public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdCall(String basePath = null; } - Object localVarPostBody = postCampaignV202301; + Object localVarPostBody = storeIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts/{account-id}/campaigns" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2023-10/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -6966,89 +5871,91 @@ public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdCall(String } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApi202301ExternalAccountCampaignsByAccountId(Async)"); + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId(Async)"); } - return postApi202301ExternalAccountCampaignsByAccountIdCall(accountId, postCampaignV202301, _callback); + return postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdCall(lineItemId, storeIdsUpdateModel202110Request, _callback); } /** * - * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. - * @param accountId The account to request the campaign for. (required) - * @param postCampaignV202301 Creatable campaign attributes (optional) - * @return JsonApiSingleResponseOfCampaignV202301 + * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) + * @return StoreTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public JsonApiSingleResponseOfCampaignV202301 postApi202301ExternalAccountCampaignsByAccountId(String accountId, PostCampaignV202301 postCampaignV202301) throws ApiException { - ApiResponse localVarResp = postApi202301ExternalAccountCampaignsByAccountIdWithHttpInfo(accountId, postCampaignV202301); + public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdWithHttpInfo(lineItemId, storeIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. - * @param accountId The account to request the campaign for. (required) - * @param postCampaignV202301 Creatable campaign attributes (optional) - * @return ApiResponse<JsonApiSingleResponseOfCampaignV202301> + * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) + * @return ApiResponse<StoreTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202301ExternalAccountCampaignsByAccountIdWithHttpInfo(String accountId, PostCampaignV202301 postCampaignV202301) throws ApiException { - okhttp3.Call localVarCall = postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(accountId, postCampaignV202301, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdWithHttpInfo(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. - * @param accountId The account to request the campaign for. (required) - * @param postCampaignV202301 Creatable campaign attributes (optional) + * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdAsync(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdAsync(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(accountId, postCampaignV202301, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId - * @param accountId The account of the balance (required) - * @param balanceId The balance to add funds to (required) - * @param addFundsToBalanceRequest (optional) + * Build call for postApi202210ExternalAccountCreativesByAccountId + * @param accountId External account id to create a creative for (required) + * @param creativeCreateModel202207 The creative to create (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
201 Creatives created -
*/ - public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdCall(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7062,12 +5969,11 @@ public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall( basePath = null; } - Object localVarPostBody = addFundsToBalanceRequest; + Object localVarPostBody = creativeCreateModel202207; // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2023-10/retail-media/accounts/{account-id}/creatives" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7096,96 +6002,88 @@ public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); - } - - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling postApi202210ExternalAccountCreativesByAccountId(Async)"); } - return postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(accountId, balanceId, addFundsToBalanceRequest, _callback); + return postApi202210ExternalAccountCreativesByAccountIdCall(accountId, creativeCreateModel202207, _callback); } /** * - * Add funds to a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to add funds to (required) - * @param addFundsToBalanceRequest (optional) - * @return BalanceResponse + * Create a creative for an account + * @param accountId External account id to create a creative for (required) + * @param creativeCreateModel202207 The creative to create (optional) + * @return Creative202210Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
201 Creatives created -
*/ - public BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { - ApiResponse localVarResp = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, addFundsToBalanceRequest); + public Creative202210Response postApi202210ExternalAccountCreativesByAccountId(String accountId, CreativeCreateModel202207 creativeCreateModel202207) throws ApiException { + ApiResponse localVarResp = postApi202210ExternalAccountCreativesByAccountIdWithHttpInfo(accountId, creativeCreateModel202207); return localVarResp.getData(); } /** * - * Add funds to a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to add funds to (required) - * @param addFundsToBalanceRequest (optional) - * @return ApiResponse<BalanceResponse> + * Create a creative for an account + * @param accountId External account id to create a creative for (required) + * @param creativeCreateModel202207 The creative to create (optional) + * @return ApiResponse<Creative202210Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
201 Creatives created -
*/ - public ApiResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202210ExternalAccountCreativesByAccountIdWithHttpInfo(String accountId, CreativeCreateModel202207 creativeCreateModel202207) throws ApiException { + okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(accountId, creativeCreateModel202207, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Add funds to a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to add funds to (required) - * @param addFundsToBalanceRequest (optional) + * Create a creative for an account + * @param accountId External account id to create a creative for (required) + * @param creativeCreateModel202207 The creative to create (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
201 Creatives created -
*/ - public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdAsync(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdAsync(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(accountId, creativeCreateModel202207, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApiV1ExternalAccountBalancesByAccountId - * @param accountId The account to create balances for (required) - * @param createBalanceRequest (optional) + * Build call for postApi202210ExternalAccountCreativesSearchByAccountId + * @param accountId External account id to retrieve creatives for (required) + * @param creativeIds Creatives to filter by (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Creatives found -
*/ - public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7199,10 +6097,10 @@ public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accou basePath = null; } - Object localVarPostBody = createBalanceRequest; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts/{account-id}/balances" + String localVarPath = "/2023-10/retail-media/accounts/{account-id}/creatives/search" .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -7211,6 +6109,10 @@ public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accou Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (creativeIds != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "creative-ids", creativeIds)); + } + final String[] localVarAccepts = { "application/json" }; @@ -7220,7 +6122,6 @@ public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accou } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -7232,88 +6133,88 @@ public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accou } @SuppressWarnings("rawtypes") - private okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountBalancesByAccountId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling postApi202210ExternalAccountCreativesSearchByAccountId(Async)"); } - return postApiV1ExternalAccountBalancesByAccountIdCall(accountId, createBalanceRequest, _callback); + return postApi202210ExternalAccountCreativesSearchByAccountIdCall(accountId, creativeIds, _callback); } /** * - * Create balance for the given account id - * @param accountId The account to create balances for (required) - * @param createBalanceRequest (optional) - * @return BalanceResponse + * Get account creatives + * @param accountId External account id to retrieve creatives for (required) + * @param creativeIds Creatives to filter by (optional) + * @return Creative202210ListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Creatives found -
*/ - public BalanceResponse postApiV1ExternalAccountBalancesByAccountId(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { - ApiResponse localVarResp = postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, createBalanceRequest); + public Creative202210ListResponse postApi202210ExternalAccountCreativesSearchByAccountId(String accountId, List creativeIds) throws ApiException { + ApiResponse localVarResp = postApi202210ExternalAccountCreativesSearchByAccountIdWithHttpInfo(accountId, creativeIds); return localVarResp.getData(); } /** * - * Create balance for the given account id - * @param accountId The account to create balances for (required) - * @param createBalanceRequest (optional) - * @return ApiResponse<BalanceResponse> + * Get account creatives + * @param accountId External account id to retrieve creatives for (required) + * @param creativeIds Creatives to filter by (optional) + * @return ApiResponse<Creative202210ListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Creatives found -
*/ - public ApiResponse postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202210ExternalAccountCreativesSearchByAccountIdWithHttpInfo(String accountId, List creativeIds) throws ApiException { + okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(accountId, creativeIds, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Create balance for the given account id - * @param accountId The account to create balances for (required) - * @param createBalanceRequest (optional) + * Get account creatives + * @param accountId External account id to retrieve creatives for (required) + * @param creativeIds Creatives to filter by (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Creatives found -
*/ - public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdAsync(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(accountId, creativeIds, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApiV1ExternalAccountCatalogsByAccountId - * @param accountId The account to request the catalog for. (required) - * @param jsonApiRequestOfCatalogRequest (optional) + * Build call for postApi202301ExternalAccountCampaignsByAccountId + * @param accountId The account to request the campaign for. (required) + * @param postCampaignV202301 Creatable campaign attributes (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 Catalog request successfully created -
201 Success -
*/ - public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdCall(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdCall(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7327,11 +6228,11 @@ public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdCall(String accou basePath = null; } - Object localVarPostBody = jsonApiRequestOfCatalogRequest; + Object localVarPostBody = postCampaignV202301; // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts/{accountId}/catalogs" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2023-10/retail-media/accounts/{account-id}/campaigns" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7360,89 +6261,88 @@ public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdCall(String accou } @SuppressWarnings("rawtypes") - private okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountCatalogsByAccountId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling postApi202301ExternalAccountCampaignsByAccountId(Async)"); } - return postApiV1ExternalAccountCatalogsByAccountIdCall(accountId, jsonApiRequestOfCatalogRequest, _callback); + return postApi202301ExternalAccountCampaignsByAccountIdCall(accountId, postCampaignV202301, _callback); } /** * - * Create a request for a Catalog available to the indicated account. - * @param accountId The account to request the catalog for. (required) - * @param jsonApiRequestOfCatalogRequest (optional) - * @return JsonApiSingleResponseOfCatalogStatus + * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. + * @param accountId The account to request the campaign for. (required) + * @param postCampaignV202301 Creatable campaign attributes (optional) + * @return JsonApiSingleResponseOfCampaignV202301 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Catalog request successfully created -
201 Success -
*/ - public JsonApiSingleResponseOfCatalogStatus postApiV1ExternalAccountCatalogsByAccountId(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest) throws ApiException { - ApiResponse localVarResp = postApiV1ExternalAccountCatalogsByAccountIdWithHttpInfo(accountId, jsonApiRequestOfCatalogRequest); + public JsonApiSingleResponseOfCampaignV202301 postApi202301ExternalAccountCampaignsByAccountId(String accountId, PostCampaignV202301 postCampaignV202301) throws ApiException { + ApiResponse localVarResp = postApi202301ExternalAccountCampaignsByAccountIdWithHttpInfo(accountId, postCampaignV202301); return localVarResp.getData(); } /** * - * Create a request for a Catalog available to the indicated account. - * @param accountId The account to request the catalog for. (required) - * @param jsonApiRequestOfCatalogRequest (optional) - * @return ApiResponse<JsonApiSingleResponseOfCatalogStatus> + * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. + * @param accountId The account to request the campaign for. (required) + * @param postCampaignV202301 Creatable campaign attributes (optional) + * @return ApiResponse<JsonApiSingleResponseOfCampaignV202301> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Catalog request successfully created -
201 Success -
*/ - public ApiResponse postApiV1ExternalAccountCatalogsByAccountIdWithHttpInfo(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfCatalogRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202301ExternalAccountCampaignsByAccountIdWithHttpInfo(String accountId, PostCampaignV202301 postCampaignV202301) throws ApiException { + okhttp3.Call localVarCall = postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(accountId, postCampaignV202301, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Create a request for a Catalog available to the indicated account. - * @param accountId The account to request the catalog for. (required) - * @param jsonApiRequestOfCatalogRequest (optional) + * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. + * @param accountId The account to request the campaign for. (required) + * @param postCampaignV202301 Creatable campaign attributes (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 Catalog request successfully created -
201 Success -
*/ - public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdAsync(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdAsync(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfCatalogRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(accountId, postCampaignV202301, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param changeDatesOfBalanceRequest (optional) + * Build call for postApiV1ExternalAccountCatalogsByAccountId + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfCatalogRequest (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request successfully created -
*/ - public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdCall(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7456,12 +6356,11 @@ public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCa basePath = null; } - Object localVarPostBody = changeDatesOfBalanceRequest; + Object localVarPostBody = jsonApiRequestOfCatalogRequest; // create path and map variables - String localVarPath = "/2023-10/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2023-10/retail-media/accounts/{accountId}/catalogs" + .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7490,79 +6389,71 @@ public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCa } @SuppressWarnings("rawtypes") - private okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); - } - - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountCatalogsByAccountId(Async)"); } - return postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); + return postApiV1ExternalAccountCatalogsByAccountIdCall(accountId, jsonApiRequestOfCatalogRequest, _callback); } /** * - * Change dates of a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param changeDatesOfBalanceRequest (optional) - * @return BalanceResponse + * Create a request for a Catalog available to the indicated account. + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfCatalogRequest (optional) + * @return JsonApiSingleResponseOfCatalogStatus * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request successfully created -
*/ - public BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { - ApiResponse localVarResp = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, changeDatesOfBalanceRequest); + public JsonApiSingleResponseOfCatalogStatus postApiV1ExternalAccountCatalogsByAccountId(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountCatalogsByAccountIdWithHttpInfo(accountId, jsonApiRequestOfCatalogRequest); return localVarResp.getData(); } /** * - * Change dates of a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param changeDatesOfBalanceRequest (optional) - * @return ApiResponse<BalanceResponse> + * Create a request for a Catalog available to the indicated account. + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfCatalogRequest (optional) + * @return ApiResponse<JsonApiSingleResponseOfCatalogStatus> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request successfully created -
*/ - public ApiResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApiV1ExternalAccountCatalogsByAccountIdWithHttpInfo(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfCatalogRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Change dates of a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param changeDatesOfBalanceRequest (optional) + * Create a request for a Catalog available to the indicated account. + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfCatalogRequest (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request successfully created -
*/ - public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdAsync(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdAsync(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfCatalogRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ApplicationSummaryModel.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ApplicationSummaryModel.java index f517b179..938a4d4a 100644 --- a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ApplicationSummaryModel.java +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ApplicationSummaryModel.java @@ -45,7 +45,7 @@ import com.criteo.api.retailmedia.v2023_10.JSON; /** - * Model of ApplicationSummary + * Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModel { diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ApplicationSummaryModelResource.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ApplicationSummaryModelResource.java index a00396a2..8f9d5668 100644 --- a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ApplicationSummaryModelResource.java +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ApplicationSummaryModelResource.java @@ -46,7 +46,7 @@ import com.criteo.api.retailmedia.v2023_10.JSON; /** - * A class that represents a ValueType in a guild compliant way + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResource { diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ApplicationSummaryModelResponse.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ApplicationSummaryModelResponse.java index 5a62b0d1..b7b6837f 100644 --- a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ApplicationSummaryModelResponse.java +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ApplicationSummaryModelResponse.java @@ -49,7 +49,7 @@ import com.criteo.api.retailmedia.v2023_10.JSON; /** - * Response of ApplicationSummaryModel + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResponse { diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/AsyncCampaignsReport.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/AsyncCampaignsReport.java index 2fdbcf89..2448eb75 100644 --- a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/AsyncCampaignsReport.java +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/AsyncCampaignsReport.java @@ -439,6 +439,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/AsyncLineItemsReport.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/AsyncLineItemsReport.java index b5c9b1ee..64d733f7 100644 --- a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/AsyncLineItemsReport.java +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/AsyncLineItemsReport.java @@ -439,6 +439,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/AsyncRevenueReport.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/AsyncRevenueReport.java index 54b166df..1cbc3430 100644 --- a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/AsyncRevenueReport.java +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/AsyncRevenueReport.java @@ -274,6 +274,59 @@ public BuyTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_BUY_TYPE) private BuyTypeEnum buyType; + /** + * Gets or Sets advertiserTypes + */ + @JsonAdapter(AdvertiserTypesEnum.Adapter.class) + public enum AdvertiserTypesEnum { + RETAILER("retailer"), + + BRAND("brand"), + + SELLER("seller"); + + private String value; + + AdvertiserTypesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AdvertiserTypesEnum fromValue(String value) { + for (AdvertiserTypesEnum b : AdvertiserTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AdvertiserTypesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AdvertiserTypesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AdvertiserTypesEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_ADVERTISER_TYPES = "advertiserTypes"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_TYPES) + private List advertiserTypes = null; + /** * Gets or Sets skuRelations */ @@ -621,6 +674,8 @@ public enum DimensionsEnum { ACCOUNTTYPENAME("accountTypeName"), + ADVERTISERTYPE("advertiserType"), + CAMPAIGNID("campaignId"), CAMPAIGNNAME("campaignName"), @@ -667,6 +722,8 @@ public enum DimensionsEnum { ADVPRODUCTMPN("advProductMpn"), + BUYTYPE("buyType"), + SOLDBY("soldBy"), SALECHANNEL("saleChannel"), @@ -788,6 +845,8 @@ public enum MetricsEnum { ASSISTEDUNITS("assistedUnits"), + REVENUE("revenue"), + OPENAUCTIONREVENUE("openAuctionRevenue"), PREFERREDDEALSREVENUE("preferredDealsRevenue"), @@ -898,7 +957,7 @@ public AsyncRevenueReport addIdsItem(String idsItem) { } /** - * Campaign ids to report on + * Supply account ids to report on * @return ids **/ @javax.annotation.Nullable @@ -920,7 +979,7 @@ public AsyncRevenueReport id(String id) { } /** - * Campaign id to report on + * Supply account id to report on * @return id **/ @javax.annotation.Nullable @@ -1023,6 +1082,36 @@ public void setBuyType(BuyTypeEnum buyType) { } + public AsyncRevenueReport advertiserTypes(List advertiserTypes) { + + this.advertiserTypes = advertiserTypes; + return this; + } + + public AsyncRevenueReport addAdvertiserTypesItem(AdvertiserTypesEnum advertiserTypesItem) { + if (this.advertiserTypes == null) { + this.advertiserTypes = null; + } + this.advertiserTypes.add(advertiserTypesItem); + return this; + } + + /** + * Filter on the type of advertiser: retailer, brand, seller + * @return advertiserTypes + **/ + @javax.annotation.Nullable + + public List getAdvertiserTypes() { + return advertiserTypes; + } + + + public void setAdvertiserTypes(List advertiserTypes) { + this.advertiserTypes = advertiserTypes; + } + + public AsyncRevenueReport skuRelations(List skuRelations) { this.skuRelations = skuRelations; @@ -1349,6 +1438,7 @@ public boolean equals(Object o) { Objects.equals(this.revenueType, asyncRevenueReport.revenueType) && Objects.equals(this.soldBy, asyncRevenueReport.soldBy) && Objects.equals(this.buyType, asyncRevenueReport.buyType) && + Objects.equals(this.advertiserTypes, asyncRevenueReport.advertiserTypes) && Objects.equals(this.skuRelations, asyncRevenueReport.skuRelations) && Objects.equals(this.format, asyncRevenueReport.format) && Objects.equals(this.campaignType, asyncRevenueReport.campaignType) && @@ -1369,7 +1459,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ids, id, reportType, revenueType, soldBy, buyType, skuRelations, format, campaignType, salesChannel, clickAttributionWindow, viewAttributionWindow, dimensions, metrics, startDate, endDate, timezone, additionalProperties); + return Objects.hash(ids, id, reportType, revenueType, soldBy, buyType, advertiserTypes, skuRelations, format, campaignType, salesChannel, clickAttributionWindow, viewAttributionWindow, dimensions, metrics, startDate, endDate, timezone, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -1389,6 +1479,7 @@ public String toString() { sb.append(" revenueType: ").append(toIndentedString(revenueType)).append("\n"); sb.append(" soldBy: ").append(toIndentedString(soldBy)).append("\n"); sb.append(" buyType: ").append(toIndentedString(buyType)).append("\n"); + sb.append(" advertiserTypes: ").append(toIndentedString(advertiserTypes)).append("\n"); sb.append(" skuRelations: ").append(toIndentedString(skuRelations)).append("\n"); sb.append(" format: ").append(toIndentedString(format)).append("\n"); sb.append(" campaignType: ").append(toIndentedString(campaignType)).append("\n"); @@ -1429,6 +1520,7 @@ private String toIndentedString(Object o) { openapiFields.add("revenueType"); openapiFields.add("soldBy"); openapiFields.add("buyType"); + openapiFields.add("advertiserTypes"); openapiFields.add("skuRelations"); openapiFields.add("format"); openapiFields.add("campaignType"); @@ -1486,6 +1578,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `buyType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyType").toString())); } // ensure the optional json data is an array if present + if (jsonObj.get("advertiserTypes") != null && !jsonObj.get("advertiserTypes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserTypes` to be an array in the JSON string but got `%s`", jsonObj.get("advertiserTypes").toString())); + } + // ensure the optional json data is an array if present if (jsonObj.get("skuRelations") != null && !jsonObj.get("skuRelations").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `skuRelations` to be an array in the JSON string but got `%s`", jsonObj.get("skuRelations").toString())); } diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/CommonProblem.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/CommonProblem.java index 4af4cb36..698c1793 100644 --- a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/CommonProblem.java +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/CommonProblem.java @@ -47,7 +47,7 @@ import com.criteo.api.retailmedia.v2023_10.JSON; /** - * Common problem object. Can be specialized as needed. + * Common problem object. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CommonProblem { @@ -222,7 +222,7 @@ public CommonProblem code(String code) { } /** - * A machine-readable error code, expressed as a string value. + * A machine-readable error code, expressed as a string value. * @return code **/ @javax.annotation.Nullable diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ExternalBalanceResponse.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ExternalBalanceResponse.java index 720256f9..f8c53dd7 100644 --- a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ExternalBalanceResponse.java +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/ExternalBalanceResponse.java @@ -256,6 +256,61 @@ public SpendTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_SPEND_TYPE) private SpendTypeEnum spendType; + /** + * Billing type for Private Market. + */ + @JsonAdapter(PrivateMarketBillingTypeEnum.Adapter.class) + public enum PrivateMarketBillingTypeEnum { + NOTAPPLICABLE("NotApplicable"), + + BILLBYRETAILER("BillByRetailer"), + + BILLBYCRITEO("BillByCriteo"), + + UNKNOWN("Unknown"); + + private String value; + + PrivateMarketBillingTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivateMarketBillingTypeEnum fromValue(String value) { + for (PrivateMarketBillingTypeEnum b : PrivateMarketBillingTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivateMarketBillingTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivateMarketBillingTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivateMarketBillingTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_PRIVATE_MARKET_BILLING_TYPE = "privateMarketBillingType"; + @SerializedName(SERIALIZED_NAME_PRIVATE_MARKET_BILLING_TYPE) + private PrivateMarketBillingTypeEnum privateMarketBillingType; + public ExternalBalanceResponse() { } @@ -566,6 +621,28 @@ public void setSpendType(SpendTypeEnum spendType) { this.spendType = spendType; } + + public ExternalBalanceResponse privateMarketBillingType(PrivateMarketBillingTypeEnum privateMarketBillingType) { + + this.privateMarketBillingType = privateMarketBillingType; + return this; + } + + /** + * Billing type for Private Market. + * @return privateMarketBillingType + **/ + @javax.annotation.Nonnull + + public PrivateMarketBillingTypeEnum getPrivateMarketBillingType() { + return privateMarketBillingType; + } + + + public void setPrivateMarketBillingType(PrivateMarketBillingTypeEnum privateMarketBillingType) { + this.privateMarketBillingType = privateMarketBillingType; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -634,13 +711,14 @@ public boolean equals(Object o) { Objects.equals(this.updatedAt, externalBalanceResponse.updatedAt) && Objects.equals(this.balanceType, externalBalanceResponse.balanceType) && Objects.equals(this.salesForceId, externalBalanceResponse.salesForceId) && - Objects.equals(this.spendType, externalBalanceResponse.spendType)&& + Objects.equals(this.spendType, externalBalanceResponse.spendType) && + Objects.equals(this.privateMarketBillingType, externalBalanceResponse.privateMarketBillingType)&& Objects.equals(this.additionalProperties, externalBalanceResponse.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name, poNumber, memo, deposited, spent, remaining, startDate, endDate, status, createdAt, updatedAt, balanceType, salesForceId, spendType, additionalProperties); + return Objects.hash(name, poNumber, memo, deposited, spent, remaining, startDate, endDate, status, createdAt, updatedAt, balanceType, salesForceId, spendType, privateMarketBillingType, additionalProperties); } @Override @@ -661,6 +739,7 @@ public String toString() { sb.append(" balanceType: ").append(toIndentedString(balanceType)).append("\n"); sb.append(" salesForceId: ").append(toIndentedString(salesForceId)).append("\n"); sb.append(" spendType: ").append(toIndentedString(spendType)).append("\n"); + sb.append(" privateMarketBillingType: ").append(toIndentedString(privateMarketBillingType)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -698,6 +777,7 @@ private String toIndentedString(Object o) { openapiFields.add("balanceType"); openapiFields.add("salesForceId"); openapiFields.add("spendType"); + openapiFields.add("privateMarketBillingType"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -715,6 +795,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("balanceType"); openapiRequiredFields.add("salesForceId"); openapiRequiredFields.add("spendType"); + openapiRequiredFields.add("privateMarketBillingType"); } /** @@ -757,6 +838,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (!jsonObj.get("spendType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `spendType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("spendType").toString())); } + if (!jsonObj.get("privateMarketBillingType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `privateMarketBillingType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privateMarketBillingType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/JsonApiPageResponseOfAccount.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/JsonApiPageResponseOfAccount.java index f3bde5e0..448456f8 100644 --- a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/JsonApiPageResponseOfAccount.java +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/JsonApiPageResponseOfAccount.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfAccount metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/JsonApiPageResponseOfBrand.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/JsonApiPageResponseOfBrand.java index 9446da09..b7abcbf0 100644 --- a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/JsonApiPageResponseOfBrand.java +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/JsonApiPageResponseOfBrand.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfBrand metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/JsonApiPageResponseOfRetailer.java b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/JsonApiPageResponseOfRetailer.java index 230396df..4552b9d9 100644 --- a/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/JsonApiPageResponseOfRetailer.java +++ b/sdks/retailmedia_2023-10/src/main/java/com/criteo/api/retailmedia/v2023_10/model/JsonApiPageResponseOfRetailer.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfRetailer metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2024-01/.openapi-generator/FILES b/sdks/retailmedia_2024-01/.openapi-generator/FILES index 1b37c850..f7714e34 100644 --- a/sdks/retailmedia_2024-01/.openapi-generator/FILES +++ b/sdks/retailmedia_2024-01/.openapi-generator/FILES @@ -6,6 +6,7 @@ README.md api/openapi.yaml build.gradle build.sbt +docs/AccountsApi.md docs/AddFundsToBalanceRequest.md docs/AddRemoveKeywordModel.md docs/AddRemoveKeywordsModel.md @@ -40,6 +41,7 @@ docs/AudienceApi.md docs/AudienceIdsUpdateModel202110Request.md docs/AudienceTarget202110Request.md docs/AudienceTarget202110Response.md +docs/BalanceApi.md docs/BalanceCampaign202110ListRequest.md docs/BalanceCampaign202110PagedListResponse.md docs/BalanceResponse.md @@ -247,8 +249,10 @@ src/main/java/com/criteo/api/retailmedia/v2024_01/ProgressResponseBody.java src/main/java/com/criteo/api/retailmedia/v2024_01/ServerConfiguration.java src/main/java/com/criteo/api/retailmedia/v2024_01/ServerVariable.java src/main/java/com/criteo/api/retailmedia/v2024_01/StringUtil.java +src/main/java/com/criteo/api/retailmedia/v2024_01/api/AccountsApi.java src/main/java/com/criteo/api/retailmedia/v2024_01/api/AnalyticsApi.java src/main/java/com/criteo/api/retailmedia/v2024_01/api/AudienceApi.java +src/main/java/com/criteo/api/retailmedia/v2024_01/api/BalanceApi.java src/main/java/com/criteo/api/retailmedia/v2024_01/api/CampaignApi.java src/main/java/com/criteo/api/retailmedia/v2024_01/api/GatewayApi.java src/main/java/com/criteo/api/retailmedia/v2024_01/auth/ApiKeyAuth.java diff --git a/sdks/retailmedia_2024-01/README.md b/sdks/retailmedia_2024-01/README.md index b75392b3..3a5e80cf 100644 --- a/sdks/retailmedia_2024-01/README.md +++ b/sdks/retailmedia_2024-01/README.md @@ -8,7 +8,7 @@ More information: [https://developers.criteo.com/](https://developers.criteo.com Criteo API -- Package version: 2024.01.0.240626 +- Package version: 2024.01.0.240731 *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -38,7 +38,7 @@ Add this dependency to your project's POM: com.criteo criteo-api-retailmedia-sdk - 2024.01.0.240626 + 2024.01.0.240731 compile ``` @@ -48,7 +48,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.criteo:criteo-api-retailmedia-sdk:2024.01.0.240626" +compile "com.criteo:criteo-api-retailmedia-sdk:2024.01.0.240731" ``` ### Others @@ -61,7 +61,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* `build/libs/criteo-api-retailmedia-sdk-2024.01.0.240626.jar` +* `build/libs/criteo-api-retailmedia-sdk-2024.01.0.240731.jar` ## Example @@ -73,6 +73,7 @@ All URIs are relative to *https://api.criteo.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AccountsApi* | [**getApiV1ExternalAccounts**](docs/AccountsApi.md#getApiV1ExternalAccounts) | **GET** /2024-01/retail-media/accounts | *AnalyticsApi* | [**generateAsyncCampaignsReport**](docs/AnalyticsApi.md#generateAsyncCampaignsReport) | **POST** /2024-01/retail-media/reports/campaigns | *AnalyticsApi* | [**generateAsyncLineItemsReport**](docs/AnalyticsApi.md#generateAsyncLineItemsReport) | **POST** /2024-01/retail-media/reports/line-items | *AnalyticsApi* | [**generateAsyncRevenueReport**](docs/AnalyticsApi.md#generateAsyncRevenueReport) | **POST** /2024-01/retail-media/reports/revenue | @@ -82,13 +83,19 @@ Class | Method | HTTP request | Description *AudienceApi* | [**legacyGetAudienceV1**](docs/AudienceApi.md#legacyGetAudienceV1) | **GET** /2024-01/retail-media/accounts/{accountId}/audiences | *AudienceApi* | [**legacyGetAudienceV2**](docs/AudienceApi.md#legacyGetAudienceV2) | **GET** /2024-01/retail-media/v2/accounts/{accountId}/audiences | *AudienceApi* | [**legacyUpdateAudienceV2**](docs/AudienceApi.md#legacyUpdateAudienceV2) | **POST** /2024-01/retail-media/v2/accounts/{accountId}/audiences | +*BalanceApi* | [**getApi202110ExternalBalanceCampaignsByBalanceId**](docs/BalanceApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2024-01/retail-media/balances/{balance-id}/campaigns | +*BalanceApi* | [**getApiV1ExternalAccountBalancesByAccountId**](docs/BalanceApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2024-01/retail-media/accounts/{account-id}/balances | +*BalanceApi* | [**getApiV1ExternalAccountByAccountIdAndBalanceId**](docs/BalanceApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId} | +*BalanceApi* | [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](docs/BalanceApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId} | +*BalanceApi* | [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](docs/BalanceApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | +*BalanceApi* | [**postApiV1ExternalAccountBalancesByAccountId**](docs/BalanceApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2024-01/retail-media/accounts/{account-id}/balances | +*BalanceApi* | [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](docs/BalanceApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | *CampaignApi* | [**addRemoveKeywords**](docs/CampaignApi.md#addRemoveKeywords) | **POST** /2024-01/retail-media/line-items/{id}/keywords/add-remove | *CampaignApi* | [**createAsset**](docs/CampaignApi.md#createAsset) | **POST** /2024-01/retail-media/assets | *CampaignApi* | [**fetchKeywords**](docs/CampaignApi.md#fetchKeywords) | **GET** /2024-01/retail-media/line-items/{id}/keywords | *CampaignApi* | [**fetchProposal**](docs/CampaignApi.md#fetchProposal) | **GET** /2024-01/retail-media/preferred-deal-line-items/{id}/proposal | *CampaignApi* | [**getApi202110ExternalAccountCreativesByAccountId**](docs/CampaignApi.md#getApi202110ExternalAccountCreativesByAccountId) | **GET** /2024-01/retail-media/accounts/{account-id}/creatives | *CampaignApi* | [**getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId**](docs/CampaignApi.md#getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId) | **GET** /2024-01/retail-media/auction-line-items/{line-item-id}/targeting/keywords | -*CampaignApi* | [**getApi202110ExternalBalanceCampaignsByBalanceId**](docs/CampaignApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2024-01/retail-media/balances/{balance-id}/campaigns | *CampaignApi* | [**getApi202110ExternalCampaignPreferredLineItemsByCampaignId**](docs/CampaignApi.md#getApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **GET** /2024-01/retail-media/campaigns/{campaign-id}/preferred-line-items | *CampaignApi* | [**getApi202110ExternalLineItemProductsByLineItemId**](docs/CampaignApi.md#getApi202110ExternalLineItemProductsByLineItemId) | **GET** /2024-01/retail-media/line-items/{line-item-id}/products | *CampaignApi* | [**getApi202110ExternalPreferredLineItemByLineItemId**](docs/CampaignApi.md#getApi202110ExternalPreferredLineItemByLineItemId) | **GET** /2024-01/retail-media/preferred-line-items/{line-item-id} | @@ -104,11 +111,8 @@ Class | Method | HTTP request | Description *CampaignApi* | [**getApi202301ExternalAccountCampaignsByAccountId**](docs/CampaignApi.md#getApi202301ExternalAccountCampaignsByAccountId) | **GET** /2024-01/retail-media/accounts/{account-id}/campaigns | *CampaignApi* | [**getApi202301ExternalCampaignByCampaignId**](docs/CampaignApi.md#getApi202301ExternalCampaignByCampaignId) | **GET** /2024-01/retail-media/campaigns/{campaignId} | *CampaignApi* | [**getApi202301ExternalLineItemBidMultipliersByLineItemId**](docs/CampaignApi.md#getApi202301ExternalLineItemBidMultipliersByLineItemId) | **GET** /2024-01/retail-media/line-items/{line-item-id}/bid-multipliers | -*CampaignApi* | [**getApiV1ExternalAccountBalancesByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2024-01/retail-media/accounts/{account-id}/balances | *CampaignApi* | [**getApiV1ExternalAccountBrandsByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /2024-01/retail-media/accounts/{accountId}/brands | -*CampaignApi* | [**getApiV1ExternalAccountByAccountIdAndBalanceId**](docs/CampaignApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId} | *CampaignApi* | [**getApiV1ExternalAccountRetailersByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /2024-01/retail-media/accounts/{accountId}/retailers | -*CampaignApi* | [**getApiV1ExternalAccounts**](docs/CampaignApi.md#getApiV1ExternalAccounts) | **GET** /2024-01/retail-media/accounts | *CampaignApi* | [**getApiV1ExternalCatalogOutputByCatalogId**](docs/CampaignApi.md#getApiV1ExternalCatalogOutputByCatalogId) | **GET** /2024-01/retail-media/catalogs/{catalogId}/output | *CampaignApi* | [**getApiV1ExternalCatalogStatusByCatalogId**](docs/CampaignApi.md#getApiV1ExternalCatalogStatusByCatalogId) | **GET** /2024-01/retail-media/catalogs/{catalogId}/status | *CampaignApi* | [**getApiV2ExternalAccountLineItemsByAccountId**](docs/CampaignApi.md#getApiV2ExternalAccountLineItemsByAccountId) | **GET** /2024-01/retail-media/accounts/{account-id}/line-items | @@ -117,7 +121,6 @@ Class | Method | HTTP request | Description *CampaignApi* | [**getApiV2ExternalLineItemByLineItemId**](docs/CampaignApi.md#getApiV2ExternalLineItemByLineItemId) | **GET** /2024-01/retail-media/line-items/{line-item-id} | *CampaignApi* | [**getCampaignBudgetOverrides**](docs/CampaignApi.md#getCampaignBudgetOverrides) | **GET** /2024-01/retail-media/campaigns/{campaignId}/campaign-budget-overrides | *CampaignApi* | [**getLineItemBudgetOverrides**](docs/CampaignApi.md#getLineItemBudgetOverrides) | **GET** /2024-01/retail-media/line-items/{lineItemId}/line-item-budget-overrides | -*CampaignApi* | [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](docs/CampaignApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId} | *CampaignApi* | [**postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId**](docs/CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId) | **POST** /2024-01/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append | *CampaignApi* | [**postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId**](docs/CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId) | **POST** /2024-01/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete | *CampaignApi* | [**postApi202110ExternalBalanceCampaignsAppendByBalanceId**](docs/CampaignApi.md#postApi202110ExternalBalanceCampaignsAppendByBalanceId) | **POST** /2024-01/retail-media/balances/{balance-id}/campaigns/append | @@ -136,10 +139,7 @@ Class | Method | HTTP request | Description *CampaignApi* | [**postApi202210ExternalAccountCreativesByAccountId**](docs/CampaignApi.md#postApi202210ExternalAccountCreativesByAccountId) | **POST** /2024-01/retail-media/accounts/{account-id}/creatives | *CampaignApi* | [**postApi202210ExternalAccountCreativesSearchByAccountId**](docs/CampaignApi.md#postApi202210ExternalAccountCreativesSearchByAccountId) | **POST** /2024-01/retail-media/accounts/{account-id}/creatives/search | *CampaignApi* | [**postApi202301ExternalAccountCampaignsByAccountId**](docs/CampaignApi.md#postApi202301ExternalAccountCampaignsByAccountId) | **POST** /2024-01/retail-media/accounts/{account-id}/campaigns | -*CampaignApi* | [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](docs/CampaignApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | -*CampaignApi* | [**postApiV1ExternalAccountBalancesByAccountId**](docs/CampaignApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2024-01/retail-media/accounts/{account-id}/balances | *CampaignApi* | [**postApiV1ExternalAccountCatalogsByAccountId**](docs/CampaignApi.md#postApiV1ExternalAccountCatalogsByAccountId) | **POST** /2024-01/retail-media/accounts/{accountId}/catalogs | -*CampaignApi* | [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](docs/CampaignApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | *CampaignApi* | [**postApiV2ExternalCampaignAuctionLineItemsByCampaignId**](docs/CampaignApi.md#postApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **POST** /2024-01/retail-media/campaigns/{campaign-id}/auction-line-items | *CampaignApi* | [**putApi202110ExternalPreferredLineItemByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemByLineItemId) | **PUT** /2024-01/retail-media/preferred-line-items/{line-item-id} | *CampaignApi* | [**putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **PUT** /2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | diff --git a/sdks/retailmedia_2024-01/api/openapi.yaml b/sdks/retailmedia_2024-01/api/openapi.yaml index d0f4d71b..7a18711c 100644 --- a/sdks/retailmedia_2024-01/api/openapi.yaml +++ b/sdks/retailmedia_2024-01/api/openapi.yaml @@ -49,6 +49,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -60,6 +61,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -67,12 +69,18 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfAccount' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfAccount' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfAccount' description: Success tags: - - Campaign + - Accounts x-accepts: application/json /2024-01/retail-media/accounts/{accountId}/brands: get: @@ -107,6 +115,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -118,6 +127,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -125,9 +135,15 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfBrand' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfBrand' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfBrand' description: Success tags: - Campaign @@ -165,6 +181,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -176,6 +193,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -183,9 +201,15 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' description: Success tags: - Campaign @@ -923,7 +947,10 @@ paths: description: Catalog download initiated. "400": content: - application/x-json-stream: {} + application/x-json-stream: + schema: + format: binary + type: string application/json: {} description: "The indicated catalog is not available for retrieval, wait\ \ for a success status." @@ -1477,6 +1504,7 @@ paths: schema: $ref: '#/components/schemas/ValueResourceInputOfCampaignBudgetOverrides' description: New campaign budget overrides settings value resource input. + x-bodyName: campaignBudgetOverridesInput responses: "201": content: @@ -1540,6 +1568,7 @@ paths: schema: $ref: '#/components/schemas/ValueResourceInputOfLineItemBudgetOverrides' description: New line item budget overrides settings value resource input. + x-bodyName: lineItemBudgetOverridesInput responses: "201": content: @@ -1608,7 +1637,7 @@ paths: $ref: '#/components/schemas/BalanceResponsePagedListResponse' description: Success tags: - - Campaign + - Balance x-accepts: application/json post: description: Create balance for the given account id @@ -1638,7 +1667,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json /2024-01/retail-media/accounts/{account-id}/balances/{balanceId}: @@ -1672,7 +1701,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-accepts: application/json patch: description: Modify a balance for the given account id @@ -1711,7 +1740,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json /2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds: @@ -1752,7 +1781,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json /2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates: @@ -1793,7 +1822,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json /2024-01/retail-media/accounts/{account-id}/campaigns: @@ -2209,7 +2238,7 @@ paths: $ref: '#/components/schemas/BalanceCampaign202110PagedListResponse' description: Success tags: - - Campaign + - Balance x-accepts: application/json /2024-01/retail-media/balances/{balance-id}/campaigns/append: post: @@ -3338,7 +3367,8 @@ paths: components: schemas: ApplicationSummaryModelResponse: - description: Response of ApplicationSummaryModel + description: A top-level object that encapsulates a Criteo API response for + a single value example: data: attributes: @@ -3399,17 +3429,16 @@ components: nullable: true readOnly: true type: array - uniqueItems: false errors: items: $ref: '#/components/schemas/CommonProblem' nullable: true readOnly: true type: array - uniqueItems: false type: object ApplicationSummaryModelResource: - description: A class that represents a ValueType in a guild compliant way + description: A top-level object that encapsulates a Criteo API response for + a single value example: attributes: organizationId: 6 @@ -3426,7 +3455,7 @@ components: $ref: '#/components/schemas/ApplicationSummaryModel' type: object CommonProblem: - description: Common problem object. Can be specialized as needed. + description: Common problem object. example: traceId: traceId traceIdentifier: traceIdentifier @@ -3462,7 +3491,7 @@ components: nullable: true type: string code: - description: "A machine-readable error code, expressed as a string value." + description: "A machine-readable error code, expressed as a string value." nullable: true type: string instance: @@ -3490,7 +3519,8 @@ components: type: string type: object ApplicationSummaryModel: - description: Model of ApplicationSummary + description: Used for the /me endpoint. Contains information about the currently + authenticated application that we accept to give to our clients example: organizationId: 6 name: name @@ -3612,8 +3642,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false JsonApiPageResponseOfBrand: description: A wrapper class to return a single page of with metadata @@ -3692,8 +3722,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false JsonApiPageResponseOfRetailer: description: A wrapper class to return a single page of with metadata @@ -3778,8 +3808,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false PageMetadata: description: Metadata related to the current request example: @@ -3818,7 +3848,6 @@ components: - currentPageIndex - currentPageSize type: object - x-nullable: false CommonError: description: A JSON:API Common error structure example: @@ -3884,7 +3913,6 @@ components: type: string x-nullable: false type: object - x-nullable: false CommonWarning: description: A JSON:API Base common warning example: @@ -3950,7 +3978,6 @@ components: type: string x-nullable: false type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndAccountAndAccount: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -3982,7 +4009,6 @@ components: - id - type type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndBrandAndBrand: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -4005,7 +4031,6 @@ components: - id - type type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndRetailerAndRetailer: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -4031,7 +4056,6 @@ components: - id - type type: object - x-nullable: false ExternalAccount: description: A Retail Media Account used to launch campaigns and line items example: @@ -4069,7 +4093,6 @@ components: countries: items: type: string - x-nullable: false type: array x-nullable: false currency: @@ -4086,6 +4109,7 @@ components: companyName: nullable: true type: string + x-nullable: true required: - countries - currency @@ -4094,7 +4118,6 @@ components: - timeZone - type type: object - x-nullable: false ExternalBrand: description: A Retail Media Brand used to represent a collection of products sold under the same umbrella name @@ -4109,7 +4132,6 @@ components: required: - name type: object - x-nullable: false ExternalRetailer: description: A Retail Media Retailer used to represent a selection of products from multiple brands @@ -4130,13 +4152,11 @@ components: - auction - preferred type: string - x-nullable: false type: array x-nullable: false required: - name type: object - x-nullable: false AssetResponse: description: A class implementing the response of the Criteo API as described in API Guild Guidelines with a single entity as body @@ -8548,6 +8568,9 @@ components: example: data: attributes: + advertiserTypes: + - retailer + - retailer campaignType: all clickAttributionWindow: none endDate: 2000-01-23T04:56:07.000+00:00 @@ -8671,6 +8694,9 @@ components: a single value example: attributes: + advertiserTypes: + - retailer + - retailer campaignType: all clickAttributionWindow: none endDate: 2000-01-23T04:56:07.000+00:00 @@ -8871,6 +8897,8 @@ components: - salesChannel - environment - pageTypeName + - pageCategory + - taxonomyBreadcrumb - keyword - searchTerm type: string @@ -9045,6 +9073,8 @@ components: - salesChannel - environment - pageTypeName + - pageCategory + - taxonomyBreadcrumb - keyword - searchTerm type: string @@ -9101,6 +9131,9 @@ components: AsyncRevenueReport: description: Async Revenue report body request example: + advertiserTypes: + - retailer + - retailer campaignType: all clickAttributionWindow: none endDate: 2000-01-23T04:56:07.000+00:00 @@ -9128,13 +9161,13 @@ components: - date properties: ids: - description: Campaign ids to report on + description: Supply account ids to report on items: type: string nullable: true type: array id: - description: Campaign id to report on + description: Supply account id to report on nullable: true type: string reportType: @@ -9171,6 +9204,16 @@ components: - sponsorship nullable: true type: string + advertiserTypes: + description: "Filter on the type of advertiser: retailer, brand, seller" + items: + enum: + - retailer + - brand + - seller + type: string + nullable: true + type: array skuRelations: description: "Filter on sku relations: Same SKU, Same Parent SKU, Same Category,\ \ Same Brand or Same Seller" @@ -9243,6 +9286,7 @@ components: - accountId - accountName - accountTypeName + - advertiserType - campaignId - campaignName - campaignTypeName @@ -9266,6 +9310,7 @@ components: - advProductName - advProductGtin - advProductMpn + - buyType - soldBy - saleChannel - attributionSettings @@ -9310,6 +9355,7 @@ components: - transactions - assistedSales - assistedUnits + - revenue - openAuctionRevenue - preferredDealsRevenue - ctr @@ -9875,6 +9921,7 @@ components: currentPageIndex: 1 data: - attributes: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -9892,6 +9939,7 @@ components: id: id type: type - attributes: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -9977,6 +10025,7 @@ components: example: data: attributes: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -11860,6 +11909,7 @@ components: description: Data model for a Resource example: attributes: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -12559,6 +12609,7 @@ components: description: A Retail Media Balance used to determine the funds available for any or all campaigns in an account example: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -12590,30 +12641,22 @@ components: description: Amount of billable funds allotted to the balance. format: decimal nullable: true - required: - - "false" type: number x-nullable: true spent: format: decimal nullable: true - required: - - "false" type: number x-nullable: true remaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true startDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -12656,6 +12699,15 @@ components: - OffsiteAwareness type: string x-nullable: false + privateMarketBillingType: + description: Billing type for Private Market. + enum: + - NotApplicable + - BillByRetailer + - BillByCriteo + - Unknown + type: string + x-nullable: false required: - balanceType - createdAt @@ -12664,6 +12716,7 @@ components: - memo - name - poNumber + - privateMarketBillingType - remaining - salesForceId - spendType @@ -12716,15 +12769,11 @@ components: budgetSpent: format: decimal nullable: true - required: - - "false" type: number x-nullable: true budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true status: @@ -12786,22 +12835,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -12885,8 +12928,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -12914,8 +12955,6 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true campaignId: @@ -12929,8 +12968,6 @@ components: budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true createdAt: @@ -12983,8 +13020,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -12995,29 +13030,21 @@ components: maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true bidStrategy: @@ -13049,8 +13076,6 @@ components: targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -13068,8 +13093,6 @@ components: budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true createdAt: @@ -13155,15 +13178,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: @@ -13290,8 +13309,6 @@ components: bidOverride: format: decimal nullable: true - required: - - "false" type: number x-nullable: true type: object @@ -13414,16 +13431,12 @@ components: description: Amount of billable funds allotted to the balance. format: decimal nullable: true - required: - - "false" type: number x-nullable: true startDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -13615,22 +13628,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -13699,8 +13706,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -13724,36 +13729,26 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -13801,8 +13796,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -13830,36 +13823,26 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -13915,15 +13898,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: @@ -13997,22 +13976,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -14110,15 +14083,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: diff --git a/sdks/retailmedia_2024-01/build.gradle b/sdks/retailmedia_2024-01/build.gradle index 96891eda..11da72ff 100644 --- a/sdks/retailmedia_2024-01/build.gradle +++ b/sdks/retailmedia_2024-01/build.gradle @@ -23,7 +23,7 @@ if (JavaVersion.current().isJava8Compatible()) { } group = 'com.criteo' -version = '2024.01.0.240626' +version = '2024.01.0.240731' repositories { jcenter() @@ -74,7 +74,7 @@ publishing { mavenJava(MavenPublication) { groupId 'com.criteo' artifactId 'criteo-api-retailmedia-sdk' - version '2024.01.0.240626' + version '2024.01.0.240731' from components.java artifact sourcesJar artifact javadocJar diff --git a/sdks/retailmedia_2024-01/docs/AccountsApi.md b/sdks/retailmedia_2024-01/docs/AccountsApi.md new file mode 100644 index 00000000..4fc45517 --- /dev/null +++ b/sdks/retailmedia_2024-01/docs/AccountsApi.md @@ -0,0 +1,102 @@ +# AccountsApi + +All URIs are relative to *https://api.criteo.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getApiV1ExternalAccounts**](AccountsApi.md#getApiV1ExternalAccounts) | **GET** /2024-01/retail-media/accounts | | + + + +## getApiV1ExternalAccounts + +> JsonApiPageResponseOfAccount getApiV1ExternalAccounts(limitToId, pageIndex, pageSize) + + + +Gets page of account objects that the current user can access + +### Example + +```java +package com.criteo.api.retailmedia.v2024_01; + +import com.criteo.api.retailmedia.v2024_01.ApiClient; +import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_01.ApiException; +import com.criteo.api.retailmedia.v2024_01.Configuration; +import com.criteo.api.retailmedia.v2024_01.auth.*; +import com.criteo.api.retailmedia.v2024_01.model.*; +import com.criteo.api.retailmedia.v2024_01.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request + try { + JsonApiPageResponseOfAccount result = apiInstance.getApiV1ExternalAccounts(limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#getApiV1ExternalAccounts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | + +### Return type + +[**JsonApiPageResponseOfAccount**](JsonApiPageResponseOfAccount.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + diff --git a/sdks/retailmedia_2024-01/docs/ApplicationSummaryModel.md b/sdks/retailmedia_2024-01/docs/ApplicationSummaryModel.md index 704b26ad..d5e84458 100644 --- a/sdks/retailmedia_2024-01/docs/ApplicationSummaryModel.md +++ b/sdks/retailmedia_2024-01/docs/ApplicationSummaryModel.md @@ -2,7 +2,7 @@ # ApplicationSummaryModel -Model of ApplicationSummary +Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients ## Properties diff --git a/sdks/retailmedia_2024-01/docs/ApplicationSummaryModelResource.md b/sdks/retailmedia_2024-01/docs/ApplicationSummaryModelResource.md index 81ed2c97..af688c5d 100644 --- a/sdks/retailmedia_2024-01/docs/ApplicationSummaryModelResource.md +++ b/sdks/retailmedia_2024-01/docs/ApplicationSummaryModelResource.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResource -A class that represents a ValueType in a guild compliant way +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/retailmedia_2024-01/docs/ApplicationSummaryModelResponse.md b/sdks/retailmedia_2024-01/docs/ApplicationSummaryModelResponse.md index 47b6bd74..658b5549 100644 --- a/sdks/retailmedia_2024-01/docs/ApplicationSummaryModelResponse.md +++ b/sdks/retailmedia_2024-01/docs/ApplicationSummaryModelResponse.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResponse -Response of ApplicationSummaryModel +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/retailmedia_2024-01/docs/AsyncCampaignsReport.md b/sdks/retailmedia_2024-01/docs/AsyncCampaignsReport.md index d735484a..18252b4c 100644 --- a/sdks/retailmedia_2024-01/docs/AsyncCampaignsReport.md +++ b/sdks/retailmedia_2024-01/docs/AsyncCampaignsReport.md @@ -116,6 +116,8 @@ Async Campaigns report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_2024-01/docs/AsyncLineItemsReport.md b/sdks/retailmedia_2024-01/docs/AsyncLineItemsReport.md index 9a3a2e0e..276cd5a1 100644 --- a/sdks/retailmedia_2024-01/docs/AsyncLineItemsReport.md +++ b/sdks/retailmedia_2024-01/docs/AsyncLineItemsReport.md @@ -116,6 +116,8 @@ Async Line Items report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_2024-01/docs/AsyncRevenueReport.md b/sdks/retailmedia_2024-01/docs/AsyncRevenueReport.md index bb77396b..16ae32dc 100644 --- a/sdks/retailmedia_2024-01/docs/AsyncRevenueReport.md +++ b/sdks/retailmedia_2024-01/docs/AsyncRevenueReport.md @@ -8,12 +8,13 @@ Async Revenue report body request | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**ids** | **List<String>** | Campaign ids to report on | [optional] | -|**id** | **String** | Campaign id to report on | [optional] | +|**ids** | **List<String>** | Supply account ids to report on | [optional] | +|**id** | **String** | Supply account id to report on | [optional] | |**reportType** | [**ReportTypeEnum**](#ReportTypeEnum) | Type of report | [optional] | |**revenueType** | [**RevenueTypeEnum**](#RevenueTypeEnum) | Type of revenue | [optional] | |**soldBy** | [**SoldByEnum**](#SoldByEnum) | Filter on the seller: Indirect Sold, Direct Sold or Private Market | [optional] | |**buyType** | [**BuyTypeEnum**](#BuyTypeEnum) | Filter on buy type: Auction, Preferred Deals or Sponsorship | [optional] | +|**advertiserTypes** | [**List<AdvertiserTypesEnum>**](#List<AdvertiserTypesEnum>) | Filter on the type of advertiser: retailer, brand, seller | [optional] | |**skuRelations** | [**List<SkuRelationsEnum>**](#List<SkuRelationsEnum>) | Filter on sku relations: Same SKU, Same Parent SKU, Same Category, Same Brand or Same Seller | [optional] | |**format** | [**FormatEnum**](#FormatEnum) | Format of the output | [optional] | |**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Filter the type of campaigns to report on: sponsoredProducts or onSiteDisplays | [optional] | @@ -69,6 +70,16 @@ Async Revenue report body request +## Enum: List<AdvertiserTypesEnum> + +| Name | Value | +|---- | -----| +| RETAILER | "retailer" | +| BRAND | "brand" | +| SELLER | "seller" | + + + ## Enum: List<SkuRelationsEnum> | Name | Value | @@ -145,6 +156,7 @@ Async Revenue report body request | ACCOUNTID | "accountId" | | ACCOUNTNAME | "accountName" | | ACCOUNTTYPENAME | "accountTypeName" | +| ADVERTISERTYPE | "advertiserType" | | CAMPAIGNID | "campaignId" | | CAMPAIGNNAME | "campaignName" | | CAMPAIGNTYPENAME | "campaignTypeName" | @@ -168,6 +180,7 @@ Async Revenue report body request | ADVPRODUCTNAME | "advProductName" | | ADVPRODUCTGTIN | "advProductGtin" | | ADVPRODUCTMPN | "advProductMpn" | +| BUYTYPE | "buyType" | | SOLDBY | "soldBy" | | SALECHANNEL | "saleChannel" | | ATTRIBUTIONSETTINGS | "attributionSettings" | @@ -212,6 +225,7 @@ Async Revenue report body request | TRANSACTIONS | "transactions" | | ASSISTEDSALES | "assistedSales" | | ASSISTEDUNITS | "assistedUnits" | +| REVENUE | "revenue" | | OPENAUCTIONREVENUE | "openAuctionRevenue" | | PREFERREDDEALSREVENUE | "preferredDealsRevenue" | | CTR | "ctr" | diff --git a/sdks/retailmedia_2024-01/docs/BalanceApi.md b/sdks/retailmedia_2024-01/docs/BalanceApi.md new file mode 100644 index 00000000..4694ae2c --- /dev/null +++ b/sdks/retailmedia_2024-01/docs/BalanceApi.md @@ -0,0 +1,666 @@ +# BalanceApi + +All URIs are relative to *https://api.criteo.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getApi202110ExternalBalanceCampaignsByBalanceId**](BalanceApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2024-01/retail-media/balances/{balance-id}/campaigns | | +| [**getApiV1ExternalAccountBalancesByAccountId**](BalanceApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2024-01/retail-media/accounts/{account-id}/balances | | +| [**getApiV1ExternalAccountByAccountIdAndBalanceId**](BalanceApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId} | | +| [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](BalanceApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId} | | +| [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](BalanceApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | | +| [**postApiV1ExternalAccountBalancesByAccountId**](BalanceApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2024-01/retail-media/accounts/{account-id}/balances | | +| [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](BalanceApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | | + + + +## getApi202110ExternalBalanceCampaignsByBalanceId + +> BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize) + + + +Gets page of campaigns for the given balanceId + +### Example + +```java +package com.criteo.api.retailmedia.v2024_01; + +import com.criteo.api.retailmedia.v2024_01.ApiClient; +import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_01.ApiException; +import com.criteo.api.retailmedia.v2024_01.Configuration; +import com.criteo.api.retailmedia.v2024_01.auth.*; +import com.criteo.api.retailmedia.v2024_01.model.*; +import com.criteo.api.retailmedia.v2024_01.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String balanceId = "balanceId_example"; // String | The balance to get campaigns from + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + try { + BalanceCampaign202110PagedListResponse result = apiInstance.getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApi202110ExternalBalanceCampaignsByBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **balanceId** | **String**| The balance to get campaigns from | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | + +### Return type + +[**BalanceCampaign202110PagedListResponse**](BalanceCampaign202110PagedListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## getApiV1ExternalAccountBalancesByAccountId + +> BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize) + + + +Get page of balances for the given accountId. + +### Example + +```java +package com.criteo.api.retailmedia.v2024_01; + +import com.criteo.api.retailmedia.v2024_01.ApiClient; +import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_01.ApiException; +import com.criteo.api.retailmedia.v2024_01.Configuration; +import com.criteo.api.retailmedia.v2024_01.auth.*; +import com.criteo.api.retailmedia.v2024_01.model.*; +import com.criteo.api.retailmedia.v2024_01.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account to get page of balances for + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request + try { + BalanceResponsePagedListResponse result = apiInstance.getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApiV1ExternalAccountBalancesByAccountId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account to get page of balances for | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | + +### Return type + +[**BalanceResponsePagedListResponse**](BalanceResponsePagedListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## getApiV1ExternalAccountByAccountIdAndBalanceId + +> BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId) + + + +Get a balance for the given account id and balance id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_01; + +import com.criteo.api.retailmedia.v2024_01.ApiClient; +import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_01.ApiException; +import com.criteo.api.retailmedia.v2024_01.Configuration; +import com.criteo.api.retailmedia.v2024_01.auth.*; +import com.criteo.api.retailmedia.v2024_01.model.*; +import com.criteo.api.retailmedia.v2024_01.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance id + try { + BalanceResponse result = apiInstance.getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApiV1ExternalAccountByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance id | | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## patchApiV1ExternalAccountByAccountIdAndBalanceId + +> BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest) + + + +Modify a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_01; + +import com.criteo.api.retailmedia.v2024_01.ApiClient; +import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_01.ApiException; +import com.criteo.api.retailmedia.v2024_01.Configuration; +import com.criteo.api.retailmedia.v2024_01.auth.*; +import com.criteo.api.retailmedia.v2024_01.model.*; +import com.criteo.api.retailmedia.v2024_01.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to change the dates + UpdateBalanceModelRequest updateBalanceModelRequest = new UpdateBalanceModelRequest(); // UpdateBalanceModelRequest | + try { + BalanceResponse result = apiInstance.patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#patchApiV1ExternalAccountByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to change the dates | | +| **updateBalanceModelRequest** | [**UpdateBalanceModelRequest**](UpdateBalanceModelRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId + +> BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest) + + + +Add funds to a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_01; + +import com.criteo.api.retailmedia.v2024_01.ApiClient; +import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_01.ApiException; +import com.criteo.api.retailmedia.v2024_01.Configuration; +import com.criteo.api.retailmedia.v2024_01.auth.*; +import com.criteo.api.retailmedia.v2024_01.model.*; +import com.criteo.api.retailmedia.v2024_01.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to add funds to + AddFundsToBalanceRequest addFundsToBalanceRequest = new AddFundsToBalanceRequest(); // AddFundsToBalanceRequest | + try { + BalanceResponse result = apiInstance.postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to add funds to | | +| **addFundsToBalanceRequest** | [**AddFundsToBalanceRequest**](AddFundsToBalanceRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## postApiV1ExternalAccountBalancesByAccountId + +> BalanceResponse postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest) + + + +Create balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_01; + +import com.criteo.api.retailmedia.v2024_01.ApiClient; +import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_01.ApiException; +import com.criteo.api.retailmedia.v2024_01.Configuration; +import com.criteo.api.retailmedia.v2024_01.auth.*; +import com.criteo.api.retailmedia.v2024_01.model.*; +import com.criteo.api.retailmedia.v2024_01.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account to create balances for + CreateBalanceRequest createBalanceRequest = new CreateBalanceRequest(); // CreateBalanceRequest | + try { + BalanceResponse result = apiInstance.postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV1ExternalAccountBalancesByAccountId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account to create balances for | | +| **createBalanceRequest** | [**CreateBalanceRequest**](CreateBalanceRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Success | - | + + +## postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId + +> BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest) + + + +Change dates of a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_01; + +import com.criteo.api.retailmedia.v2024_01.ApiClient; +import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_01.ApiException; +import com.criteo.api.retailmedia.v2024_01.Configuration; +import com.criteo.api.retailmedia.v2024_01.auth.*; +import com.criteo.api.retailmedia.v2024_01.model.*; +import com.criteo.api.retailmedia.v2024_01.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to change the dates + ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest = new ChangeDatesOfBalanceRequest(); // ChangeDatesOfBalanceRequest | + try { + BalanceResponse result = apiInstance.postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to change the dates | | +| **changeDatesOfBalanceRequest** | [**ChangeDatesOfBalanceRequest**](ChangeDatesOfBalanceRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + diff --git a/sdks/retailmedia_2024-01/docs/CampaignApi.md b/sdks/retailmedia_2024-01/docs/CampaignApi.md index 175ea478..5351c3d3 100644 --- a/sdks/retailmedia_2024-01/docs/CampaignApi.md +++ b/sdks/retailmedia_2024-01/docs/CampaignApi.md @@ -10,7 +10,6 @@ All URIs are relative to *https://api.criteo.com* | [**fetchProposal**](CampaignApi.md#fetchProposal) | **GET** /2024-01/retail-media/preferred-deal-line-items/{id}/proposal | | | [**getApi202110ExternalAccountCreativesByAccountId**](CampaignApi.md#getApi202110ExternalAccountCreativesByAccountId) | **GET** /2024-01/retail-media/accounts/{account-id}/creatives | | | [**getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId**](CampaignApi.md#getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId) | **GET** /2024-01/retail-media/auction-line-items/{line-item-id}/targeting/keywords | | -| [**getApi202110ExternalBalanceCampaignsByBalanceId**](CampaignApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2024-01/retail-media/balances/{balance-id}/campaigns | | | [**getApi202110ExternalCampaignPreferredLineItemsByCampaignId**](CampaignApi.md#getApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **GET** /2024-01/retail-media/campaigns/{campaign-id}/preferred-line-items | | | [**getApi202110ExternalLineItemProductsByLineItemId**](CampaignApi.md#getApi202110ExternalLineItemProductsByLineItemId) | **GET** /2024-01/retail-media/line-items/{line-item-id}/products | | | [**getApi202110ExternalPreferredLineItemByLineItemId**](CampaignApi.md#getApi202110ExternalPreferredLineItemByLineItemId) | **GET** /2024-01/retail-media/preferred-line-items/{line-item-id} | | @@ -26,11 +25,8 @@ All URIs are relative to *https://api.criteo.com* | [**getApi202301ExternalAccountCampaignsByAccountId**](CampaignApi.md#getApi202301ExternalAccountCampaignsByAccountId) | **GET** /2024-01/retail-media/accounts/{account-id}/campaigns | | | [**getApi202301ExternalCampaignByCampaignId**](CampaignApi.md#getApi202301ExternalCampaignByCampaignId) | **GET** /2024-01/retail-media/campaigns/{campaignId} | | | [**getApi202301ExternalLineItemBidMultipliersByLineItemId**](CampaignApi.md#getApi202301ExternalLineItemBidMultipliersByLineItemId) | **GET** /2024-01/retail-media/line-items/{line-item-id}/bid-multipliers | | -| [**getApiV1ExternalAccountBalancesByAccountId**](CampaignApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2024-01/retail-media/accounts/{account-id}/balances | | | [**getApiV1ExternalAccountBrandsByAccountId**](CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /2024-01/retail-media/accounts/{accountId}/brands | | -| [**getApiV1ExternalAccountByAccountIdAndBalanceId**](CampaignApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId} | | | [**getApiV1ExternalAccountRetailersByAccountId**](CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /2024-01/retail-media/accounts/{accountId}/retailers | | -| [**getApiV1ExternalAccounts**](CampaignApi.md#getApiV1ExternalAccounts) | **GET** /2024-01/retail-media/accounts | | | [**getApiV1ExternalCatalogOutputByCatalogId**](CampaignApi.md#getApiV1ExternalCatalogOutputByCatalogId) | **GET** /2024-01/retail-media/catalogs/{catalogId}/output | | | [**getApiV1ExternalCatalogStatusByCatalogId**](CampaignApi.md#getApiV1ExternalCatalogStatusByCatalogId) | **GET** /2024-01/retail-media/catalogs/{catalogId}/status | | | [**getApiV2ExternalAccountLineItemsByAccountId**](CampaignApi.md#getApiV2ExternalAccountLineItemsByAccountId) | **GET** /2024-01/retail-media/accounts/{account-id}/line-items | | @@ -39,7 +35,6 @@ All URIs are relative to *https://api.criteo.com* | [**getApiV2ExternalLineItemByLineItemId**](CampaignApi.md#getApiV2ExternalLineItemByLineItemId) | **GET** /2024-01/retail-media/line-items/{line-item-id} | | | [**getCampaignBudgetOverrides**](CampaignApi.md#getCampaignBudgetOverrides) | **GET** /2024-01/retail-media/campaigns/{campaignId}/campaign-budget-overrides | | | [**getLineItemBudgetOverrides**](CampaignApi.md#getLineItemBudgetOverrides) | **GET** /2024-01/retail-media/line-items/{lineItemId}/line-item-budget-overrides | | -| [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](CampaignApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId} | | | [**postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId**](CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId) | **POST** /2024-01/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append | | | [**postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId**](CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId) | **POST** /2024-01/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete | | | [**postApi202110ExternalBalanceCampaignsAppendByBalanceId**](CampaignApi.md#postApi202110ExternalBalanceCampaignsAppendByBalanceId) | **POST** /2024-01/retail-media/balances/{balance-id}/campaigns/append | | @@ -58,10 +53,7 @@ All URIs are relative to *https://api.criteo.com* | [**postApi202210ExternalAccountCreativesByAccountId**](CampaignApi.md#postApi202210ExternalAccountCreativesByAccountId) | **POST** /2024-01/retail-media/accounts/{account-id}/creatives | | | [**postApi202210ExternalAccountCreativesSearchByAccountId**](CampaignApi.md#postApi202210ExternalAccountCreativesSearchByAccountId) | **POST** /2024-01/retail-media/accounts/{account-id}/creatives/search | | | [**postApi202301ExternalAccountCampaignsByAccountId**](CampaignApi.md#postApi202301ExternalAccountCampaignsByAccountId) | **POST** /2024-01/retail-media/accounts/{account-id}/campaigns | | -| [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](CampaignApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | | -| [**postApiV1ExternalAccountBalancesByAccountId**](CampaignApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2024-01/retail-media/accounts/{account-id}/balances | | | [**postApiV1ExternalAccountCatalogsByAccountId**](CampaignApi.md#postApiV1ExternalAccountCatalogsByAccountId) | **POST** /2024-01/retail-media/accounts/{accountId}/catalogs | | -| [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](CampaignApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | | | [**postApiV2ExternalCampaignAuctionLineItemsByCampaignId**](CampaignApi.md#postApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **POST** /2024-01/retail-media/campaigns/{campaign-id}/auction-line-items | | | [**putApi202110ExternalPreferredLineItemByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemByLineItemId) | **PUT** /2024-01/retail-media/preferred-line-items/{line-item-id} | | | [**putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **PUT** /2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | | @@ -619,101 +611,6 @@ public class Example { | **400** | Bad Request | - | -## getApi202110ExternalBalanceCampaignsByBalanceId - -> BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize) - - - -Gets page of campaigns for the given balanceId - -### Example - -```java -package com.criteo.api.retailmedia.v2024_01; - -import com.criteo.api.retailmedia.v2024_01.ApiClient; -import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_01.ApiException; -import com.criteo.api.retailmedia.v2024_01.Configuration; -import com.criteo.api.retailmedia.v2024_01.auth.*; -import com.criteo.api.retailmedia.v2024_01.model.*; -import com.criteo.api.retailmedia.v2024_01.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String balanceId = "balanceId_example"; // String | The balance to get campaigns from - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request - try { - BalanceCampaign202110PagedListResponse result = apiInstance.getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApi202110ExternalBalanceCampaignsByBalanceId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **balanceId** | **String**| The balance to get campaigns from | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | - -### Return type - -[**BalanceCampaign202110PagedListResponse**](BalanceCampaign202110PagedListResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - ## getApi202110ExternalCampaignPreferredLineItemsByCampaignId > PreferredLineItem202110PagedListResponse getApi202110ExternalCampaignPreferredLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize) @@ -2084,13 +1981,13 @@ public class Example { | **200** | Success | - | -## getApiV1ExternalAccountBalancesByAccountId +## getApiV1ExternalAccountBrandsByAccountId -> BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize) +> JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize) -Get page of balances for the given accountId. +Gets page of retailer objects that are associated with the given account ### Example @@ -2131,15 +2028,15 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account to get page of balances for + String accountId = "accountId_example"; // String | The given account id List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { - BalanceResponsePagedListResponse result = apiInstance.getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize); + JsonApiPageResponseOfBrand result = apiInstance.getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountBalancesByAccountId"); + System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountBrandsByAccountId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2154,14 +2051,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account to get page of balances for | | +| **accountId** | **String**| The given account id | | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | | **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | | **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type -[**BalanceResponsePagedListResponse**](BalanceResponsePagedListResponse.md) +[**JsonApiPageResponseOfBrand**](JsonApiPageResponseOfBrand.md) ### Authorization @@ -2170,7 +2067,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/plain, application/json, text/json ### HTTP response details @@ -2179,9 +2076,9 @@ public class Example { | **200** | Success | - | -## getApiV1ExternalAccountBrandsByAccountId +## getApiV1ExternalAccountRetailersByAccountId -> JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize) +> JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize) @@ -2228,13 +2125,13 @@ public class Example { CampaignApi apiInstance = new CampaignApi(defaultClient); String accountId = "accountId_example"; // String | The given account id List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { - JsonApiPageResponseOfBrand result = apiInstance.getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize); + JsonApiPageResponseOfRetailer result = apiInstance.getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountBrandsByAccountId"); + System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountRetailersByAccountId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2251,12 +2148,12 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **accountId** | **String**| The given account id | | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type -[**JsonApiPageResponseOfBrand**](JsonApiPageResponseOfBrand.md) +[**JsonApiPageResponseOfRetailer**](JsonApiPageResponseOfRetailer.md) ### Authorization @@ -2265,7 +2162,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/plain, application/json, text/json ### HTTP response details @@ -2274,13 +2171,13 @@ public class Example { | **200** | Success | - | -## getApiV1ExternalAccountByAccountIdAndBalanceId +## getApiV1ExternalCatalogOutputByCatalogId -> BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId) +> File getApiV1ExternalCatalogOutputByCatalogId(catalogId) -Get a balance for the given account id and balance id +Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. ### Example @@ -2321,13 +2218,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account of the balance - String balanceId = "balanceId_example"; // String | The balance id + String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. try { - BalanceResponse result = apiInstance.getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId); + File result = apiInstance.getApiV1ExternalCatalogOutputByCatalogId(catalogId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountByAccountIdAndBalanceId"); + System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogOutputByCatalogId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2342,12 +2238,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account of the balance | | -| **balanceId** | **String**| The balance id | | +| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | ### Return type -[**BalanceResponse**](BalanceResponse.md) +[**File**](File.md) ### Authorization @@ -2356,22 +2251,23 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: application/x-json-stream, application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Success | - | +| **200** | Catalog download initiated. | - | +| **400** | The indicated catalog is not available for retrieval, wait for a success status. | - | -## getApiV1ExternalAccountRetailersByAccountId +## getApiV1ExternalCatalogStatusByCatalogId -> JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize) +> JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(catalogId) -Gets page of retailer objects that are associated with the given account +Check the status of a catalog request. ### Example @@ -2412,15 +2308,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The given account id - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. try { - JsonApiPageResponseOfRetailer result = apiInstance.getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize); + JsonApiSingleResponseOfCatalogStatus result = apiInstance.getApiV1ExternalCatalogStatusByCatalogId(catalogId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountRetailersByAccountId"); + System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogStatusByCatalogId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2435,14 +2328,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The given account id | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | ### Return type -[**JsonApiPageResponseOfRetailer**](JsonApiPageResponseOfRetailer.md) +[**JsonApiSingleResponseOfCatalogStatus**](JsonApiSingleResponseOfCatalogStatus.md) ### Authorization @@ -2457,16 +2347,16 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Success | - | +| **200** | Catalog request found. | - | -## getApiV1ExternalAccounts +## getApiV2ExternalAccountLineItemsByAccountId -> JsonApiPageResponseOfAccount getApiV1ExternalAccounts(limitToId, pageIndex, pageSize) +> CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize) -Gets page of account objects that the current user can access +Gets page of line item objects for the given account id ### Example @@ -2507,14 +2397,17 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); + String accountId = "accountId_example"; // String | The given account id + List limitToCampaignId = Arrays.asList(); // List | The campaign ids that you would like to limit your result set to + String limitToType = "Unknown"; // String | The campaign types that you would like to limit your result set to List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request try { - JsonApiPageResponseOfAccount result = apiInstance.getApiV1ExternalAccounts(limitToId, pageIndex, pageSize); + CommonLineItemPagedListResponse result = apiInstance.getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccounts"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalAccountLineItemsByAccountId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2529,13 +2422,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The given account id | | +| **limitToCampaignId** | [**List<String>**](String.md)| The campaign ids that you would like to limit your result set to | [optional] | +| **limitToType** | **String**| The campaign types that you would like to limit your result set to | [optional] [enum: Unknown, Auction, Preferred] | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | | **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | | **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | ### Return type -[**JsonApiPageResponseOfAccount**](JsonApiPageResponseOfAccount.md) +[**CommonLineItemPagedListResponse**](CommonLineItemPagedListResponse.md) ### Authorization @@ -2553,13 +2449,13 @@ public class Example { | **200** | Success | - | -## getApiV1ExternalCatalogOutputByCatalogId +## getApiV2ExternalAuctionLineItemByLineItemId -> File getApiV1ExternalCatalogOutputByCatalogId(catalogId) +> AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(lineItemId) -Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. +Gets the auction line item for the given line item id ### Example @@ -2600,12 +2496,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. + String lineItemId = "lineItemId_example"; // String | The given line item id try { - File result = apiInstance.getApiV1ExternalCatalogOutputByCatalogId(catalogId); + AuctionLineItemResponse result = apiInstance.getApiV2ExternalAuctionLineItemByLineItemId(lineItemId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogOutputByCatalogId"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalAuctionLineItemByLineItemId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2620,11 +2516,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | +| **lineItemId** | **String**| The given line item id | | ### Return type -[**File**](File.md) +[**AuctionLineItemResponse**](AuctionLineItemResponse.md) ### Authorization @@ -2633,23 +2529,23 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/x-json-stream, application/json +- **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Catalog download initiated. | - | -| **400** | The indicated catalog is not available for retrieval, wait for a success status. | - | +| **200** | Success | - | +| **400** | Bad Request | - | -## getApiV1ExternalCatalogStatusByCatalogId +## getApiV2ExternalCampaignAuctionLineItemsByCampaignId -> JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(catalogId) +> AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize) -Check the status of a catalog request. +Gets page of auction line item objects for the given campaign id ### Example @@ -2690,12 +2586,15 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. + String campaignId = "campaignId_example"; // String | The given campaign id + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request try { - JsonApiSingleResponseOfCatalogStatus result = apiInstance.getApiV1ExternalCatalogStatusByCatalogId(catalogId); + AuctionLineItemPagedListResponse result = apiInstance.getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogStatusByCatalogId"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalCampaignAuctionLineItemsByCampaignId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2710,11 +2609,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | +| **campaignId** | **String**| The given campaign id | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | ### Return type -[**JsonApiSingleResponseOfCatalogStatus**](JsonApiSingleResponseOfCatalogStatus.md) +[**AuctionLineItemPagedListResponse**](AuctionLineItemPagedListResponse.md) ### Authorization @@ -2729,16 +2631,17 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Catalog request found. | - | +| **200** | Success | - | +| **400** | Bad Request | - | -## getApiV2ExternalAccountLineItemsByAccountId +## getApiV2ExternalLineItemByLineItemId -> CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize) +> CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(lineItemId) -Gets page of line item objects for the given account id +Gets the line item for the given line item id ### Example @@ -2779,17 +2682,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The given account id - List limitToCampaignId = Arrays.asList(); // List | The campaign ids that you would like to limit your result set to - String limitToType = "Unknown"; // String | The campaign types that you would like to limit your result set to - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + String lineItemId = "lineItemId_example"; // String | The given line item id try { - CommonLineItemPagedListResponse result = apiInstance.getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); + CommonLineItemResponse result = apiInstance.getApiV2ExternalLineItemByLineItemId(lineItemId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalAccountLineItemsByAccountId"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalLineItemByLineItemId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2804,16 +2702,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The given account id | | -| **limitToCampaignId** | [**List<String>**](String.md)| The campaign ids that you would like to limit your result set to | [optional] | -| **limitToType** | **String**| The campaign types that you would like to limit your result set to | [optional] [enum: Unknown, Auction, Preferred] | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **lineItemId** | **String**| The given line item id | | ### Return type -[**CommonLineItemPagedListResponse**](CommonLineItemPagedListResponse.md) +[**CommonLineItemResponse**](CommonLineItemResponse.md) ### Authorization @@ -2831,13 +2724,13 @@ public class Example { | **200** | Success | - | -## getApiV2ExternalAuctionLineItemByLineItemId +## getCampaignBudgetOverrides -> AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(lineItemId) +> ValueResourceOutcomeOfCampaignBudgetOverrides getCampaignBudgetOverrides(campaignId) -Gets the auction line item for the given line item id +Get current campaign budget overrides by given external campaign id. ### Example @@ -2878,12 +2771,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String lineItemId = "lineItemId_example"; // String | The given line item id + Long campaignId = 56L; // Long | External campaign id. try { - AuctionLineItemResponse result = apiInstance.getApiV2ExternalAuctionLineItemByLineItemId(lineItemId); + ValueResourceOutcomeOfCampaignBudgetOverrides result = apiInstance.getCampaignBudgetOverrides(campaignId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalAuctionLineItemByLineItemId"); + System.err.println("Exception when calling CampaignApi#getCampaignBudgetOverrides"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2898,375 +2791,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **lineItemId** | **String**| The given line item id | | +| **campaignId** | **Long**| External campaign id. | | ### Return type -[**AuctionLineItemResponse**](AuctionLineItemResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | -| **400** | Bad Request | - | - - -## getApiV2ExternalCampaignAuctionLineItemsByCampaignId - -> AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize) - - - -Gets page of auction line item objects for the given campaign id - -### Example - -```java -package com.criteo.api.retailmedia.v2024_01; - -import com.criteo.api.retailmedia.v2024_01.ApiClient; -import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_01.ApiException; -import com.criteo.api.retailmedia.v2024_01.Configuration; -import com.criteo.api.retailmedia.v2024_01.auth.*; -import com.criteo.api.retailmedia.v2024_01.model.*; -import com.criteo.api.retailmedia.v2024_01.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String campaignId = "campaignId_example"; // String | The given campaign id - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request - try { - AuctionLineItemPagedListResponse result = apiInstance.getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalCampaignAuctionLineItemsByCampaignId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The given campaign id | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | - -### Return type - -[**AuctionLineItemPagedListResponse**](AuctionLineItemPagedListResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | -| **400** | Bad Request | - | - - -## getApiV2ExternalLineItemByLineItemId - -> CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(lineItemId) - - - -Gets the line item for the given line item id - -### Example - -```java -package com.criteo.api.retailmedia.v2024_01; - -import com.criteo.api.retailmedia.v2024_01.ApiClient; -import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_01.ApiException; -import com.criteo.api.retailmedia.v2024_01.Configuration; -import com.criteo.api.retailmedia.v2024_01.auth.*; -import com.criteo.api.retailmedia.v2024_01.model.*; -import com.criteo.api.retailmedia.v2024_01.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String lineItemId = "lineItemId_example"; // String | The given line item id - try { - CommonLineItemResponse result = apiInstance.getApiV2ExternalLineItemByLineItemId(lineItemId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalLineItemByLineItemId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **lineItemId** | **String**| The given line item id | | - -### Return type - -[**CommonLineItemResponse**](CommonLineItemResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## getCampaignBudgetOverrides - -> ValueResourceOutcomeOfCampaignBudgetOverrides getCampaignBudgetOverrides(campaignId) - - - -Get current campaign budget overrides by given external campaign id. - -### Example - -```java -package com.criteo.api.retailmedia.v2024_01; - -import com.criteo.api.retailmedia.v2024_01.ApiClient; -import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_01.ApiException; -import com.criteo.api.retailmedia.v2024_01.Configuration; -import com.criteo.api.retailmedia.v2024_01.auth.*; -import com.criteo.api.retailmedia.v2024_01.model.*; -import com.criteo.api.retailmedia.v2024_01.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - Long campaignId = 56L; // Long | External campaign id. - try { - ValueResourceOutcomeOfCampaignBudgetOverrides result = apiInstance.getCampaignBudgetOverrides(campaignId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getCampaignBudgetOverrides"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **Long**| External campaign id. | | - -### Return type - -[**ValueResourceOutcomeOfCampaignBudgetOverrides**](ValueResourceOutcomeOfCampaignBudgetOverrides.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## getLineItemBudgetOverrides - -> ValueResourceOutcomeOfLineItemBudgetOverrides getLineItemBudgetOverrides(lineItemId) - - - -Gets a collection of monthly and daily budget overrides for the provided line item. - -### Example - -```java -package com.criteo.api.retailmedia.v2024_01; - -import com.criteo.api.retailmedia.v2024_01.ApiClient; -import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_01.ApiException; -import com.criteo.api.retailmedia.v2024_01.Configuration; -import com.criteo.api.retailmedia.v2024_01.auth.*; -import com.criteo.api.retailmedia.v2024_01.model.*; -import com.criteo.api.retailmedia.v2024_01.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String lineItemId = "lineItemId_example"; // String | The line item id to get budget overrides for. - try { - ValueResourceOutcomeOfLineItemBudgetOverrides result = apiInstance.getLineItemBudgetOverrides(lineItemId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getLineItemBudgetOverrides"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **lineItemId** | **String**| The line item id to get budget overrides for. | | - -### Return type - -[**ValueResourceOutcomeOfLineItemBudgetOverrides**](ValueResourceOutcomeOfLineItemBudgetOverrides.md) +[**ValueResourceOutcomeOfCampaignBudgetOverrides**](ValueResourceOutcomeOfCampaignBudgetOverrides.md) ### Authorization @@ -3284,13 +2813,13 @@ public class Example { | **200** | Success | - | -## patchApiV1ExternalAccountByAccountIdAndBalanceId +## getLineItemBudgetOverrides -> BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest) +> ValueResourceOutcomeOfLineItemBudgetOverrides getLineItemBudgetOverrides(lineItemId) -Modify a balance for the given account id +Gets a collection of monthly and daily budget overrides for the provided line item. ### Example @@ -3331,14 +2860,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account of the balance - String balanceId = "balanceId_example"; // String | The balance to change the dates - UpdateBalanceModelRequest updateBalanceModelRequest = new UpdateBalanceModelRequest(); // UpdateBalanceModelRequest | + String lineItemId = "lineItemId_example"; // String | The line item id to get budget overrides for. try { - BalanceResponse result = apiInstance.patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest); + ValueResourceOutcomeOfLineItemBudgetOverrides result = apiInstance.getLineItemBudgetOverrides(lineItemId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#patchApiV1ExternalAccountByAccountIdAndBalanceId"); + System.err.println("Exception when calling CampaignApi#getLineItemBudgetOverrides"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3353,13 +2880,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account of the balance | | -| **balanceId** | **String**| The balance to change the dates | | -| **updateBalanceModelRequest** | [**UpdateBalanceModelRequest**](UpdateBalanceModelRequest.md)| | [optional] | +| **lineItemId** | **String**| The line item id to get budget overrides for. | | ### Return type -[**BalanceResponse**](BalanceResponse.md) +[**ValueResourceOutcomeOfLineItemBudgetOverrides**](ValueResourceOutcomeOfLineItemBudgetOverrides.md) ### Authorization @@ -3367,7 +2892,7 @@ public class Example { ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json @@ -5022,190 +4547,6 @@ public class Example { | **201** | Success | - | -## postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId - -> BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest) - - - -Add funds to a balance for the given account id - -### Example - -```java -package com.criteo.api.retailmedia.v2024_01; - -import com.criteo.api.retailmedia.v2024_01.ApiClient; -import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_01.ApiException; -import com.criteo.api.retailmedia.v2024_01.Configuration; -import com.criteo.api.retailmedia.v2024_01.auth.*; -import com.criteo.api.retailmedia.v2024_01.model.*; -import com.criteo.api.retailmedia.v2024_01.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account of the balance - String balanceId = "balanceId_example"; // String | The balance to add funds to - AddFundsToBalanceRequest addFundsToBalanceRequest = new AddFundsToBalanceRequest(); // AddFundsToBalanceRequest | - try { - BalanceResponse result = apiInstance.postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account of the balance | | -| **balanceId** | **String**| The balance to add funds to | | -| **addFundsToBalanceRequest** | [**AddFundsToBalanceRequest**](AddFundsToBalanceRequest.md)| | [optional] | - -### Return type - -[**BalanceResponse**](BalanceResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## postApiV1ExternalAccountBalancesByAccountId - -> BalanceResponse postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest) - - - -Create balance for the given account id - -### Example - -```java -package com.criteo.api.retailmedia.v2024_01; - -import com.criteo.api.retailmedia.v2024_01.ApiClient; -import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_01.ApiException; -import com.criteo.api.retailmedia.v2024_01.Configuration; -import com.criteo.api.retailmedia.v2024_01.auth.*; -import com.criteo.api.retailmedia.v2024_01.model.*; -import com.criteo.api.retailmedia.v2024_01.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account to create balances for - CreateBalanceRequest createBalanceRequest = new CreateBalanceRequest(); // CreateBalanceRequest | - try { - BalanceResponse result = apiInstance.postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#postApiV1ExternalAccountBalancesByAccountId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account to create balances for | | -| **createBalanceRequest** | [**CreateBalanceRequest**](CreateBalanceRequest.md)| | [optional] | - -### Return type - -[**BalanceResponse**](BalanceResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Success | - | - - ## postApiV1ExternalAccountCatalogsByAccountId > JsonApiSingleResponseOfCatalogStatus postApiV1ExternalAccountCatalogsByAccountId(accountId, jsonApiRequestOfCatalogRequest) @@ -5297,99 +4638,6 @@ public class Example { | **200** | Catalog request successfully created | - | -## postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId - -> BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest) - - - -Change dates of a balance for the given account id - -### Example - -```java -package com.criteo.api.retailmedia.v2024_01; - -import com.criteo.api.retailmedia.v2024_01.ApiClient; -import com.criteo.api.retailmedia.v2024_01.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_01.ApiException; -import com.criteo.api.retailmedia.v2024_01.Configuration; -import com.criteo.api.retailmedia.v2024_01.auth.*; -import com.criteo.api.retailmedia.v2024_01.model.*; -import com.criteo.api.retailmedia.v2024_01.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account of the balance - String balanceId = "balanceId_example"; // String | The balance to change the dates - ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest = new ChangeDatesOfBalanceRequest(); // ChangeDatesOfBalanceRequest | - try { - BalanceResponse result = apiInstance.postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account of the balance | | -| **balanceId** | **String**| The balance to change the dates | | -| **changeDatesOfBalanceRequest** | [**ChangeDatesOfBalanceRequest**](ChangeDatesOfBalanceRequest.md)| | [optional] | - -### Return type - -[**BalanceResponse**](BalanceResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - ## postApiV2ExternalCampaignAuctionLineItemsByCampaignId > AuctionLineItemResponse postApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, auctionLineItemCreateModelRequest) diff --git a/sdks/retailmedia_2024-01/docs/CommonProblem.md b/sdks/retailmedia_2024-01/docs/CommonProblem.md index 1ee7a1f1..3f7f164b 100644 --- a/sdks/retailmedia_2024-01/docs/CommonProblem.md +++ b/sdks/retailmedia_2024-01/docs/CommonProblem.md @@ -2,7 +2,7 @@ # CommonProblem -Common problem object. Can be specialized as needed. +Common problem object. ## Properties @@ -11,7 +11,7 @@ Common problem object. Can be specialized as needed. |**traceId** | **String** | The request correlation ID this problem comes from. | [optional] | |**traceIdentifier** | **String** | The request correlation ID this problem comes from. (deprecated, use traceId instead) | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The problem's category. | [optional] | -|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | +|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | |**instance** | **String** | A URI that identifies the specific occurrence of the problem. | [optional] | |**title** | **String** | A short human-readable description of the problem type | [optional] | |**detail** | **String** | A human-readable explanation specific to this occurrence of the problem | [optional] | diff --git a/sdks/retailmedia_2024-01/docs/ExternalBalanceResponse.md b/sdks/retailmedia_2024-01/docs/ExternalBalanceResponse.md index 15a6dde1..127b9534 100644 --- a/sdks/retailmedia_2024-01/docs/ExternalBalanceResponse.md +++ b/sdks/retailmedia_2024-01/docs/ExternalBalanceResponse.md @@ -22,6 +22,7 @@ A Retail Media Balance used to determine the funds available for any or all camp |**balanceType** | [**BalanceTypeEnum**](#BalanceTypeEnum) | Type of the balance | | |**salesForceId** | **String** | SalesForceId the balance is linked to. | | |**spendType** | [**SpendTypeEnum**](#SpendTypeEnum) | Spend Type of the balance. | | +|**privateMarketBillingType** | [**PrivateMarketBillingTypeEnum**](#PrivateMarketBillingTypeEnum) | Billing type for Private Market. | | @@ -56,3 +57,14 @@ A Retail Media Balance used to determine the funds available for any or all camp +## Enum: PrivateMarketBillingTypeEnum + +| Name | Value | +|---- | -----| +| NOTAPPLICABLE | "NotApplicable" | +| BILLBYRETAILER | "BillByRetailer" | +| BILLBYCRITEO | "BillByCriteo" | +| UNKNOWN | "Unknown" | + + + diff --git a/sdks/retailmedia_2024-01/docs/JsonApiPageResponseOfAccount.md b/sdks/retailmedia_2024-01/docs/JsonApiPageResponseOfAccount.md index af50ec88..aa059cfb 100644 --- a/sdks/retailmedia_2024-01/docs/JsonApiPageResponseOfAccount.md +++ b/sdks/retailmedia_2024-01/docs/JsonApiPageResponseOfAccount.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndAccountAndAccount>**](JsonApiBodyWithIdOfInt64AndAccountAndAccount.md) | | | diff --git a/sdks/retailmedia_2024-01/docs/JsonApiPageResponseOfBrand.md b/sdks/retailmedia_2024-01/docs/JsonApiPageResponseOfBrand.md index 0c2714ac..83498f93 100644 --- a/sdks/retailmedia_2024-01/docs/JsonApiPageResponseOfBrand.md +++ b/sdks/retailmedia_2024-01/docs/JsonApiPageResponseOfBrand.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndBrandAndBrand>**](JsonApiBodyWithIdOfInt64AndBrandAndBrand.md) | | | diff --git a/sdks/retailmedia_2024-01/docs/JsonApiPageResponseOfRetailer.md b/sdks/retailmedia_2024-01/docs/JsonApiPageResponseOfRetailer.md index e62ca2fd..4c29b7d7 100644 --- a/sdks/retailmedia_2024-01/docs/JsonApiPageResponseOfRetailer.md +++ b/sdks/retailmedia_2024-01/docs/JsonApiPageResponseOfRetailer.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndRetailerAndRetailer>**](JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md) | | | diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/ApiClient.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/ApiClient.java index 7f972232..08d8d68e 100644 --- a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/ApiClient.java +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/ApiClient.java @@ -213,7 +213,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2024.01.0.240626/java"); + setUserAgent("OpenAPI-Generator/2024.01.0.240731/java"); authentications = new HashMap(); } diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/api/AccountsApi.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/api/AccountsApi.java new file mode 100644 index 00000000..a86f74be --- /dev/null +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/api/AccountsApi.java @@ -0,0 +1,215 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_01.api; + +import com.criteo.api.retailmedia.v2024_01.ApiCallback; +import com.criteo.api.retailmedia.v2024_01.ApiClient; +import com.criteo.api.retailmedia.v2024_01.ApiException; +import com.criteo.api.retailmedia.v2024_01.ApiResponse; +import com.criteo.api.retailmedia.v2024_01.Configuration; +import com.criteo.api.retailmedia.v2024_01.Pair; +import com.criteo.api.retailmedia.v2024_01.ProgressRequestBody; +import com.criteo.api.retailmedia.v2024_01.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.criteo.api.retailmedia.v2024_01.model.JsonApiPageResponseOfAccount; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class AccountsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public AccountsApi() { + this(Configuration.getDefaultApiClient()); + } + + public AccountsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getApiV1ExternalAccounts + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-01/retail-media/accounts"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + return getApiV1ExternalAccountsCall(limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return JsonApiPageResponseOfAccount + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountsWithHttpInfo(limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return ApiResponse<JsonApiPageResponseOfAccount> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV1ExternalAccountsWithHttpInfo(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountsAsync(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/api/BalanceApi.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/api/BalanceApi.java new file mode 100644 index 00000000..f94e63e1 --- /dev/null +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/api/BalanceApi.java @@ -0,0 +1,1051 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-01 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_01.api; + +import com.criteo.api.retailmedia.v2024_01.ApiCallback; +import com.criteo.api.retailmedia.v2024_01.ApiClient; +import com.criteo.api.retailmedia.v2024_01.ApiException; +import com.criteo.api.retailmedia.v2024_01.ApiResponse; +import com.criteo.api.retailmedia.v2024_01.Configuration; +import com.criteo.api.retailmedia.v2024_01.Pair; +import com.criteo.api.retailmedia.v2024_01.ProgressRequestBody; +import com.criteo.api.retailmedia.v2024_01.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.criteo.api.retailmedia.v2024_01.model.AddFundsToBalanceRequest; +import com.criteo.api.retailmedia.v2024_01.model.BalanceCampaign202110PagedListResponse; +import com.criteo.api.retailmedia.v2024_01.model.BalanceResponse; +import com.criteo.api.retailmedia.v2024_01.model.BalanceResponsePagedListResponse; +import com.criteo.api.retailmedia.v2024_01.model.ChangeDatesOfBalanceRequest; +import com.criteo.api.retailmedia.v2024_01.model.CreateBalanceRequest; +import com.criteo.api.retailmedia.v2024_01.model.UpdateBalanceModelRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class BalanceApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public BalanceApi() { + this(Configuration.getDefaultApiClient()); + } + + public BalanceApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getApi202110ExternalBalanceCampaignsByBalanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-01/retail-media/balances/{balance-id}/campaigns" + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling getApi202110ExternalBalanceCampaignsByBalanceId(Async)"); + } + + return getApi202110ExternalBalanceCampaignsByBalanceIdCall(balanceId, limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return BalanceCampaign202110PagedListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(balanceId, limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return ApiResponse<BalanceCampaign202110PagedListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdAsync(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiV1ExternalAccountBalancesByAccountId + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-01/retail-media/accounts/{account-id}/balances" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountBalancesByAccountId(Async)"); + } + + return getApiV1ExternalAccountBalancesByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Get page of balances for the given accountId. + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return BalanceResponsePagedListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Get page of balances for the given accountId. + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return ApiResponse<BalanceResponsePagedListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get page of balances for the given accountId. + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiV1ExternalAccountByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-01/retail-media/accounts/{account-id}/balances/{balanceId}" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + return getApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, _callback); + + } + + /** + * + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId); + return localVarResp.getData(); + } + + /** + * + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for patchApiV1ExternalAccountByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateBalanceModelRequest; + + // create path and map variables + String localVarPath = "/2024-01/retail-media/accounts/{account-id}/balances/{balanceId}" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + return patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, updateBalanceModelRequest, _callback); + + } + + /** + * + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { + ApiResponse localVarResp = patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, updateBalanceModelRequest); + return localVarResp.getData(); + } + + /** + * + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { + okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = addFundsToBalanceRequest; + + // create path and map variables + String localVarPath = "/2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); + } + + return postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(accountId, balanceId, addFundsToBalanceRequest, _callback); + + } + + /** + * + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, addFundsToBalanceRequest); + return localVarResp.getData(); + } + + /** + * + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdAsync(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV1ExternalAccountBalancesByAccountId + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createBalanceRequest; + + // create path and map variables + String localVarPath = "/2024-01/retail-media/accounts/{account-id}/balances" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountBalancesByAccountId(Async)"); + } + + return postApiV1ExternalAccountBalancesByAccountIdCall(accountId, createBalanceRequest, _callback); + + } + + /** + * + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public BalanceResponse postApiV1ExternalAccountBalancesByAccountId(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, createBalanceRequest); + return localVarResp.getData(); + } + + /** + * + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public ApiResponse postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = changeDatesOfBalanceRequest; + + // create path and map variables + String localVarPath = "/2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); + } + + return postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); + + } + + /** + * + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, changeDatesOfBalanceRequest); + return localVarResp.getData(); + } + + /** + * + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdAsync(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/api/CampaignApi.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/api/CampaignApi.java index 20f22caf..8bfacce0 100644 --- a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/api/CampaignApi.java +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/api/CampaignApi.java @@ -27,7 +27,6 @@ import java.io.IOException; -import com.criteo.api.retailmedia.v2024_01.model.AddFundsToBalanceRequest; import com.criteo.api.retailmedia.v2024_01.model.AddRemoveKeywordsModelRequest; import com.criteo.api.retailmedia.v2024_01.model.AddToBasketIdsUpdateModel202110Request; import com.criteo.api.retailmedia.v2024_01.model.AddToBasketTarget202110Request; @@ -42,14 +41,10 @@ import com.criteo.api.retailmedia.v2024_01.model.AudienceTarget202110Response; import com.criteo.api.retailmedia.v2024_01.model.BalanceCampaign202110ListRequest; import com.criteo.api.retailmedia.v2024_01.model.BalanceCampaign202110PagedListResponse; -import com.criteo.api.retailmedia.v2024_01.model.BalanceResponse; -import com.criteo.api.retailmedia.v2024_01.model.BalanceResponsePagedListResponse; import com.criteo.api.retailmedia.v2024_01.model.Category202204; import com.criteo.api.retailmedia.v2024_01.model.Category202204ListResponse; -import com.criteo.api.retailmedia.v2024_01.model.ChangeDatesOfBalanceRequest; import com.criteo.api.retailmedia.v2024_01.model.CommonLineItemPagedListResponse; import com.criteo.api.retailmedia.v2024_01.model.CommonLineItemResponse; -import com.criteo.api.retailmedia.v2024_01.model.CreateBalanceRequest; import com.criteo.api.retailmedia.v2024_01.model.Creative202110ListResponse; import com.criteo.api.retailmedia.v2024_01.model.Creative202210ListResponse; import com.criteo.api.retailmedia.v2024_01.model.Creative202210Response; @@ -57,7 +52,6 @@ import com.criteo.api.retailmedia.v2024_01.model.CreativeUpdateModel202207; import com.criteo.api.retailmedia.v2024_01.model.ExternalRetailerPages202110; import java.io.File; -import com.criteo.api.retailmedia.v2024_01.model.JsonApiPageResponseOfAccount; import com.criteo.api.retailmedia.v2024_01.model.JsonApiPageResponseOfBrand; import com.criteo.api.retailmedia.v2024_01.model.JsonApiPageResponseOfCampaignV202301; import com.criteo.api.retailmedia.v2024_01.model.JsonApiPageResponseOfRetailer; @@ -86,7 +80,6 @@ import com.criteo.api.retailmedia.v2024_01.model.StoreTarget202110Response; import com.criteo.api.retailmedia.v2024_01.model.TemplateListResponse; import com.criteo.api.retailmedia.v2024_01.model.TemplateResponse; -import com.criteo.api.retailmedia.v2024_01.model.UpdateBalanceModelRequest; import com.criteo.api.retailmedia.v2024_01.model.ValueResourceInputOfCampaignBudgetOverrides; import com.criteo.api.retailmedia.v2024_01.model.ValueResourceInputOfLineItemBudgetOverrides; import com.criteo.api.retailmedia.v2024_01.model.ValueResourceOutcomeOfCampaignBudgetOverrides; @@ -905,153 +898,6 @@ public okhttp3.Call getApi202110ExternalAuctionLineItemTargetingKeywordsByLineIt localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getApi202110ExternalBalanceCampaignsByBalanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-01/retail-media/balances/{balance-id}/campaigns" - .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling getApi202110ExternalBalanceCampaignsByBalanceId(Async)"); - } - - return getApi202110ExternalBalanceCampaignsByBalanceIdCall(balanceId, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return BalanceCampaign202110PagedListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(balanceId, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<BalanceCampaign202110PagedListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdAsync(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getApi202110ExternalCampaignPreferredLineItemsByCampaignId * @param campaignId The given campaign id (required) @@ -3042,8 +2888,8 @@ public okhttp3.Call getApi202301ExternalLineItemBidMultipliersByLineItemIdAsync( return localVarCall; } /** - * Build call for getApiV1ExternalAccountBalancesByAccountId - * @param accountId The account to get page of balances for (required) + * Build call for getApiV1ExternalAccountBrandsByAccountId + * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) @@ -3056,7 +2902,7 @@ public okhttp3.Call getApi202301ExternalLineItemBidMultipliersByLineItemIdAsync( 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3073,8 +2919,8 @@ public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accoun Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts/{account-id}/balances" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2024-01/retail-media/accounts/{accountId}/brands" + .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3095,7 +2941,9 @@ public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accoun } final String[] localVarAccepts = { - "application/json" + "text/plain", + "application/json", + "text/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3114,24 +2962,24 @@ public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accoun } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountBalancesByAccountId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountBrandsByAccountId(Async)"); } - return getApiV1ExternalAccountBalancesByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + return getApiV1ExternalAccountBrandsByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); } /** * - * Get page of balances for the given accountId. - * @param accountId The account to get page of balances for (required) + * Gets page of retailer objects that are associated with the given account + * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) - * @return BalanceResponsePagedListResponse + * @return JsonApiPageResponseOfBrand * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3139,19 +2987,19 @@ private okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCal
200 Success -
*/ - public BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountBrandsByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); return localVarResp.getData(); } /** * - * Get page of balances for the given accountId. - * @param accountId The account to get page of balances for (required) + * Gets page of retailer objects that are associated with the given account + * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) - * @return ApiResponse<BalanceResponsePagedListResponse> + * @return ApiResponse<JsonApiPageResponseOfBrand> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3159,16 +3007,16 @@ public BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccount
200 Success -
*/ - public ApiResponse getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV1ExternalAccountBrandsByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Get page of balances for the given accountId. - * @param accountId The account to get page of balances for (required) + * Gets page of retailer objects that are associated with the given account + * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) @@ -3181,19 +3029,19 @@ public ApiResponse getApiV1ExternalAccountBala 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalAccountBrandsByAccountId + * Build call for getApiV1ExternalAccountRetailersByAccountId * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3203,7 +3051,7 @@ public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdAsync(String accou 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3220,7 +3068,7 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts/{accountId}/brands" + String localVarPath = "/2024-01/retail-media/accounts/{accountId}/retailers" .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -3242,7 +3090,9 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountI } final String[] localVarAccepts = { - "application/json" + "text/plain", + "application/json", + "text/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3261,13 +3111,13 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountI } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountBrandsByAccountId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountRetailersByAccountId(Async)"); } - return getApiV1ExternalAccountBrandsByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + return getApiV1ExternalAccountRetailersByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); } @@ -3276,9 +3126,9 @@ private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall( * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return JsonApiPageResponseOfBrand + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return JsonApiPageResponseOfRetailer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3286,8 +3136,8 @@ private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(
200 Success -
*/ - public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountBrandsByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + public JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountRetailersByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); return localVarResp.getData(); } @@ -3296,9 +3146,9 @@ public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(Strin * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<JsonApiPageResponseOfBrand> + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return ApiResponse<JsonApiPageResponseOfRetailer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3306,9 +3156,9 @@ public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(Strin
200 Success -
*/ - public ApiResponse getApiV1ExternalAccountBrandsByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV1ExternalAccountRetailersByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -3317,8 +3167,8 @@ public ApiResponse getApiV1ExternalAccountBrandsByAc * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3328,27 +3178,27 @@ public ApiResponse getApiV1ExternalAccountBrandsByAc 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalAccountByAccountIdAndBalanceId - * @param accountId The account of the balance (required) - * @param balanceId The balance id (required) + * Build call for getApiV1ExternalCatalogOutputByCatalogId + * @param catalogId A catalog ID returned from an account catalog request. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Success -
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
*/ - public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdCall(String catalogId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3365,9 +3215,8 @@ public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String ac Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts/{account-id}/balances/{balanceId}" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2024-01/retail-media/catalogs/{catalogId}/output" + .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3376,6 +3225,7 @@ public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String ac Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + "application/x-json-stream", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); @@ -3395,1068 +3245,87 @@ public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String ac } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); - } - - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + private okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(String catalogId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'catalogId' is set + if (catalogId == null) { + throw new ApiException("Missing the required parameter 'catalogId' when calling getApiV1ExternalCatalogOutputByCatalogId(Async)"); } - return getApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, _callback); + return getApiV1ExternalCatalogOutputByCatalogIdCall(catalogId, _callback); } /** * - * Get a balance for the given account id and balance id - * @param accountId The account of the balance (required) - * @param balanceId The balance id (required) - * @return BalanceResponse + * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. + * @param catalogId A catalog ID returned from an account catalog request. (required) + * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Success -
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
*/ - public BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId); + public File getApiV1ExternalCatalogOutputByCatalogId(String catalogId) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalCatalogOutputByCatalogIdWithHttpInfo(catalogId); return localVarResp.getData(); } /** * - * Get a balance for the given account id and balance id - * @param accountId The account of the balance (required) - * @param balanceId The balance id (required) - * @return ApiResponse<BalanceResponse> + * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. + * @param catalogId A catalog ID returned from an account catalog request. (required) + * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Success -
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
*/ - public ApiResponse getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV1ExternalCatalogOutputByCatalogIdWithHttpInfo(String catalogId) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(catalogId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Get a balance for the given account id and balance id - * @param accountId The account of the balance (required) - * @param balanceId The balance id (required) + * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. + * @param catalogId A catalog ID returned from an account catalog request. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Success -
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
*/ - public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdAsync(String catalogId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(catalogId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalAccountRetailersByAccountId - * @param accountId The given account id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts/{accountId}/retailers" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountRetailersByAccountId(Async)"); - } - - return getApiV1ExternalAccountRetailersByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of retailer objects that are associated with the given account - * @param accountId The given account id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return JsonApiPageResponseOfRetailer - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountRetailersByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of retailer objects that are associated with the given account - * @param accountId The given account id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<JsonApiPageResponseOfRetailer> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApiV1ExternalAccountRetailersByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of retailer objects that are associated with the given account - * @param accountId The given account id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV1ExternalAccounts - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - return getApiV1ExternalAccountsCall(limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of account objects that the current user can access - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return JsonApiPageResponseOfAccount - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountsWithHttpInfo(limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of account objects that the current user can access - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<JsonApiPageResponseOfAccount> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApiV1ExternalAccountsWithHttpInfo(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of account objects that the current user can access - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV1ExternalAccountsAsync(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV1ExternalCatalogOutputByCatalogId - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
- */ - public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdCall(String catalogId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-01/retail-media/catalogs/{catalogId}/output" - .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/x-json-stream", - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(String catalogId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'catalogId' is set - if (catalogId == null) { - throw new ApiException("Missing the required parameter 'catalogId' when calling getApiV1ExternalCatalogOutputByCatalogId(Async)"); - } - - return getApiV1ExternalCatalogOutputByCatalogIdCall(catalogId, _callback); - - } - - /** - * - * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @return File - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
- */ - public File getApiV1ExternalCatalogOutputByCatalogId(String catalogId) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalCatalogOutputByCatalogIdWithHttpInfo(catalogId); - return localVarResp.getData(); - } - - /** - * - * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @return ApiResponse<File> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
- */ - public ApiResponse getApiV1ExternalCatalogOutputByCatalogIdWithHttpInfo(String catalogId) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(catalogId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
- */ - public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdAsync(String catalogId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(catalogId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV1ExternalCatalogStatusByCatalogId - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Catalog request found. -
- */ - public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdCall(String catalogId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-01/retail-media/catalogs/{catalogId}/status" - .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(String catalogId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'catalogId' is set - if (catalogId == null) { - throw new ApiException("Missing the required parameter 'catalogId' when calling getApiV1ExternalCatalogStatusByCatalogId(Async)"); - } - - return getApiV1ExternalCatalogStatusByCatalogIdCall(catalogId, _callback); - - } - - /** - * - * Check the status of a catalog request. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @return JsonApiSingleResponseOfCatalogStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Catalog request found. -
- */ - public JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(String catalogId) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalCatalogStatusByCatalogIdWithHttpInfo(catalogId); - return localVarResp.getData(); - } - - /** - * - * Check the status of a catalog request. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @return ApiResponse<JsonApiSingleResponseOfCatalogStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Catalog request found. -
- */ - public ApiResponse getApiV1ExternalCatalogStatusByCatalogIdWithHttpInfo(String catalogId) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(catalogId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Check the status of a catalog request. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Catalog request found. -
- */ - public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdAsync(String catalogId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(catalogId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV2ExternalAccountLineItemsByAccountId - * @param accountId The given account id (required) - * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) - * @param limitToType The campaign types that you would like to limit your result set to (optional) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdCall(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts/{account-id}/line-items" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToCampaignId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToCampaignId", limitToCampaignId)); - } - - if (limitToType != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limitToType", limitToType)); - } - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV2ExternalAccountLineItemsByAccountId(Async)"); - } - - return getApiV2ExternalAccountLineItemsByAccountIdCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of line item objects for the given account id - * @param accountId The given account id (required) - * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) - * @param limitToType The campaign types that you would like to limit your result set to (optional) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return CommonLineItemPagedListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalAccountLineItemsByAccountIdWithHttpInfo(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of line item objects for the given account id - * @param accountId The given account id (required) - * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) - * @param limitToType The campaign types that you would like to limit your result set to (optional) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<CommonLineItemPagedListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApiV2ExternalAccountLineItemsByAccountIdWithHttpInfo(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of line item objects for the given account id - * @param accountId The given account id (required) - * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) - * @param limitToType The campaign types that you would like to limit your result set to (optional) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdAsync(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV2ExternalAuctionLineItemByLineItemId - * @param lineItemId The given line item id (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-01/retail-media/auction-line-items/{line-item-id}" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalAuctionLineItemByLineItemId(Async)"); - } - - return getApiV2ExternalAuctionLineItemByLineItemIdCall(lineItemId, _callback); - - } - - /** - * - * Gets the auction line item for the given line item id - * @param lineItemId The given line item id (required) - * @return AuctionLineItemResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(String lineItemId) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalAuctionLineItemByLineItemIdWithHttpInfo(lineItemId); - return localVarResp.getData(); - } - - /** - * - * Gets the auction line item for the given line item id - * @param lineItemId The given line item id (required) - * @return ApiResponse<AuctionLineItemResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public ApiResponse getApiV2ExternalAuctionLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(lineItemId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets the auction line item for the given line item id - * @param lineItemId The given line item id (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV2ExternalCampaignAuctionLineItemsByCampaignId - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-01/retail-media/campaigns/{campaign-id}/auction-line-items" - .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'campaignId' is set - if (campaignId == null) { - throw new ApiException("Missing the required parameter 'campaignId' when calling getApiV2ExternalCampaignAuctionLineItemsByCampaignId(Async)"); - } - - return getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(campaignId, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of auction line item objects for the given campaign id - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return AuctionLineItemPagedListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(campaignId, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of auction line item objects for the given campaign id - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<AuctionLineItemPagedListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public ApiResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of auction line item objects for the given campaign id - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdAsync(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV2ExternalLineItemByLineItemId - * @param lineItemId The given line item id (required) + * Build call for getApiV1ExternalCatalogStatusByCatalogId + * @param catalogId A catalog ID returned from an account catalog request. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request found. -
*/ - public okhttp3.Call getApiV2ExternalLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdCall(String catalogId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4473,8 +3342,8 @@ public okhttp3.Call getApiV2ExternalLineItemByLineItemIdCall(String lineItemId, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-01/retail-media/line-items/{line-item-id}" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2024-01/retail-media/catalogs/{catalogId}/status" + .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4502,74 +3371,79 @@ public okhttp3.Call getApiV2ExternalLineItemByLineItemIdCall(String lineItemId, } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalLineItemByLineItemId(Async)"); + private okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(String catalogId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'catalogId' is set + if (catalogId == null) { + throw new ApiException("Missing the required parameter 'catalogId' when calling getApiV1ExternalCatalogStatusByCatalogId(Async)"); } - return getApiV2ExternalLineItemByLineItemIdCall(lineItemId, _callback); + return getApiV1ExternalCatalogStatusByCatalogIdCall(catalogId, _callback); } /** * - * Gets the line item for the given line item id - * @param lineItemId The given line item id (required) - * @return CommonLineItemResponse + * Check the status of a catalog request. + * @param catalogId A catalog ID returned from an account catalog request. (required) + * @return JsonApiSingleResponseOfCatalogStatus * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request found. -
*/ - public CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(String lineItemId) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalLineItemByLineItemIdWithHttpInfo(lineItemId); + public JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(String catalogId) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalCatalogStatusByCatalogIdWithHttpInfo(catalogId); return localVarResp.getData(); } /** * - * Gets the line item for the given line item id - * @param lineItemId The given line item id (required) - * @return ApiResponse<CommonLineItemResponse> + * Check the status of a catalog request. + * @param catalogId A catalog ID returned from an account catalog request. (required) + * @return ApiResponse<JsonApiSingleResponseOfCatalogStatus> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request found. -
*/ - public ApiResponse getApiV2ExternalLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV1ExternalCatalogStatusByCatalogIdWithHttpInfo(String catalogId) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(catalogId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Gets the line item for the given line item id - * @param lineItemId The given line item id (required) + * Check the status of a catalog request. + * @param catalogId A catalog ID returned from an account catalog request. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request found. -
*/ - public okhttp3.Call getApiV2ExternalLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdAsync(String catalogId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(catalogId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getCampaignBudgetOverrides - * @param campaignId External campaign id. (required) + * Build call for getApiV2ExternalAccountLineItemsByAccountId + * @param accountId The given account id (required) + * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) + * @param limitToType The campaign types that you would like to limit your result set to (optional) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4579,7 +3453,7 @@ public okhttp3.Call getApiV2ExternalLineItemByLineItemIdAsync(String lineItemId, 200 Success - */ - public okhttp3.Call getCampaignBudgetOverridesCall(Long campaignId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdCall(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4596,8 +3470,8 @@ public okhttp3.Call getCampaignBudgetOverridesCall(Long campaignId, final ApiCal Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-01/retail-media/campaigns/{campaignId}/campaign-budget-overrides" - .replace("{" + "campaignId" + "}", localVarApiClient.escapeString(campaignId.toString())); + String localVarPath = "/2024-01/retail-media/accounts/{account-id}/line-items" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4605,6 +3479,26 @@ public okhttp3.Call getCampaignBudgetOverridesCall(Long campaignId, final ApiCal Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (limitToCampaignId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToCampaignId", limitToCampaignId)); + } + + if (limitToType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limitToType", limitToType)); + } + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + final String[] localVarAccepts = { "application/json" }; @@ -4625,21 +3519,26 @@ public okhttp3.Call getCampaignBudgetOverridesCall(Long campaignId, final ApiCal } @SuppressWarnings("rawtypes") - private okhttp3.Call getCampaignBudgetOverridesValidateBeforeCall(Long campaignId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'campaignId' is set - if (campaignId == null) { - throw new ApiException("Missing the required parameter 'campaignId' when calling getCampaignBudgetOverrides(Async)"); + private okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV2ExternalAccountLineItemsByAccountId(Async)"); } - return getCampaignBudgetOverridesCall(campaignId, _callback); + return getApiV2ExternalAccountLineItemsByAccountIdCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, _callback); } /** * - * Get current campaign budget overrides by given external campaign id. - * @param campaignId External campaign id. (required) - * @return ValueResourceOutcomeOfCampaignBudgetOverrides + * Gets page of line item objects for the given account id + * @param accountId The given account id (required) + * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) + * @param limitToType The campaign types that you would like to limit your result set to (optional) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return CommonLineItemPagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4647,16 +3546,21 @@ private okhttp3.Call getCampaignBudgetOverridesValidateBeforeCall(Long campaignI
200 Success -
*/ - public ValueResourceOutcomeOfCampaignBudgetOverrides getCampaignBudgetOverrides(Long campaignId) throws ApiException { - ApiResponse localVarResp = getCampaignBudgetOverridesWithHttpInfo(campaignId); + public CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalAccountLineItemsByAccountIdWithHttpInfo(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); return localVarResp.getData(); } /** * - * Get current campaign budget overrides by given external campaign id. - * @param campaignId External campaign id. (required) - * @return ApiResponse<ValueResourceOutcomeOfCampaignBudgetOverrides> + * Gets page of line item objects for the given account id + * @param accountId The given account id (required) + * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) + * @param limitToType The campaign types that you would like to limit your result set to (optional) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return ApiResponse<CommonLineItemPagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4664,16 +3568,21 @@ public ValueResourceOutcomeOfCampaignBudgetOverrides getCampaignBudgetOverrides(
200 Success -
*/ - public ApiResponse getCampaignBudgetOverridesWithHttpInfo(Long campaignId) throws ApiException { - okhttp3.Call localVarCall = getCampaignBudgetOverridesValidateBeforeCall(campaignId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV2ExternalAccountLineItemsByAccountIdWithHttpInfo(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Get current campaign budget overrides by given external campaign id. - * @param campaignId External campaign id. (required) + * Gets page of line item objects for the given account id + * @param accountId The given account id (required) + * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) + * @param limitToType The campaign types that you would like to limit your result set to (optional) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -4683,16 +3592,16 @@ public ApiResponse getCampaignBud 200 Success - */ - public okhttp3.Call getCampaignBudgetOverridesAsync(Long campaignId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdAsync(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getCampaignBudgetOverridesValidateBeforeCall(campaignId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getLineItemBudgetOverrides - * @param lineItemId The line item id to get budget overrides for. (required) + * Build call for getApiV2ExternalAuctionLineItemByLineItemId + * @param lineItemId The given line item id (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4700,9 +3609,10 @@ public okhttp3.Call getCampaignBudgetOverridesAsync(Long campaignId, final ApiCa +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call getLineItemBudgetOverridesCall(String lineItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4719,8 +3629,8 @@ public okhttp3.Call getLineItemBudgetOverridesCall(String lineItemId, final ApiC Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-01/retail-media/line-items/{lineItemId}/line-item-budget-overrides" - .replace("{" + "lineItemId" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2024-01/retail-media/auction-line-items/{line-item-id}" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4748,55 +3658,57 @@ public okhttp3.Call getLineItemBudgetOverridesCall(String lineItemId, final ApiC } @SuppressWarnings("rawtypes") - private okhttp3.Call getLineItemBudgetOverridesValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling getLineItemBudgetOverrides(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalAuctionLineItemByLineItemId(Async)"); } - return getLineItemBudgetOverridesCall(lineItemId, _callback); + return getApiV2ExternalAuctionLineItemByLineItemIdCall(lineItemId, _callback); } /** * - * Gets a collection of monthly and daily budget overrides for the provided line item. - * @param lineItemId The line item id to get budget overrides for. (required) - * @return ValueResourceOutcomeOfLineItemBudgetOverrides + * Gets the auction line item for the given line item id + * @param lineItemId The given line item id (required) + * @return AuctionLineItemResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ValueResourceOutcomeOfLineItemBudgetOverrides getLineItemBudgetOverrides(String lineItemId) throws ApiException { - ApiResponse localVarResp = getLineItemBudgetOverridesWithHttpInfo(lineItemId); + public AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(String lineItemId) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalAuctionLineItemByLineItemIdWithHttpInfo(lineItemId); return localVarResp.getData(); } /** * - * Gets a collection of monthly and daily budget overrides for the provided line item. - * @param lineItemId The line item id to get budget overrides for. (required) - * @return ApiResponse<ValueResourceOutcomeOfLineItemBudgetOverrides> + * Gets the auction line item for the given line item id + * @param lineItemId The given line item id (required) + * @return ApiResponse<AuctionLineItemResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse getLineItemBudgetOverridesWithHttpInfo(String lineItemId) throws ApiException { - okhttp3.Call localVarCall = getLineItemBudgetOverridesValidateBeforeCall(lineItemId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV2ExternalAuctionLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(lineItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Gets a collection of monthly and daily budget overrides for the provided line item. - * @param lineItemId The line item id to get budget overrides for. (required) + * Gets the auction line item for the given line item id + * @param lineItemId The given line item id (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -4804,20 +3716,22 @@ public ApiResponse getLineItemBud +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call getLineItemBudgetOverridesAsync(String lineItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getLineItemBudgetOverridesValidateBeforeCall(lineItemId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for patchApiV1ExternalAccountByAccountIdAndBalanceId - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param updateBalanceModelRequest (optional) + * Build call for getApiV2ExternalCampaignAuctionLineItemsByCampaignId + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4825,9 +3739,10 @@ public okhttp3.Call getLineItemBudgetOverridesAsync(String lineItemId, final Api +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4841,12 +3756,11 @@ public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(String basePath = null; } - Object localVarPostBody = updateBalanceModelRequest; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts/{account-id}/balances/{balanceId}" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2024-01/retail-media/campaigns/{campaign-id}/auction-line-items" + .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4854,6 +3768,18 @@ public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(String Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + final String[] localVarAccepts = { "application/json" }; @@ -4863,7 +3789,6 @@ public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(String } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -4871,70 +3796,70 @@ public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(String } String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); - } - - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + private okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling getApiV2ExternalCampaignAuctionLineItemsByCampaignId(Async)"); } - return patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, updateBalanceModelRequest, _callback); + return getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(campaignId, limitToId, pageIndex, pageSize, _callback); } /** * - * Modify a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param updateBalanceModelRequest (optional) - * @return BalanceResponse + * Gets page of auction line item objects for the given campaign id + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return AuctionLineItemPagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { - ApiResponse localVarResp = patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, updateBalanceModelRequest); + public AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(campaignId, limitToId, pageIndex, pageSize); return localVarResp.getData(); } /** * - * Modify a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param updateBalanceModelRequest (optional) - * @return ApiResponse<BalanceResponse> + * Gets page of auction line item objects for the given campaign id + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return ApiResponse<AuctionLineItemPagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { - okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Modify a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param updateBalanceModelRequest (optional) + * Gets page of auction line item objects for the given campaign id + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -4942,19 +3867,19 @@ public ApiResponse patchApiV1ExternalAccountByAccountIdAndBalan +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdAsync(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) + * Build call for getApiV2ExternalLineItemByLineItemId + * @param lineItemId The given line item id (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4962,10 +3887,9 @@ public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4979,10 +3903,10 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendB basePath = null; } - Object localVarPostBody = keywordTarget202110Request; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-01/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append" + String localVarPath = "/2024-01/retail-media/line-items/{line-item-id}" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -5000,7 +3924,6 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendB } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -5008,64 +3931,59 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendB } String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalLineItemByLineItemId(Async)"); } - return postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdCall(lineItemId, keywordTarget202110Request, _callback); + return getApiV2ExternalLineItemByLineItemIdCall(lineItemId, _callback); } /** * - * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @return KeywordTarget202110Response + * Gets the line item for the given line item id + * @param lineItemId The given line item id (required) + * @return CommonLineItemResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdWithHttpInfo(lineItemId, keywordTarget202110Request); + public CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(String lineItemId) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalLineItemByLineItemIdWithHttpInfo(lineItemId); return localVarResp.getData(); } /** * - * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @return ApiResponse<KeywordTarget202110Response> + * Gets the line item for the given line item id + * @param lineItemId The given line item id (required) + * @return ApiResponse<CommonLineItemResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdWithHttpInfo(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV2ExternalLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) + * Gets the line item for the given line item id + * @param lineItemId The given line item id (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5073,20 +3991,18 @@ public ApiResponse postApi202110ExternalAuctionLine -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdAsync(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) + * Build call for getCampaignBudgetOverrides + * @param campaignId External campaign id. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5094,10 +4010,9 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendB -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCampaignBudgetOverridesCall(Long campaignId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5111,11 +4026,11 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteB basePath = null; } - Object localVarPostBody = keywordTarget202110Request; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-01/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2024-01/retail-media/campaigns/{campaignId}/campaign-budget-overrides" + .replace("{" + "campaignId" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5132,7 +4047,6 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteB } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -5140,64 +4054,59 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteB } String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId(Async)"); + private okhttp3.Call getCampaignBudgetOverridesValidateBeforeCall(Long campaignId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling getCampaignBudgetOverrides(Async)"); } - return postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdCall(lineItemId, keywordTarget202110Request, _callback); + return getCampaignBudgetOverridesCall(campaignId, _callback); } /** * - * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @return KeywordTarget202110Response + * Get current campaign budget overrides by given external campaign id. + * @param campaignId External campaign id. (required) + * @return ValueResourceOutcomeOfCampaignBudgetOverrides * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdWithHttpInfo(lineItemId, keywordTarget202110Request); + public ValueResourceOutcomeOfCampaignBudgetOverrides getCampaignBudgetOverrides(Long campaignId) throws ApiException { + ApiResponse localVarResp = getCampaignBudgetOverridesWithHttpInfo(campaignId); return localVarResp.getData(); } /** * - * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @return ApiResponse<KeywordTarget202110Response> + * Get current campaign budget overrides by given external campaign id. + * @param campaignId External campaign id. (required) + * @return ApiResponse<ValueResourceOutcomeOfCampaignBudgetOverrides> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdWithHttpInfo(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getCampaignBudgetOverridesWithHttpInfo(Long campaignId) throws ApiException { + okhttp3.Call localVarCall = getCampaignBudgetOverridesValidateBeforeCall(campaignId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) + * Get current campaign budget overrides by given external campaign id. + * @param campaignId External campaign id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5205,20 +4114,18 @@ public ApiResponse postApi202110ExternalAuctionLine -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdAsync(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCampaignBudgetOverridesAsync(Long campaignId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getCampaignBudgetOverridesValidateBeforeCall(campaignId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalBalanceCampaignsAppendByBalanceId - * @param balanceId The balance to add campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * Build call for getLineItemBudgetOverrides + * @param lineItemId The line item id to get budget overrides for. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5228,7 +4135,7 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteB 200 Success - */ - public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLineItemBudgetOverridesCall(String lineItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5242,11 +4149,11 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(S basePath = null; } - Object localVarPostBody = balanceCampaign202110ListRequest; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-01/retail-media/balances/{balance-id}/campaigns/append" - .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2024-01/retail-media/line-items/{lineItemId}/line-item-budget-overrides" + .replace("{" + "lineItemId" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5263,7 +4170,6 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(S } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -5271,26 +4177,25 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(S } String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling postApi202110ExternalBalanceCampaignsAppendByBalanceId(Async)"); + private okhttp3.Call getLineItemBudgetOverridesValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling getLineItemBudgetOverrides(Async)"); } - return postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(balanceId, balanceCampaign202110ListRequest, _callback); + return getLineItemBudgetOverridesCall(lineItemId, _callback); } /** * - * appends one or more campaigns to the specified balance - * @param balanceId The balance to add campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) - * @return BalanceCampaign202110PagedListResponse + * Gets a collection of monthly and daily budget overrides for the provided line item. + * @param lineItemId The line item id to get budget overrides for. (required) + * @return ValueResourceOutcomeOfLineItemBudgetOverrides * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5298,17 +4203,16 @@ private okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdValid
200 Success -
*/ - public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampaignsAppendByBalanceId(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalBalanceCampaignsAppendByBalanceIdWithHttpInfo(balanceId, balanceCampaign202110ListRequest); + public ValueResourceOutcomeOfLineItemBudgetOverrides getLineItemBudgetOverrides(String lineItemId) throws ApiException { + ApiResponse localVarResp = getLineItemBudgetOverridesWithHttpInfo(lineItemId); return localVarResp.getData(); } /** * - * appends one or more campaigns to the specified balance - * @param balanceId The balance to add campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) - * @return ApiResponse<BalanceCampaign202110PagedListResponse> + * Gets a collection of monthly and daily budget overrides for the provided line item. + * @param lineItemId The line item id to get budget overrides for. (required) + * @return ApiResponse<ValueResourceOutcomeOfLineItemBudgetOverrides> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5316,17 +4220,16 @@ public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampai
200 Success -
*/ - public ApiResponse postApi202110ExternalBalanceCampaignsAppendByBalanceIdWithHttpInfo(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getLineItemBudgetOverridesWithHttpInfo(String lineItemId) throws ApiException { + okhttp3.Call localVarCall = getLineItemBudgetOverridesValidateBeforeCall(lineItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * appends one or more campaigns to the specified balance - * @param balanceId The balance to add campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * Gets a collection of monthly and daily budget overrides for the provided line item. + * @param lineItemId The line item id to get budget overrides for. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5336,17 +4239,17 @@ public ApiResponse postApi202110External 200 Success - */ - public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdAsync(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLineItemBudgetOverridesAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getLineItemBudgetOverridesValidateBeforeCall(lineItemId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalBalanceCampaignsDeleteByBalanceId - * @param balanceId The balance to remove campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * Build call for postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5354,9 +4257,10 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdAsync( +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5370,11 +4274,11 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(S basePath = null; } - Object localVarPostBody = balanceCampaign202110ListRequest; + Object localVarPostBody = keywordTarget202110Request; // create path and map variables - String localVarPath = "/2024-01/retail-media/balances/{balance-id}/campaigns/delete" - .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2024-01/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5403,58 +4307,60 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(S } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling postApi202110ExternalBalanceCampaignsDeleteByBalanceId(Async)"); + private okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(Async)"); } - return postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(balanceId, balanceCampaign202110ListRequest, _callback); + return postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdCall(lineItemId, keywordTarget202110Request, _callback); } /** * - * Removes one or more campaigns on the specified balance - * @param balanceId The balance to remove campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) - * @return BalanceCampaign202110PagedListResponse + * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) + * @return KeywordTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampaignsDeleteByBalanceId(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdWithHttpInfo(balanceId, balanceCampaign202110ListRequest); + public KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdWithHttpInfo(lineItemId, keywordTarget202110Request); return localVarResp.getData(); } /** * - * Removes one or more campaigns on the specified balance - * @param balanceId The balance to remove campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) - * @return ApiResponse<BalanceCampaign202110PagedListResponse> + * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) + * @return ApiResponse<KeywordTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalBalanceCampaignsDeleteByBalanceIdWithHttpInfo(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdWithHttpInfo(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Removes one or more campaigns on the specified balance - * @param balanceId The balance to remove campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5462,30 +4368,31 @@ public ApiResponse postApi202110External +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdAsync(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdAsync(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalCampaignPreferredLineItemsByCampaignId - * @param campaignId The given campaign id (required) - * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) + * Build call for postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdCall(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5499,11 +4406,11 @@ public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdC basePath = null; } - Object localVarPostBody = preferredLineItemCreateModel202110Request; + Object localVarPostBody = keywordTarget202110Request; // create path and map variables - String localVarPath = "/2024-01/retail-media/campaigns/{campaign-id}/preferred-line-items" - .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); + String localVarPath = "/2024-01/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5532,81 +4439,81 @@ public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdC } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'campaignId' is set - if (campaignId == null) { - throw new ApiException("Missing the required parameter 'campaignId' when calling postApi202110ExternalCampaignPreferredLineItemsByCampaignId(Async)"); + private okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId(Async)"); } - return postApi202110ExternalCampaignPreferredLineItemsByCampaignIdCall(campaignId, preferredLineItemCreateModel202110Request, _callback); + return postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdCall(lineItemId, keywordTarget202110Request, _callback); } /** * - * Creates a new preferred line item with the specified settings - * @param campaignId The given campaign id (required) - * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) - * @return PreferredLineItem202110Response + * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) + * @return KeywordTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public PreferredLineItem202110Response postApi202110ExternalCampaignPreferredLineItemsByCampaignId(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdWithHttpInfo(campaignId, preferredLineItemCreateModel202110Request); + public KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdWithHttpInfo(lineItemId, keywordTarget202110Request); return localVarResp.getData(); } /** * - * Creates a new preferred line item with the specified settings - * @param campaignId The given campaign id (required) - * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) - * @return ApiResponse<PreferredLineItem202110Response> + * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) + * @return ApiResponse<KeywordTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalCampaignPreferredLineItemsByCampaignIdWithHttpInfo(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(campaignId, preferredLineItemCreateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdWithHttpInfo(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Creates a new preferred line item with the specified settings - * @param campaignId The given campaign id (required) - * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) + * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdAsync(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdAsync(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(campaignId, preferredLineItemCreateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalLineItemProductsAppendByLineItemId - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest the products to append to this line item (optional) + * Build call for postApi202110ExternalBalanceCampaignsAppendByBalanceId + * @param balanceId The balance to add campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5616,7 +4523,7 @@ public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdA 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5630,11 +4537,11 @@ public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdCall( basePath = null; } - Object localVarPostBody = promotedProduct202110ListRequest; + Object localVarPostBody = balanceCampaign202110ListRequest; // create path and map variables - String localVarPath = "/2024-01/retail-media/line-items/{line-item-id}/products/append" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2024-01/retail-media/balances/{balance-id}/campaigns/append" + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5663,22 +4570,22 @@ public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsAppendByLineItemId(Async)"); + private okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApi202110ExternalBalanceCampaignsAppendByBalanceId(Async)"); } - return postApi202110ExternalLineItemProductsAppendByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); + return postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(balanceId, balanceCampaign202110ListRequest, _callback); } /** * - * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest the products to append to this line item (optional) - * @return PromotedProduct202110PagedListResponse + * appends one or more campaigns to the specified balance + * @param balanceId The balance to add campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * @return BalanceCampaign202110PagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5686,17 +4593,17 @@ private okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdVali
200 Success -
*/ - public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProductsAppendByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalLineItemProductsAppendByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampaignsAppendByBalanceId(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalBalanceCampaignsAppendByBalanceIdWithHttpInfo(balanceId, balanceCampaign202110ListRequest); return localVarResp.getData(); } /** * - * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest the products to append to this line item (optional) - * @return ApiResponse<PromotedProduct202110PagedListResponse> + * appends one or more campaigns to the specified balance + * @param balanceId The balance to add campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * @return ApiResponse<BalanceCampaign202110PagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5704,17 +4611,17 @@ public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProdu
200 Success -
*/ - public ApiResponse postApi202110ExternalLineItemProductsAppendByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalBalanceCampaignsAppendByBalanceIdWithHttpInfo(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest the products to append to this line item (optional) + * appends one or more campaigns to the specified balance + * @param balanceId The balance to add campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5724,17 +4631,17 @@ public ApiResponse postApi202110External 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdAsync(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalLineItemProductsDeleteByLineItemId - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest (optional) + * Build call for postApi202110ExternalBalanceCampaignsDeleteByBalanceId + * @param balanceId The balance to remove campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5744,7 +4651,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdAsync 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5758,11 +4665,11 @@ public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdCall( basePath = null; } - Object localVarPostBody = promotedProduct202110ListRequest; + Object localVarPostBody = balanceCampaign202110ListRequest; // create path and map variables - String localVarPath = "/2024-01/retail-media/line-items/{line-item-id}/products/delete" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2024-01/retail-media/balances/{balance-id}/campaigns/delete" + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5791,22 +4698,22 @@ public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsDeleteByLineItemId(Async)"); + private okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApi202110ExternalBalanceCampaignsDeleteByBalanceId(Async)"); } - return postApi202110ExternalLineItemProductsDeleteByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); + return postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(balanceId, balanceCampaign202110ListRequest, _callback); } /** * - * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest (optional) - * @return PromotedProduct202110PagedListResponse + * Removes one or more campaigns on the specified balance + * @param balanceId The balance to remove campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * @return BalanceCampaign202110PagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5814,17 +4721,17 @@ private okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdVali
200 Success -
*/ - public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProductsDeleteByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalLineItemProductsDeleteByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampaignsDeleteByBalanceId(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdWithHttpInfo(balanceId, balanceCampaign202110ListRequest); return localVarResp.getData(); } /** * - * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest (optional) - * @return ApiResponse<PromotedProduct202110PagedListResponse> + * Removes one or more campaigns on the specified balance + * @param balanceId The balance to remove campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * @return ApiResponse<BalanceCampaign202110PagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5832,17 +4739,17 @@ public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProdu
200 Success -
*/ - public ApiResponse postApi202110ExternalLineItemProductsDeleteByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalBalanceCampaignsDeleteByBalanceIdWithHttpInfo(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest (optional) + * Removes one or more campaigns on the specified balance + * @param balanceId The balance to remove campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5852,27 +4759,28 @@ public ApiResponse postApi202110External 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdAsync(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalLineItemProductsPauseByLineItemId - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) + * Build call for postApi202110ExternalCampaignPreferredLineItemsByCampaignId + * @param campaignId The given campaign id (required) + * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Success -
201 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdCall(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5886,11 +4794,11 @@ public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(S basePath = null; } - Object localVarPostBody = promotedProduct202110ListRequest; + Object localVarPostBody = preferredLineItemCreateModel202110Request; // create path and map variables - String localVarPath = "/2024-01/retail-media/line-items/{line-item-id}/products/pause" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2024-01/retail-media/campaigns/{campaign-id}/preferred-line-items" + .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5899,6 +4807,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(S Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -5918,74 +4827,81 @@ public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(S } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsPauseByLineItemId(Async)"); + private okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling postApi202110ExternalCampaignPreferredLineItemsByCampaignId(Async)"); } - return postApi202110ExternalLineItemProductsPauseByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); + return postApi202110ExternalCampaignPreferredLineItemsByCampaignIdCall(campaignId, preferredLineItemCreateModel202110Request, _callback); } /** * - * This endpoint pauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) + * Creates a new preferred line item with the specified settings + * @param campaignId The given campaign id (required) + * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) + * @return PreferredLineItem202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Success -
201 Success -
400 Bad Request -
*/ - public void postApi202110ExternalLineItemProductsPauseByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - postApi202110ExternalLineItemProductsPauseByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + public PreferredLineItem202110Response postApi202110ExternalCampaignPreferredLineItemsByCampaignId(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdWithHttpInfo(campaignId, preferredLineItemCreateModel202110Request); + return localVarResp.getData(); } /** * - * This endpoint pauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) - * @return ApiResponse<Void> + * Creates a new preferred line item with the specified settings + * @param campaignId The given campaign id (required) + * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) + * @return ApiResponse<PreferredLineItem202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Success -
201 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalLineItemProductsPauseByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); - return localVarApiClient.execute(localVarCall); + public ApiResponse postApi202110ExternalCampaignPreferredLineItemsByCampaignIdWithHttpInfo(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(campaignId, preferredLineItemCreateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint pauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) + * Creates a new preferred line item with the specified settings + * @param campaignId The given campaign id (required) + * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Success -
201 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdAsync(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(campaignId, preferredLineItemCreateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalLineItemProductsUnpauseByLineItemId - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) + * Build call for postApi202110ExternalLineItemProductsAppendByLineItemId + * @param lineItemId The line item to interact with (required) + * @param promotedProduct202110ListRequest the products to append to this line item (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5995,7 +4911,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdAsync( 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6012,7 +4928,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2024-01/retail-media/line-items/{line-item-id}/products/unpause" + String localVarPath = "/2024-01/retail-media/line-items/{line-item-id}/products/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6022,6 +4938,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -6041,21 +4958,22 @@ public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsUnpauseByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsAppendByLineItemId(Async)"); } - return postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); + return postApi202110ExternalLineItemProductsAppendByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); } /** * - * This endpoint unpauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) + * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. + * @param lineItemId The line item to interact with (required) + * @param promotedProduct202110ListRequest the products to append to this line item (optional) + * @return PromotedProduct202110PagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6063,16 +4981,17 @@ private okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdVal
200 Success -
*/ - public void postApi202110ExternalLineItemProductsUnpauseByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - postApi202110ExternalLineItemProductsUnpauseByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProductsAppendByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalLineItemProductsAppendByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + return localVarResp.getData(); } /** * - * This endpoint unpauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) - * @return ApiResponse<Void> + * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. + * @param lineItemId The line item to interact with (required) + * @param promotedProduct202110ListRequest the products to append to this line item (optional) + * @return ApiResponse<PromotedProduct202110PagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6080,16 +4999,17 @@ public void postApi202110ExternalLineItemProductsUnpauseByLineItemId(String line
200 Success -
*/ - public ApiResponse postApi202110ExternalLineItemProductsUnpauseByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); - return localVarApiClient.execute(localVarCall); + public ApiResponse postApi202110ExternalLineItemProductsAppendByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint unpauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) + * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. + * @param lineItemId The line item to interact with (required) + * @param promotedProduct202110ListRequest the products to append to this line item (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6099,16 +5019,17 @@ public ApiResponse postApi202110ExternalLineItemProductsUnpauseByLineItemI 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId + * Build call for postApi202110ExternalLineItemProductsDeleteByLineItemId * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) + * @param promotedProduct202110ListRequest (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6116,10 +5037,9 @@ public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdAsyn -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6133,10 +5053,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAp basePath = null; } - Object localVarPostBody = addToBasketIdsUpdateModel202110Request; + Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append" + String localVarPath = "/2024-01/retail-media/line-items/{line-item-id}/products/delete" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6166,60 +5086,58 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAp } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsDeleteByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); + return postApi202110ExternalLineItemProductsDeleteByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); } /** * - * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. + * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) - * @return AddToBasketTarget202110Response + * @param promotedProduct202110ListRequest (optional) + * @return PromotedProduct202110PagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public AddToBasketTarget202110Response postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdWithHttpInfo(lineItemId, addToBasketIdsUpdateModel202110Request); + public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProductsDeleteByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalLineItemProductsDeleteByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); return localVarResp.getData(); } /** * - * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. + * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) - * @return ApiResponse<AddToBasketTarget202110Response> + * @param promotedProduct202110ListRequest (optional) + * @return ApiResponse<PromotedProduct202110PagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdWithHttpInfo(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalLineItemProductsDeleteByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. + * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) + * @param promotedProduct202110ListRequest (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6227,20 +5145,19 @@ public ApiResponse postApi202110ExternalPreferr -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdAsync(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId - * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) + * Build call for postApi202110ExternalLineItemProductsPauseByLineItemId + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6248,10 +5165,9 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAp -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6265,10 +5181,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDe basePath = null; } - Object localVarPostBody = addToBasketIdsUpdateModel202110Request; + Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete" + String localVarPath = "/2024-01/retail-media/line-items/{line-item-id}/products/pause" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6278,7 +5194,6 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDe Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -6298,60 +5213,55 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDe } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsPauseByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); + return postApi202110ExternalLineItemProductsPauseByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); } /** * - * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. - * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) - * @return AddToBasketTarget202110Response + * This endpoint pauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public AddToBasketTarget202110Response postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdWithHttpInfo(lineItemId, addToBasketIdsUpdateModel202110Request); - return localVarResp.getData(); + public void postApi202110ExternalLineItemProductsPauseByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + postApi202110ExternalLineItemProductsPauseByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); } /** * - * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. - * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) - * @return ApiResponse<AddToBasketTarget202110Response> + * This endpoint pauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdWithHttpInfo(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse postApi202110ExternalLineItemProductsPauseByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); + return localVarApiClient.execute(localVarCall); } /** * (asynchronously) - * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. - * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) + * This endpoint pauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6359,20 +5269,18 @@ public ApiResponse postApi202110ExternalPreferr -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdAsync(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId - * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) + * Build call for postApi202110ExternalLineItemProductsUnpauseByLineItemId + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6380,10 +5288,9 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDe -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6397,10 +5304,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppe basePath = null; } - Object localVarPostBody = audienceIdsUpdateModel202110Request; + Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append" + String localVarPath = "/2024-01/retail-media/line-items/{line-item-id}/products/unpause" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6410,7 +5317,6 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppe Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -6430,60 +5336,55 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppe } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsUnpauseByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); + return postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); } /** * - * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. - * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) - * @return AudienceTarget202110Response + * This endpoint unpauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdWithHttpInfo(lineItemId, audienceIdsUpdateModel202110Request); - return localVarResp.getData(); + public void postApi202110ExternalLineItemProductsUnpauseByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + postApi202110ExternalLineItemProductsUnpauseByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); } /** * - * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. - * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) - * @return ApiResponse<AudienceTarget202110Response> + * This endpoint unpauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdWithHttpInfo(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse postApi202110ExternalLineItemProductsUnpauseByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); + return localVarApiClient.execute(localVarCall); } /** * (asynchronously) - * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. - * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) + * This endpoint unpauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6491,20 +5392,18 @@ public ApiResponse postApi202110ExternalPreferredL -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdAsync(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId + * Build call for postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) + * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6515,7 +5414,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppe 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6529,10 +5428,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDele basePath = null; } - Object localVarPostBody = audienceIdsUpdateModel202110Request; + Object localVarPostBody = addToBasketIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete" + String localVarPath = "/2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6562,22 +5461,22 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDele } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); + return postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); } /** * - * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) - * @return AudienceTarget202110Response + * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) + * @return AddToBasketTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6586,17 +5485,17 @@ private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDel
400 Bad Request -
*/ - public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdWithHttpInfo(lineItemId, audienceIdsUpdateModel202110Request); + public AddToBasketTarget202110Response postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdWithHttpInfo(lineItemId, addToBasketIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) - * @return ApiResponse<AudienceTarget202110Response> + * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) + * @return ApiResponse<AddToBasketTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6605,17 +5504,17 @@ public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTarget
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdWithHttpInfo(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdWithHttpInfo(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) + * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6626,17 +5525,17 @@ public ApiResponse postApi202110ExternalPreferredL 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdAsync(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdAsync(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId + * Build call for postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) + * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6647,7 +5546,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDele 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6661,10 +5560,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendB basePath = null; } - Object localVarPostBody = storeIdsUpdateModel202110Request; + Object localVarPostBody = addToBasketIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append" + String localVarPath = "/2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6694,22 +5593,22 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendB } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdCall(lineItemId, storeIdsUpdateModel202110Request, _callback); + return postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); } /** * - * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) - * @return StoreTarget202110Response + * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) + * @return AddToBasketTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6718,17 +5617,17 @@ private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppend
400 Bad Request -
*/ - public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdWithHttpInfo(lineItemId, storeIdsUpdateModel202110Request); + public AddToBasketTarget202110Response postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdWithHttpInfo(lineItemId, addToBasketIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) - * @return ApiResponse<StoreTarget202110Response> + * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) + * @return ApiResponse<AddToBasketTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6737,17 +5636,17 @@ public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargeting
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdWithHttpInfo(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdWithHttpInfo(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) + * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6758,17 +5657,17 @@ public ApiResponse postApi202110ExternalPreferredLine 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdAsync(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdAsync(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId + * Build call for postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) + * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6779,7 +5678,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendB 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6793,10 +5692,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteB basePath = null; } - Object localVarPostBody = storeIdsUpdateModel202110Request; + Object localVarPostBody = audienceIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete" + String localVarPath = "/2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6826,22 +5725,22 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteB } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdCall(lineItemId, storeIdsUpdateModel202110Request, _callback); + return postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); } /** * - * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) - * @return StoreTarget202110Response + * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) + * @return AudienceTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6850,17 +5749,17 @@ private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDelete
400 Bad Request -
*/ - public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdWithHttpInfo(lineItemId, storeIdsUpdateModel202110Request); + public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdWithHttpInfo(lineItemId, audienceIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) - * @return ApiResponse<StoreTarget202110Response> + * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) + * @return ApiResponse<AudienceTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6869,17 +5768,17 @@ public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargeting
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdWithHttpInfo(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdWithHttpInfo(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) + * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6890,27 +5789,28 @@ public ApiResponse postApi202110ExternalPreferredLine 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdAsync(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdAsync(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202210ExternalAccountCreativesByAccountId - * @param accountId External account id to create a creative for (required) - * @param creativeCreateModel202207 The creative to create (optional) + * Build call for postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId + * @param lineItemId The line item to interact with (required) + * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
201 Creatives created -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdCall(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6924,11 +5824,11 @@ public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdCall(String basePath = null; } - Object localVarPostBody = creativeCreateModel202207; + Object localVarPostBody = audienceIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts/{account-id}/creatives" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -6957,88 +5857,92 @@ public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdCall(String } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApi202210ExternalAccountCreativesByAccountId(Async)"); + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId(Async)"); } - return postApi202210ExternalAccountCreativesByAccountIdCall(accountId, creativeCreateModel202207, _callback); + return postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); } /** * - * Create a creative for an account - * @param accountId External account id to create a creative for (required) - * @param creativeCreateModel202207 The creative to create (optional) - * @return Creative202210Response + * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * @param lineItemId The line item to interact with (required) + * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) + * @return AudienceTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
201 Creatives created -
200 Success -
400 Bad Request -
*/ - public Creative202210Response postApi202210ExternalAccountCreativesByAccountId(String accountId, CreativeCreateModel202207 creativeCreateModel202207) throws ApiException { - ApiResponse localVarResp = postApi202210ExternalAccountCreativesByAccountIdWithHttpInfo(accountId, creativeCreateModel202207); + public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdWithHttpInfo(lineItemId, audienceIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * Create a creative for an account - * @param accountId External account id to create a creative for (required) - * @param creativeCreateModel202207 The creative to create (optional) - * @return ApiResponse<Creative202210Response> + * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * @param lineItemId The line item to interact with (required) + * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) + * @return ApiResponse<AudienceTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
201 Creatives created -
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202210ExternalAccountCreativesByAccountIdWithHttpInfo(String accountId, CreativeCreateModel202207 creativeCreateModel202207) throws ApiException { - okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(accountId, creativeCreateModel202207, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdWithHttpInfo(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Create a creative for an account - * @param accountId External account id to create a creative for (required) - * @param creativeCreateModel202207 The creative to create (optional) + * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * @param lineItemId The line item to interact with (required) + * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
201 Creatives created -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdAsync(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdAsync(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(accountId, creativeCreateModel202207, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202210ExternalAccountCreativesSearchByAccountId - * @param accountId External account id to retrieve creatives for (required) - * @param creativeIds Creatives to filter by (optional) + * Build call for postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Creatives found -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7052,11 +5956,11 @@ public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(S basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = storeIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts/{account-id}/creatives/search" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7064,10 +5968,6 @@ public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(S Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (creativeIds != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "creative-ids", creativeIds)); - } - final String[] localVarAccepts = { "application/json" }; @@ -7077,6 +5977,7 @@ public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(S } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -7088,88 +5989,92 @@ public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(S } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApi202210ExternalAccountCreativesSearchByAccountId(Async)"); + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId(Async)"); } - return postApi202210ExternalAccountCreativesSearchByAccountIdCall(accountId, creativeIds, _callback); + return postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdCall(lineItemId, storeIdsUpdateModel202110Request, _callback); } /** * - * Get account creatives - * @param accountId External account id to retrieve creatives for (required) - * @param creativeIds Creatives to filter by (optional) - * @return Creative202210ListResponse + * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) + * @return StoreTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Creatives found -
200 Success -
400 Bad Request -
*/ - public Creative202210ListResponse postApi202210ExternalAccountCreativesSearchByAccountId(String accountId, List creativeIds) throws ApiException { - ApiResponse localVarResp = postApi202210ExternalAccountCreativesSearchByAccountIdWithHttpInfo(accountId, creativeIds); + public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdWithHttpInfo(lineItemId, storeIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * Get account creatives - * @param accountId External account id to retrieve creatives for (required) - * @param creativeIds Creatives to filter by (optional) - * @return ApiResponse<Creative202210ListResponse> + * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) + * @return ApiResponse<StoreTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Creatives found -
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202210ExternalAccountCreativesSearchByAccountIdWithHttpInfo(String accountId, List creativeIds) throws ApiException { - okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(accountId, creativeIds, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdWithHttpInfo(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Get account creatives - * @param accountId External account id to retrieve creatives for (required) - * @param creativeIds Creatives to filter by (optional) + * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Creatives found -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdAsync(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdAsync(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(accountId, creativeIds, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202301ExternalAccountCampaignsByAccountId - * @param accountId The account to request the campaign for. (required) - * @param postCampaignV202301 Creatable campaign attributes (optional) + * Build call for postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdCall(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7183,11 +6088,11 @@ public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdCall(String basePath = null; } - Object localVarPostBody = postCampaignV202301; + Object localVarPostBody = storeIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts/{account-id}/campaigns" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2024-01/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7216,89 +6121,91 @@ public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdCall(String } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApi202301ExternalAccountCampaignsByAccountId(Async)"); + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId(Async)"); } - return postApi202301ExternalAccountCampaignsByAccountIdCall(accountId, postCampaignV202301, _callback); + return postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdCall(lineItemId, storeIdsUpdateModel202110Request, _callback); } /** * - * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. - * @param accountId The account to request the campaign for. (required) - * @param postCampaignV202301 Creatable campaign attributes (optional) - * @return JsonApiSingleResponseOfCampaignV202301 + * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) + * @return StoreTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public JsonApiSingleResponseOfCampaignV202301 postApi202301ExternalAccountCampaignsByAccountId(String accountId, PostCampaignV202301 postCampaignV202301) throws ApiException { - ApiResponse localVarResp = postApi202301ExternalAccountCampaignsByAccountIdWithHttpInfo(accountId, postCampaignV202301); + public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdWithHttpInfo(lineItemId, storeIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. - * @param accountId The account to request the campaign for. (required) - * @param postCampaignV202301 Creatable campaign attributes (optional) - * @return ApiResponse<JsonApiSingleResponseOfCampaignV202301> + * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) + * @return ApiResponse<StoreTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202301ExternalAccountCampaignsByAccountIdWithHttpInfo(String accountId, PostCampaignV202301 postCampaignV202301) throws ApiException { - okhttp3.Call localVarCall = postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(accountId, postCampaignV202301, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdWithHttpInfo(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. - * @param accountId The account to request the campaign for. (required) - * @param postCampaignV202301 Creatable campaign attributes (optional) + * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdAsync(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdAsync(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(accountId, postCampaignV202301, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId - * @param accountId The account of the balance (required) - * @param balanceId The balance to add funds to (required) - * @param addFundsToBalanceRequest (optional) + * Build call for postApi202210ExternalAccountCreativesByAccountId + * @param accountId External account id to create a creative for (required) + * @param creativeCreateModel202207 The creative to create (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
201 Creatives created -
*/ - public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdCall(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7312,12 +6219,11 @@ public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall( basePath = null; } - Object localVarPostBody = addFundsToBalanceRequest; + Object localVarPostBody = creativeCreateModel202207; // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2024-01/retail-media/accounts/{account-id}/creatives" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7346,96 +6252,88 @@ public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); - } - - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling postApi202210ExternalAccountCreativesByAccountId(Async)"); } - return postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(accountId, balanceId, addFundsToBalanceRequest, _callback); + return postApi202210ExternalAccountCreativesByAccountIdCall(accountId, creativeCreateModel202207, _callback); } /** * - * Add funds to a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to add funds to (required) - * @param addFundsToBalanceRequest (optional) - * @return BalanceResponse + * Create a creative for an account + * @param accountId External account id to create a creative for (required) + * @param creativeCreateModel202207 The creative to create (optional) + * @return Creative202210Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
201 Creatives created -
*/ - public BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { - ApiResponse localVarResp = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, addFundsToBalanceRequest); + public Creative202210Response postApi202210ExternalAccountCreativesByAccountId(String accountId, CreativeCreateModel202207 creativeCreateModel202207) throws ApiException { + ApiResponse localVarResp = postApi202210ExternalAccountCreativesByAccountIdWithHttpInfo(accountId, creativeCreateModel202207); return localVarResp.getData(); } /** * - * Add funds to a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to add funds to (required) - * @param addFundsToBalanceRequest (optional) - * @return ApiResponse<BalanceResponse> + * Create a creative for an account + * @param accountId External account id to create a creative for (required) + * @param creativeCreateModel202207 The creative to create (optional) + * @return ApiResponse<Creative202210Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
201 Creatives created -
*/ - public ApiResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202210ExternalAccountCreativesByAccountIdWithHttpInfo(String accountId, CreativeCreateModel202207 creativeCreateModel202207) throws ApiException { + okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(accountId, creativeCreateModel202207, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Add funds to a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to add funds to (required) - * @param addFundsToBalanceRequest (optional) + * Create a creative for an account + * @param accountId External account id to create a creative for (required) + * @param creativeCreateModel202207 The creative to create (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
201 Creatives created -
*/ - public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdAsync(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdAsync(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(accountId, creativeCreateModel202207, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApiV1ExternalAccountBalancesByAccountId - * @param accountId The account to create balances for (required) - * @param createBalanceRequest (optional) + * Build call for postApi202210ExternalAccountCreativesSearchByAccountId + * @param accountId External account id to retrieve creatives for (required) + * @param creativeIds Creatives to filter by (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Creatives found -
*/ - public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7449,10 +6347,10 @@ public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accou basePath = null; } - Object localVarPostBody = createBalanceRequest; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts/{account-id}/balances" + String localVarPath = "/2024-01/retail-media/accounts/{account-id}/creatives/search" .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -7461,6 +6359,10 @@ public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accou Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (creativeIds != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "creative-ids", creativeIds)); + } + final String[] localVarAccepts = { "application/json" }; @@ -7470,7 +6372,6 @@ public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accou } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -7482,88 +6383,88 @@ public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accou } @SuppressWarnings("rawtypes") - private okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountBalancesByAccountId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling postApi202210ExternalAccountCreativesSearchByAccountId(Async)"); } - return postApiV1ExternalAccountBalancesByAccountIdCall(accountId, createBalanceRequest, _callback); + return postApi202210ExternalAccountCreativesSearchByAccountIdCall(accountId, creativeIds, _callback); } /** * - * Create balance for the given account id - * @param accountId The account to create balances for (required) - * @param createBalanceRequest (optional) - * @return BalanceResponse + * Get account creatives + * @param accountId External account id to retrieve creatives for (required) + * @param creativeIds Creatives to filter by (optional) + * @return Creative202210ListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Creatives found -
*/ - public BalanceResponse postApiV1ExternalAccountBalancesByAccountId(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { - ApiResponse localVarResp = postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, createBalanceRequest); + public Creative202210ListResponse postApi202210ExternalAccountCreativesSearchByAccountId(String accountId, List creativeIds) throws ApiException { + ApiResponse localVarResp = postApi202210ExternalAccountCreativesSearchByAccountIdWithHttpInfo(accountId, creativeIds); return localVarResp.getData(); } /** * - * Create balance for the given account id - * @param accountId The account to create balances for (required) - * @param createBalanceRequest (optional) - * @return ApiResponse<BalanceResponse> + * Get account creatives + * @param accountId External account id to retrieve creatives for (required) + * @param creativeIds Creatives to filter by (optional) + * @return ApiResponse<Creative202210ListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Creatives found -
*/ - public ApiResponse postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202210ExternalAccountCreativesSearchByAccountIdWithHttpInfo(String accountId, List creativeIds) throws ApiException { + okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(accountId, creativeIds, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Create balance for the given account id - * @param accountId The account to create balances for (required) - * @param createBalanceRequest (optional) + * Get account creatives + * @param accountId External account id to retrieve creatives for (required) + * @param creativeIds Creatives to filter by (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Creatives found -
*/ - public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdAsync(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(accountId, creativeIds, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApiV1ExternalAccountCatalogsByAccountId - * @param accountId The account to request the catalog for. (required) - * @param jsonApiRequestOfCatalogRequest (optional) + * Build call for postApi202301ExternalAccountCampaignsByAccountId + * @param accountId The account to request the campaign for. (required) + * @param postCampaignV202301 Creatable campaign attributes (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 Catalog request successfully created -
201 Success -
*/ - public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdCall(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdCall(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7577,11 +6478,11 @@ public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdCall(String accou basePath = null; } - Object localVarPostBody = jsonApiRequestOfCatalogRequest; + Object localVarPostBody = postCampaignV202301; // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts/{accountId}/catalogs" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2024-01/retail-media/accounts/{account-id}/campaigns" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7610,89 +6511,88 @@ public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdCall(String accou } @SuppressWarnings("rawtypes") - private okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountCatalogsByAccountId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling postApi202301ExternalAccountCampaignsByAccountId(Async)"); } - return postApiV1ExternalAccountCatalogsByAccountIdCall(accountId, jsonApiRequestOfCatalogRequest, _callback); + return postApi202301ExternalAccountCampaignsByAccountIdCall(accountId, postCampaignV202301, _callback); } /** * - * Create a request for a Catalog available to the indicated account. - * @param accountId The account to request the catalog for. (required) - * @param jsonApiRequestOfCatalogRequest (optional) - * @return JsonApiSingleResponseOfCatalogStatus + * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. + * @param accountId The account to request the campaign for. (required) + * @param postCampaignV202301 Creatable campaign attributes (optional) + * @return JsonApiSingleResponseOfCampaignV202301 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Catalog request successfully created -
201 Success -
*/ - public JsonApiSingleResponseOfCatalogStatus postApiV1ExternalAccountCatalogsByAccountId(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest) throws ApiException { - ApiResponse localVarResp = postApiV1ExternalAccountCatalogsByAccountIdWithHttpInfo(accountId, jsonApiRequestOfCatalogRequest); + public JsonApiSingleResponseOfCampaignV202301 postApi202301ExternalAccountCampaignsByAccountId(String accountId, PostCampaignV202301 postCampaignV202301) throws ApiException { + ApiResponse localVarResp = postApi202301ExternalAccountCampaignsByAccountIdWithHttpInfo(accountId, postCampaignV202301); return localVarResp.getData(); } /** * - * Create a request for a Catalog available to the indicated account. - * @param accountId The account to request the catalog for. (required) - * @param jsonApiRequestOfCatalogRequest (optional) - * @return ApiResponse<JsonApiSingleResponseOfCatalogStatus> + * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. + * @param accountId The account to request the campaign for. (required) + * @param postCampaignV202301 Creatable campaign attributes (optional) + * @return ApiResponse<JsonApiSingleResponseOfCampaignV202301> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Catalog request successfully created -
201 Success -
*/ - public ApiResponse postApiV1ExternalAccountCatalogsByAccountIdWithHttpInfo(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfCatalogRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202301ExternalAccountCampaignsByAccountIdWithHttpInfo(String accountId, PostCampaignV202301 postCampaignV202301) throws ApiException { + okhttp3.Call localVarCall = postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(accountId, postCampaignV202301, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Create a request for a Catalog available to the indicated account. - * @param accountId The account to request the catalog for. (required) - * @param jsonApiRequestOfCatalogRequest (optional) + * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. + * @param accountId The account to request the campaign for. (required) + * @param postCampaignV202301 Creatable campaign attributes (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 Catalog request successfully created -
201 Success -
*/ - public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdAsync(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdAsync(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfCatalogRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(accountId, postCampaignV202301, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param changeDatesOfBalanceRequest (optional) + * Build call for postApiV1ExternalAccountCatalogsByAccountId + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfCatalogRequest (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request successfully created -
*/ - public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdCall(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7706,12 +6606,11 @@ public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCa basePath = null; } - Object localVarPostBody = changeDatesOfBalanceRequest; + Object localVarPostBody = jsonApiRequestOfCatalogRequest; // create path and map variables - String localVarPath = "/2024-01/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2024-01/retail-media/accounts/{accountId}/catalogs" + .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7740,79 +6639,71 @@ public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCa } @SuppressWarnings("rawtypes") - private okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); - } - - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountCatalogsByAccountId(Async)"); } - return postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); + return postApiV1ExternalAccountCatalogsByAccountIdCall(accountId, jsonApiRequestOfCatalogRequest, _callback); } /** * - * Change dates of a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param changeDatesOfBalanceRequest (optional) - * @return BalanceResponse + * Create a request for a Catalog available to the indicated account. + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfCatalogRequest (optional) + * @return JsonApiSingleResponseOfCatalogStatus * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request successfully created -
*/ - public BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { - ApiResponse localVarResp = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, changeDatesOfBalanceRequest); + public JsonApiSingleResponseOfCatalogStatus postApiV1ExternalAccountCatalogsByAccountId(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountCatalogsByAccountIdWithHttpInfo(accountId, jsonApiRequestOfCatalogRequest); return localVarResp.getData(); } /** * - * Change dates of a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param changeDatesOfBalanceRequest (optional) - * @return ApiResponse<BalanceResponse> + * Create a request for a Catalog available to the indicated account. + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfCatalogRequest (optional) + * @return ApiResponse<JsonApiSingleResponseOfCatalogStatus> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request successfully created -
*/ - public ApiResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApiV1ExternalAccountCatalogsByAccountIdWithHttpInfo(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfCatalogRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Change dates of a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param changeDatesOfBalanceRequest (optional) + * Create a request for a Catalog available to the indicated account. + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfCatalogRequest (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request successfully created -
*/ - public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdAsync(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdAsync(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfCatalogRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ApplicationSummaryModel.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ApplicationSummaryModel.java index 8c574019..156dca01 100644 --- a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ApplicationSummaryModel.java +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ApplicationSummaryModel.java @@ -45,7 +45,7 @@ import com.criteo.api.retailmedia.v2024_01.JSON; /** - * Model of ApplicationSummary + * Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModel { diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ApplicationSummaryModelResource.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ApplicationSummaryModelResource.java index 7639c43a..116c98af 100644 --- a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ApplicationSummaryModelResource.java +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ApplicationSummaryModelResource.java @@ -46,7 +46,7 @@ import com.criteo.api.retailmedia.v2024_01.JSON; /** - * A class that represents a ValueType in a guild compliant way + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResource { diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ApplicationSummaryModelResponse.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ApplicationSummaryModelResponse.java index 21ac5126..a8706899 100644 --- a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ApplicationSummaryModelResponse.java +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ApplicationSummaryModelResponse.java @@ -49,7 +49,7 @@ import com.criteo.api.retailmedia.v2024_01.JSON; /** - * Response of ApplicationSummaryModel + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResponse { diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/AsyncCampaignsReport.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/AsyncCampaignsReport.java index 21485b5d..19bae324 100644 --- a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/AsyncCampaignsReport.java +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/AsyncCampaignsReport.java @@ -439,6 +439,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/AsyncLineItemsReport.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/AsyncLineItemsReport.java index 7fb68053..20541460 100644 --- a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/AsyncLineItemsReport.java +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/AsyncLineItemsReport.java @@ -439,6 +439,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/AsyncRevenueReport.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/AsyncRevenueReport.java index a336bdf3..39fc2131 100644 --- a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/AsyncRevenueReport.java +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/AsyncRevenueReport.java @@ -274,6 +274,59 @@ public BuyTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_BUY_TYPE) private BuyTypeEnum buyType; + /** + * Gets or Sets advertiserTypes + */ + @JsonAdapter(AdvertiserTypesEnum.Adapter.class) + public enum AdvertiserTypesEnum { + RETAILER("retailer"), + + BRAND("brand"), + + SELLER("seller"); + + private String value; + + AdvertiserTypesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AdvertiserTypesEnum fromValue(String value) { + for (AdvertiserTypesEnum b : AdvertiserTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AdvertiserTypesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AdvertiserTypesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AdvertiserTypesEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_ADVERTISER_TYPES = "advertiserTypes"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_TYPES) + private List advertiserTypes = null; + /** * Gets or Sets skuRelations */ @@ -621,6 +674,8 @@ public enum DimensionsEnum { ACCOUNTTYPENAME("accountTypeName"), + ADVERTISERTYPE("advertiserType"), + CAMPAIGNID("campaignId"), CAMPAIGNNAME("campaignName"), @@ -667,6 +722,8 @@ public enum DimensionsEnum { ADVPRODUCTMPN("advProductMpn"), + BUYTYPE("buyType"), + SOLDBY("soldBy"), SALECHANNEL("saleChannel"), @@ -788,6 +845,8 @@ public enum MetricsEnum { ASSISTEDUNITS("assistedUnits"), + REVENUE("revenue"), + OPENAUCTIONREVENUE("openAuctionRevenue"), PREFERREDDEALSREVENUE("preferredDealsRevenue"), @@ -898,7 +957,7 @@ public AsyncRevenueReport addIdsItem(String idsItem) { } /** - * Campaign ids to report on + * Supply account ids to report on * @return ids **/ @javax.annotation.Nullable @@ -920,7 +979,7 @@ public AsyncRevenueReport id(String id) { } /** - * Campaign id to report on + * Supply account id to report on * @return id **/ @javax.annotation.Nullable @@ -1023,6 +1082,36 @@ public void setBuyType(BuyTypeEnum buyType) { } + public AsyncRevenueReport advertiserTypes(List advertiserTypes) { + + this.advertiserTypes = advertiserTypes; + return this; + } + + public AsyncRevenueReport addAdvertiserTypesItem(AdvertiserTypesEnum advertiserTypesItem) { + if (this.advertiserTypes == null) { + this.advertiserTypes = null; + } + this.advertiserTypes.add(advertiserTypesItem); + return this; + } + + /** + * Filter on the type of advertiser: retailer, brand, seller + * @return advertiserTypes + **/ + @javax.annotation.Nullable + + public List getAdvertiserTypes() { + return advertiserTypes; + } + + + public void setAdvertiserTypes(List advertiserTypes) { + this.advertiserTypes = advertiserTypes; + } + + public AsyncRevenueReport skuRelations(List skuRelations) { this.skuRelations = skuRelations; @@ -1349,6 +1438,7 @@ public boolean equals(Object o) { Objects.equals(this.revenueType, asyncRevenueReport.revenueType) && Objects.equals(this.soldBy, asyncRevenueReport.soldBy) && Objects.equals(this.buyType, asyncRevenueReport.buyType) && + Objects.equals(this.advertiserTypes, asyncRevenueReport.advertiserTypes) && Objects.equals(this.skuRelations, asyncRevenueReport.skuRelations) && Objects.equals(this.format, asyncRevenueReport.format) && Objects.equals(this.campaignType, asyncRevenueReport.campaignType) && @@ -1369,7 +1459,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ids, id, reportType, revenueType, soldBy, buyType, skuRelations, format, campaignType, salesChannel, clickAttributionWindow, viewAttributionWindow, dimensions, metrics, startDate, endDate, timezone, additionalProperties); + return Objects.hash(ids, id, reportType, revenueType, soldBy, buyType, advertiserTypes, skuRelations, format, campaignType, salesChannel, clickAttributionWindow, viewAttributionWindow, dimensions, metrics, startDate, endDate, timezone, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -1389,6 +1479,7 @@ public String toString() { sb.append(" revenueType: ").append(toIndentedString(revenueType)).append("\n"); sb.append(" soldBy: ").append(toIndentedString(soldBy)).append("\n"); sb.append(" buyType: ").append(toIndentedString(buyType)).append("\n"); + sb.append(" advertiserTypes: ").append(toIndentedString(advertiserTypes)).append("\n"); sb.append(" skuRelations: ").append(toIndentedString(skuRelations)).append("\n"); sb.append(" format: ").append(toIndentedString(format)).append("\n"); sb.append(" campaignType: ").append(toIndentedString(campaignType)).append("\n"); @@ -1429,6 +1520,7 @@ private String toIndentedString(Object o) { openapiFields.add("revenueType"); openapiFields.add("soldBy"); openapiFields.add("buyType"); + openapiFields.add("advertiserTypes"); openapiFields.add("skuRelations"); openapiFields.add("format"); openapiFields.add("campaignType"); @@ -1486,6 +1578,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `buyType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyType").toString())); } // ensure the optional json data is an array if present + if (jsonObj.get("advertiserTypes") != null && !jsonObj.get("advertiserTypes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserTypes` to be an array in the JSON string but got `%s`", jsonObj.get("advertiserTypes").toString())); + } + // ensure the optional json data is an array if present if (jsonObj.get("skuRelations") != null && !jsonObj.get("skuRelations").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `skuRelations` to be an array in the JSON string but got `%s`", jsonObj.get("skuRelations").toString())); } diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/CommonProblem.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/CommonProblem.java index cc670826..0ed7a8e7 100644 --- a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/CommonProblem.java +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/CommonProblem.java @@ -47,7 +47,7 @@ import com.criteo.api.retailmedia.v2024_01.JSON; /** - * Common problem object. Can be specialized as needed. + * Common problem object. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CommonProblem { @@ -222,7 +222,7 @@ public CommonProblem code(String code) { } /** - * A machine-readable error code, expressed as a string value. + * A machine-readable error code, expressed as a string value. * @return code **/ @javax.annotation.Nullable diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ExternalBalanceResponse.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ExternalBalanceResponse.java index dfde9557..5476f24b 100644 --- a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ExternalBalanceResponse.java +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/ExternalBalanceResponse.java @@ -256,6 +256,61 @@ public SpendTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_SPEND_TYPE) private SpendTypeEnum spendType; + /** + * Billing type for Private Market. + */ + @JsonAdapter(PrivateMarketBillingTypeEnum.Adapter.class) + public enum PrivateMarketBillingTypeEnum { + NOTAPPLICABLE("NotApplicable"), + + BILLBYRETAILER("BillByRetailer"), + + BILLBYCRITEO("BillByCriteo"), + + UNKNOWN("Unknown"); + + private String value; + + PrivateMarketBillingTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivateMarketBillingTypeEnum fromValue(String value) { + for (PrivateMarketBillingTypeEnum b : PrivateMarketBillingTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivateMarketBillingTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivateMarketBillingTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivateMarketBillingTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_PRIVATE_MARKET_BILLING_TYPE = "privateMarketBillingType"; + @SerializedName(SERIALIZED_NAME_PRIVATE_MARKET_BILLING_TYPE) + private PrivateMarketBillingTypeEnum privateMarketBillingType; + public ExternalBalanceResponse() { } @@ -566,6 +621,28 @@ public void setSpendType(SpendTypeEnum spendType) { this.spendType = spendType; } + + public ExternalBalanceResponse privateMarketBillingType(PrivateMarketBillingTypeEnum privateMarketBillingType) { + + this.privateMarketBillingType = privateMarketBillingType; + return this; + } + + /** + * Billing type for Private Market. + * @return privateMarketBillingType + **/ + @javax.annotation.Nonnull + + public PrivateMarketBillingTypeEnum getPrivateMarketBillingType() { + return privateMarketBillingType; + } + + + public void setPrivateMarketBillingType(PrivateMarketBillingTypeEnum privateMarketBillingType) { + this.privateMarketBillingType = privateMarketBillingType; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -634,13 +711,14 @@ public boolean equals(Object o) { Objects.equals(this.updatedAt, externalBalanceResponse.updatedAt) && Objects.equals(this.balanceType, externalBalanceResponse.balanceType) && Objects.equals(this.salesForceId, externalBalanceResponse.salesForceId) && - Objects.equals(this.spendType, externalBalanceResponse.spendType)&& + Objects.equals(this.spendType, externalBalanceResponse.spendType) && + Objects.equals(this.privateMarketBillingType, externalBalanceResponse.privateMarketBillingType)&& Objects.equals(this.additionalProperties, externalBalanceResponse.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name, poNumber, memo, deposited, spent, remaining, startDate, endDate, status, createdAt, updatedAt, balanceType, salesForceId, spendType, additionalProperties); + return Objects.hash(name, poNumber, memo, deposited, spent, remaining, startDate, endDate, status, createdAt, updatedAt, balanceType, salesForceId, spendType, privateMarketBillingType, additionalProperties); } @Override @@ -661,6 +739,7 @@ public String toString() { sb.append(" balanceType: ").append(toIndentedString(balanceType)).append("\n"); sb.append(" salesForceId: ").append(toIndentedString(salesForceId)).append("\n"); sb.append(" spendType: ").append(toIndentedString(spendType)).append("\n"); + sb.append(" privateMarketBillingType: ").append(toIndentedString(privateMarketBillingType)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -698,6 +777,7 @@ private String toIndentedString(Object o) { openapiFields.add("balanceType"); openapiFields.add("salesForceId"); openapiFields.add("spendType"); + openapiFields.add("privateMarketBillingType"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -715,6 +795,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("balanceType"); openapiRequiredFields.add("salesForceId"); openapiRequiredFields.add("spendType"); + openapiRequiredFields.add("privateMarketBillingType"); } /** @@ -757,6 +838,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (!jsonObj.get("spendType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `spendType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("spendType").toString())); } + if (!jsonObj.get("privateMarketBillingType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `privateMarketBillingType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privateMarketBillingType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/JsonApiPageResponseOfAccount.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/JsonApiPageResponseOfAccount.java index 0f907952..1ccf5b17 100644 --- a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/JsonApiPageResponseOfAccount.java +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/JsonApiPageResponseOfAccount.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfAccount metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/JsonApiPageResponseOfBrand.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/JsonApiPageResponseOfBrand.java index b261a46c..4a099635 100644 --- a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/JsonApiPageResponseOfBrand.java +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/JsonApiPageResponseOfBrand.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfBrand metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/JsonApiPageResponseOfRetailer.java b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/JsonApiPageResponseOfRetailer.java index 02d6dac6..8892e33c 100644 --- a/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/JsonApiPageResponseOfRetailer.java +++ b/sdks/retailmedia_2024-01/src/main/java/com/criteo/api/retailmedia/v2024_01/model/JsonApiPageResponseOfRetailer.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfRetailer metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2024-04/.openapi-generator/FILES b/sdks/retailmedia_2024-04/.openapi-generator/FILES index c2768bb3..33b43b89 100644 --- a/sdks/retailmedia_2024-04/.openapi-generator/FILES +++ b/sdks/retailmedia_2024-04/.openapi-generator/FILES @@ -41,6 +41,7 @@ docs/AudienceApi.md docs/AudienceIdsUpdateModel202110Request.md docs/AudienceTarget202110Request.md docs/AudienceTarget202110Response.md +docs/BalanceApi.md docs/BalanceCampaign202110ListRequest.md docs/BalanceCampaign202110PagedListResponse.md docs/BalanceResponse.md @@ -264,6 +265,7 @@ src/main/java/com/criteo/api/retailmedia/v2024_04/StringUtil.java src/main/java/com/criteo/api/retailmedia/v2024_04/api/AccountsApi.java src/main/java/com/criteo/api/retailmedia/v2024_04/api/AnalyticsApi.java src/main/java/com/criteo/api/retailmedia/v2024_04/api/AudienceApi.java +src/main/java/com/criteo/api/retailmedia/v2024_04/api/BalanceApi.java src/main/java/com/criteo/api/retailmedia/v2024_04/api/CampaignApi.java src/main/java/com/criteo/api/retailmedia/v2024_04/api/GatewayApi.java src/main/java/com/criteo/api/retailmedia/v2024_04/auth/ApiKeyAuth.java diff --git a/sdks/retailmedia_2024-04/README.md b/sdks/retailmedia_2024-04/README.md index 5e10efb1..8b4c0ab5 100644 --- a/sdks/retailmedia_2024-04/README.md +++ b/sdks/retailmedia_2024-04/README.md @@ -8,7 +8,7 @@ More information: [https://developers.criteo.com/](https://developers.criteo.com Criteo API -- Package version: 2024.04.0.240626 +- Package version: 2024.04.0.240731 *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -38,7 +38,7 @@ Add this dependency to your project's POM: com.criteo criteo-api-retailmedia-sdk - 2024.04.0.240626 + 2024.04.0.240731 compile ``` @@ -48,7 +48,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.criteo:criteo-api-retailmedia-sdk:2024.04.0.240626" +compile "com.criteo:criteo-api-retailmedia-sdk:2024.04.0.240731" ``` ### Others @@ -61,7 +61,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* `build/libs/criteo-api-retailmedia-sdk-2024.04.0.240626.jar` +* `build/libs/criteo-api-retailmedia-sdk-2024.04.0.240731.jar` ## Example @@ -75,6 +75,7 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AccountsApi* | [**addBrands**](docs/AccountsApi.md#addBrands) | **POST** /2024-04/retail-media/account-management/accounts/{accountId}/brands/add | *AccountsApi* | [**createPrivateMarketDemandBrandAccount**](docs/AccountsApi.md#createPrivateMarketDemandBrandAccount) | **POST** /2024-04/retail-media/account-management/accounts/{accountId}/create-brand-account | +*AccountsApi* | [**getApiV1ExternalAccounts**](docs/AccountsApi.md#getApiV1ExternalAccounts) | **GET** /2024-04/retail-media/accounts | *AccountsApi* | [**removeBrands**](docs/AccountsApi.md#removeBrands) | **POST** /2024-04/retail-media/account-management/accounts/{accountId}/brands/remove | *AnalyticsApi* | [**generateAsyncCampaignsReport**](docs/AnalyticsApi.md#generateAsyncCampaignsReport) | **POST** /2024-04/retail-media/reports/campaigns | *AnalyticsApi* | [**generateAsyncLineItemsReport**](docs/AnalyticsApi.md#generateAsyncLineItemsReport) | **POST** /2024-04/retail-media/reports/line-items | @@ -85,13 +86,19 @@ Class | Method | HTTP request | Description *AudienceApi* | [**legacyGetAudienceV1**](docs/AudienceApi.md#legacyGetAudienceV1) | **GET** /2024-04/retail-media/accounts/{accountId}/audiences | *AudienceApi* | [**legacyGetAudienceV2**](docs/AudienceApi.md#legacyGetAudienceV2) | **GET** /2024-04/retail-media/v2/accounts/{accountId}/audiences | *AudienceApi* | [**legacyUpdateAudienceV2**](docs/AudienceApi.md#legacyUpdateAudienceV2) | **POST** /2024-04/retail-media/v2/accounts/{accountId}/audiences | +*BalanceApi* | [**getApi202110ExternalBalanceCampaignsByBalanceId**](docs/BalanceApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2024-04/retail-media/balances/{balance-id}/campaigns | +*BalanceApi* | [**getApiV1ExternalAccountBalancesByAccountId**](docs/BalanceApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2024-04/retail-media/accounts/{account-id}/balances | +*BalanceApi* | [**getApiV1ExternalAccountByAccountIdAndBalanceId**](docs/BalanceApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId} | +*BalanceApi* | [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](docs/BalanceApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId} | +*BalanceApi* | [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](docs/BalanceApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | +*BalanceApi* | [**postApiV1ExternalAccountBalancesByAccountId**](docs/BalanceApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2024-04/retail-media/accounts/{account-id}/balances | +*BalanceApi* | [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](docs/BalanceApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | *CampaignApi* | [**addRemoveKeywords**](docs/CampaignApi.md#addRemoveKeywords) | **POST** /2024-04/retail-media/line-items/{id}/keywords/add-remove | *CampaignApi* | [**createAsset**](docs/CampaignApi.md#createAsset) | **POST** /2024-04/retail-media/assets | *CampaignApi* | [**fetchKeywords**](docs/CampaignApi.md#fetchKeywords) | **GET** /2024-04/retail-media/line-items/{id}/keywords | *CampaignApi* | [**fetchProposal**](docs/CampaignApi.md#fetchProposal) | **GET** /2024-04/retail-media/preferred-deal-line-items/{id}/proposal | *CampaignApi* | [**getApi202110ExternalAccountCreativesByAccountId**](docs/CampaignApi.md#getApi202110ExternalAccountCreativesByAccountId) | **GET** /2024-04/retail-media/accounts/{account-id}/creatives | *CampaignApi* | [**getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId**](docs/CampaignApi.md#getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId) | **GET** /2024-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords | -*CampaignApi* | [**getApi202110ExternalBalanceCampaignsByBalanceId**](docs/CampaignApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2024-04/retail-media/balances/{balance-id}/campaigns | *CampaignApi* | [**getApi202110ExternalCampaignPreferredLineItemsByCampaignId**](docs/CampaignApi.md#getApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **GET** /2024-04/retail-media/campaigns/{campaign-id}/preferred-line-items | *CampaignApi* | [**getApi202110ExternalLineItemProductsByLineItemId**](docs/CampaignApi.md#getApi202110ExternalLineItemProductsByLineItemId) | **GET** /2024-04/retail-media/line-items/{line-item-id}/products | *CampaignApi* | [**getApi202110ExternalPreferredLineItemByLineItemId**](docs/CampaignApi.md#getApi202110ExternalPreferredLineItemByLineItemId) | **GET** /2024-04/retail-media/preferred-line-items/{line-item-id} | @@ -107,11 +114,8 @@ Class | Method | HTTP request | Description *CampaignApi* | [**getApi202301ExternalAccountCampaignsByAccountId**](docs/CampaignApi.md#getApi202301ExternalAccountCampaignsByAccountId) | **GET** /2024-04/retail-media/accounts/{account-id}/campaigns | *CampaignApi* | [**getApi202301ExternalCampaignByCampaignId**](docs/CampaignApi.md#getApi202301ExternalCampaignByCampaignId) | **GET** /2024-04/retail-media/campaigns/{campaignId} | *CampaignApi* | [**getApi202301ExternalLineItemBidMultipliersByLineItemId**](docs/CampaignApi.md#getApi202301ExternalLineItemBidMultipliersByLineItemId) | **GET** /2024-04/retail-media/line-items/{line-item-id}/bid-multipliers | -*CampaignApi* | [**getApiV1ExternalAccountBalancesByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2024-04/retail-media/accounts/{account-id}/balances | *CampaignApi* | [**getApiV1ExternalAccountBrandsByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /2024-04/retail-media/accounts/{accountId}/brands | -*CampaignApi* | [**getApiV1ExternalAccountByAccountIdAndBalanceId**](docs/CampaignApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId} | *CampaignApi* | [**getApiV1ExternalAccountRetailersByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /2024-04/retail-media/accounts/{accountId}/retailers | -*CampaignApi* | [**getApiV1ExternalAccounts**](docs/CampaignApi.md#getApiV1ExternalAccounts) | **GET** /2024-04/retail-media/accounts | *CampaignApi* | [**getApiV1ExternalCatalogOutputByCatalogId**](docs/CampaignApi.md#getApiV1ExternalCatalogOutputByCatalogId) | **GET** /2024-04/retail-media/catalogs/{catalogId}/output | *CampaignApi* | [**getApiV1ExternalCatalogStatusByCatalogId**](docs/CampaignApi.md#getApiV1ExternalCatalogStatusByCatalogId) | **GET** /2024-04/retail-media/catalogs/{catalogId}/status | *CampaignApi* | [**getApiV2ExternalAccountLineItemsByAccountId**](docs/CampaignApi.md#getApiV2ExternalAccountLineItemsByAccountId) | **GET** /2024-04/retail-media/accounts/{account-id}/line-items | @@ -121,7 +125,6 @@ Class | Method | HTTP request | Description *CampaignApi* | [**getCampaignBudgetOverrides**](docs/CampaignApi.md#getCampaignBudgetOverrides) | **GET** /2024-04/retail-media/campaigns/{campaignId}/campaign-budget-overrides | *CampaignApi* | [**getInsertionOrderHistoryChangeDataCapture**](docs/CampaignApi.md#getInsertionOrderHistoryChangeDataCapture) | **GET** /2024-04/retail-media/insertion-order-history/{insertionOrderId}/change-data-capture | *CampaignApi* | [**getLineItemBudgetOverrides**](docs/CampaignApi.md#getLineItemBudgetOverrides) | **GET** /2024-04/retail-media/line-items/{lineItemId}/line-item-budget-overrides | -*CampaignApi* | [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](docs/CampaignApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId} | *CampaignApi* | [**postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId**](docs/CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId) | **POST** /2024-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append | *CampaignApi* | [**postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId**](docs/CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId) | **POST** /2024-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete | *CampaignApi* | [**postApi202110ExternalBalanceCampaignsAppendByBalanceId**](docs/CampaignApi.md#postApi202110ExternalBalanceCampaignsAppendByBalanceId) | **POST** /2024-04/retail-media/balances/{balance-id}/campaigns/append | @@ -140,10 +143,7 @@ Class | Method | HTTP request | Description *CampaignApi* | [**postApi202210ExternalAccountCreativesByAccountId**](docs/CampaignApi.md#postApi202210ExternalAccountCreativesByAccountId) | **POST** /2024-04/retail-media/accounts/{account-id}/creatives | *CampaignApi* | [**postApi202210ExternalAccountCreativesSearchByAccountId**](docs/CampaignApi.md#postApi202210ExternalAccountCreativesSearchByAccountId) | **POST** /2024-04/retail-media/accounts/{account-id}/creatives/search | *CampaignApi* | [**postApi202301ExternalAccountCampaignsByAccountId**](docs/CampaignApi.md#postApi202301ExternalAccountCampaignsByAccountId) | **POST** /2024-04/retail-media/accounts/{account-id}/campaigns | -*CampaignApi* | [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](docs/CampaignApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | -*CampaignApi* | [**postApiV1ExternalAccountBalancesByAccountId**](docs/CampaignApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2024-04/retail-media/accounts/{account-id}/balances | *CampaignApi* | [**postApiV1ExternalAccountCatalogsByAccountId**](docs/CampaignApi.md#postApiV1ExternalAccountCatalogsByAccountId) | **POST** /2024-04/retail-media/accounts/{accountId}/catalogs | -*CampaignApi* | [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](docs/CampaignApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | *CampaignApi* | [**postApiV2ExternalCampaignAuctionLineItemsByCampaignId**](docs/CampaignApi.md#postApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **POST** /2024-04/retail-media/campaigns/{campaign-id}/auction-line-items | *CampaignApi* | [**putApi202110ExternalPreferredLineItemByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemByLineItemId) | **PUT** /2024-04/retail-media/preferred-line-items/{line-item-id} | *CampaignApi* | [**putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **PUT** /2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | diff --git a/sdks/retailmedia_2024-04/api/openapi.yaml b/sdks/retailmedia_2024-04/api/openapi.yaml index 4a05e940..af72e239 100644 --- a/sdks/retailmedia_2024-04/api/openapi.yaml +++ b/sdks/retailmedia_2024-04/api/openapi.yaml @@ -49,6 +49,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -60,6 +61,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -67,12 +69,18 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfAccount' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfAccount' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfAccount' description: Success tags: - - Campaign + - Accounts x-accepts: application/json /2024-04/retail-media/accounts/{accountId}/brands: get: @@ -107,6 +115,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -118,6 +127,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -125,9 +135,15 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfBrand' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfBrand' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfBrand' description: Success tags: - Campaign @@ -165,6 +181,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -176,6 +193,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -183,9 +201,15 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' description: Success tags: - Campaign @@ -923,7 +947,10 @@ paths: description: Catalog download initiated. "400": content: - application/x-json-stream: {} + application/x-json-stream: + schema: + format: binary + type: string application/json: {} description: "The indicated catalog is not available for retrieval, wait\ \ for a success status." @@ -1451,6 +1478,7 @@ paths: schema: $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' description: brands to associate to account + x-bodyName: brands responses: "200": content: @@ -1467,7 +1495,7 @@ paths: description: Remove a brand from an account operationId: RemoveBrands parameters: - - description: the account id to update + - description: The account id to update explode: false in: path name: accountId @@ -1489,6 +1517,8 @@ paths: application/*+json: schema: $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' + description: Brands to remove from account + x-bodyName: brands responses: "200": content: @@ -1529,6 +1559,7 @@ paths: schema: $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrandAccountCreation' description: Initial creation and configuration options for the new account + x-bodyName: accountDetails responses: "201": content: @@ -1594,6 +1625,7 @@ paths: schema: $ref: '#/components/schemas/ValueResourceInputOfCampaignBudgetOverrides' description: New campaign budget overrides settings value resource input. + x-bodyName: campaignBudgetOverridesInput responses: "201": content: @@ -1712,6 +1744,7 @@ paths: schema: $ref: '#/components/schemas/ValueResourceInputOfLineItemBudgetOverrides' description: New line item budget overrides settings value resource input. + x-bodyName: lineItemBudgetOverridesInput responses: "201": content: @@ -1780,7 +1813,7 @@ paths: $ref: '#/components/schemas/BalanceResponsePagedListResponse' description: Success tags: - - Campaign + - Balance x-accepts: application/json post: description: Create balance for the given account id @@ -1810,7 +1843,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json /2024-04/retail-media/accounts/{account-id}/balances/{balanceId}: @@ -1844,7 +1877,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-accepts: application/json patch: description: Modify a balance for the given account id @@ -1883,7 +1916,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json /2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds: @@ -1924,7 +1957,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json /2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates: @@ -1965,7 +1998,7 @@ paths: $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json /2024-04/retail-media/accounts/{account-id}/campaigns: @@ -2381,7 +2414,7 @@ paths: $ref: '#/components/schemas/BalanceCampaign202110PagedListResponse' description: Success tags: - - Campaign + - Balance x-accepts: application/json /2024-04/retail-media/balances/{balance-id}/campaigns/append: post: @@ -3510,7 +3543,8 @@ paths: components: schemas: ApplicationSummaryModelResponse: - description: Response of ApplicationSummaryModel + description: A top-level object that encapsulates a Criteo API response for + a single value example: data: attributes: @@ -3571,17 +3605,16 @@ components: nullable: true readOnly: true type: array - uniqueItems: false errors: items: $ref: '#/components/schemas/CommonProblem' nullable: true readOnly: true type: array - uniqueItems: false type: object ApplicationSummaryModelResource: - description: A class that represents a ValueType in a guild compliant way + description: A top-level object that encapsulates a Criteo API response for + a single value example: attributes: organizationId: 6 @@ -3598,7 +3631,7 @@ components: $ref: '#/components/schemas/ApplicationSummaryModel' type: object CommonProblem: - description: Common problem object. Can be specialized as needed. + description: Common problem object. example: traceId: traceId traceIdentifier: traceIdentifier @@ -3634,7 +3667,7 @@ components: nullable: true type: string code: - description: "A machine-readable error code, expressed as a string value." + description: "A machine-readable error code, expressed as a string value." nullable: true type: string instance: @@ -3662,7 +3695,8 @@ components: type: string type: object ApplicationSummaryModel: - description: Model of ApplicationSummary + description: Used for the /me endpoint. Contains information about the currently + authenticated application that we accept to give to our clients example: organizationId: 6 name: name @@ -3784,8 +3818,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false JsonApiPageResponseOfBrand: description: A wrapper class to return a single page of with metadata @@ -3864,8 +3898,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false JsonApiPageResponseOfRetailer: description: A wrapper class to return a single page of with metadata @@ -3950,8 +3984,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false PageMetadata: description: Metadata related to the current request example: @@ -3990,7 +4024,6 @@ components: - currentPageIndex - currentPageSize type: object - x-nullable: false CommonError: description: A JSON:API Common error structure example: @@ -4056,7 +4089,6 @@ components: type: string x-nullable: false type: object - x-nullable: false CommonWarning: description: A JSON:API Base common warning example: @@ -4122,7 +4154,6 @@ components: type: string x-nullable: false type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndAccountAndAccount: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -4154,7 +4185,6 @@ components: - id - type type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndBrandAndBrand: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -4177,7 +4207,6 @@ components: - id - type type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndRetailerAndRetailer: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -4203,7 +4232,6 @@ components: - id - type type: object - x-nullable: false ExternalAccount: description: A Retail Media Account used to launch campaigns and line items example: @@ -4241,7 +4269,6 @@ components: countries: items: type: string - x-nullable: false type: array x-nullable: false currency: @@ -4258,6 +4285,7 @@ components: companyName: nullable: true type: string + x-nullable: true required: - countries - currency @@ -4266,7 +4294,6 @@ components: - timeZone - type type: object - x-nullable: false ExternalBrand: description: A Retail Media Brand used to represent a collection of products sold under the same umbrella name @@ -4281,7 +4308,6 @@ components: required: - name type: object - x-nullable: false ExternalRetailer: description: A Retail Media Retailer used to represent a selection of products from multiple brands @@ -4302,13 +4328,11 @@ components: - auction - preferred type: string - x-nullable: false type: array x-nullable: false required: - name type: object - x-nullable: false AssetResponse: description: A class implementing the response of the Criteo API as described in API Guild Guidelines with a single entity as body @@ -8720,6 +8744,9 @@ components: example: data: attributes: + advertiserTypes: + - retailer + - retailer campaignType: all clickAttributionWindow: none endDate: 2000-01-23T04:56:07.000+00:00 @@ -8843,6 +8870,9 @@ components: a single value example: attributes: + advertiserTypes: + - retailer + - retailer campaignType: all clickAttributionWindow: none endDate: 2000-01-23T04:56:07.000+00:00 @@ -9043,6 +9073,8 @@ components: - salesChannel - environment - pageTypeName + - pageCategory + - taxonomyBreadcrumb - keyword - searchTerm type: string @@ -9217,6 +9249,8 @@ components: - salesChannel - environment - pageTypeName + - pageCategory + - taxonomyBreadcrumb - keyword - searchTerm type: string @@ -9273,6 +9307,9 @@ components: AsyncRevenueReport: description: Async Revenue report body request example: + advertiserTypes: + - retailer + - retailer campaignType: all clickAttributionWindow: none endDate: 2000-01-23T04:56:07.000+00:00 @@ -9300,13 +9337,13 @@ components: - date properties: ids: - description: Campaign ids to report on + description: Supply account ids to report on items: type: string nullable: true type: array id: - description: Campaign id to report on + description: Supply account id to report on nullable: true type: string reportType: @@ -9343,6 +9380,16 @@ components: - sponsorship nullable: true type: string + advertiserTypes: + description: "Filter on the type of advertiser: retailer, brand, seller" + items: + enum: + - retailer + - brand + - seller + type: string + nullable: true + type: array skuRelations: description: "Filter on sku relations: Same SKU, Same Parent SKU, Same Category,\ \ Same Brand or Same Seller" @@ -9415,6 +9462,7 @@ components: - accountId - accountName - accountTypeName + - advertiserType - campaignId - campaignName - campaignTypeName @@ -9438,6 +9486,7 @@ components: - advProductName - advProductGtin - advProductMpn + - buyType - soldBy - saleChannel - attributionSettings @@ -9482,6 +9531,7 @@ components: - transactions - assistedSales - assistedUnits + - revenue - openAuctionRevenue - preferredDealsRevenue - ctr @@ -10455,6 +10505,7 @@ components: currentPageIndex: 1 data: - attributes: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -10472,6 +10523,7 @@ components: id: id type: type - attributes: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -10557,6 +10609,7 @@ components: example: data: attributes: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -12440,6 +12493,7 @@ components: description: Data model for a Resource example: attributes: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -13139,6 +13193,7 @@ components: description: A Retail Media Balance used to determine the funds available for any or all campaigns in an account example: + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 @@ -13170,30 +13225,22 @@ components: description: Amount of billable funds allotted to the balance. format: decimal nullable: true - required: - - "false" type: number x-nullable: true spent: format: decimal nullable: true - required: - - "false" type: number x-nullable: true remaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true startDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -13236,6 +13283,15 @@ components: - OffsiteAwareness type: string x-nullable: false + privateMarketBillingType: + description: Billing type for Private Market. + enum: + - NotApplicable + - BillByRetailer + - BillByCriteo + - Unknown + type: string + x-nullable: false required: - balanceType - createdAt @@ -13244,6 +13300,7 @@ components: - memo - name - poNumber + - privateMarketBillingType - remaining - salesForceId - spendType @@ -13296,15 +13353,11 @@ components: budgetSpent: format: decimal nullable: true - required: - - "false" type: number x-nullable: true budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true status: @@ -13366,22 +13419,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -13465,8 +13512,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -13494,8 +13539,6 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true campaignId: @@ -13509,8 +13552,6 @@ components: budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true createdAt: @@ -13563,8 +13604,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -13575,29 +13614,21 @@ components: maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true bidStrategy: @@ -13629,8 +13660,6 @@ components: targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -13648,8 +13677,6 @@ components: budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true createdAt: @@ -13735,15 +13762,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: @@ -13870,8 +13893,6 @@ components: bidOverride: format: decimal nullable: true - required: - - "false" type: number x-nullable: true type: object @@ -13994,16 +14015,12 @@ components: description: Amount of billable funds allotted to the balance. format: decimal nullable: true - required: - - "false" type: number x-nullable: true startDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -14195,22 +14212,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -14279,8 +14290,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -14304,36 +14313,26 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -14381,8 +14380,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -14410,36 +14407,26 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -14495,15 +14482,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: @@ -14577,22 +14560,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -14690,15 +14667,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: diff --git a/sdks/retailmedia_2024-04/build.gradle b/sdks/retailmedia_2024-04/build.gradle index 0f3d9ec9..a720a9d0 100644 --- a/sdks/retailmedia_2024-04/build.gradle +++ b/sdks/retailmedia_2024-04/build.gradle @@ -23,7 +23,7 @@ if (JavaVersion.current().isJava8Compatible()) { } group = 'com.criteo' -version = '2024.04.0.240626' +version = '2024.04.0.240731' repositories { jcenter() @@ -74,7 +74,7 @@ publishing { mavenJava(MavenPublication) { groupId 'com.criteo' artifactId 'criteo-api-retailmedia-sdk' - version '2024.04.0.240626' + version '2024.04.0.240731' from components.java artifact sourcesJar artifact javadocJar diff --git a/sdks/retailmedia_2024-04/docs/AccountsApi.md b/sdks/retailmedia_2024-04/docs/AccountsApi.md index b7aa2609..500256cc 100644 --- a/sdks/retailmedia_2024-04/docs/AccountsApi.md +++ b/sdks/retailmedia_2024-04/docs/AccountsApi.md @@ -6,6 +6,7 @@ All URIs are relative to *https://api.criteo.com* |------------- | ------------- | -------------| | [**addBrands**](AccountsApi.md#addBrands) | **POST** /2024-04/retail-media/account-management/accounts/{accountId}/brands/add | | | [**createPrivateMarketDemandBrandAccount**](AccountsApi.md#createPrivateMarketDemandBrandAccount) | **POST** /2024-04/retail-media/account-management/accounts/{accountId}/create-brand-account | | +| [**getApiV1ExternalAccounts**](AccountsApi.md#getApiV1ExternalAccounts) | **GET** /2024-04/retail-media/accounts | | | [**removeBrands**](AccountsApi.md#removeBrands) | **POST** /2024-04/retail-media/account-management/accounts/{accountId}/brands/remove | | @@ -192,6 +193,99 @@ public class Example { | **201** | Success | - | +## getApiV1ExternalAccounts + +> JsonApiPageResponseOfAccount getApiV1ExternalAccounts(limitToId, pageIndex, pageSize) + + + +Gets page of account objects that the current user can access + +### Example + +```java +package com.criteo.api.retailmedia.v2024_04; + +import com.criteo.api.retailmedia.v2024_04.ApiClient; +import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_04.ApiException; +import com.criteo.api.retailmedia.v2024_04.Configuration; +import com.criteo.api.retailmedia.v2024_04.auth.*; +import com.criteo.api.retailmedia.v2024_04.model.*; +import com.criteo.api.retailmedia.v2024_04.api.AccountsApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AccountsApi apiInstance = new AccountsApi(defaultClient); + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request + try { + JsonApiPageResponseOfAccount result = apiInstance.getApiV1ExternalAccounts(limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AccountsApi#getApiV1ExternalAccounts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | + +### Return type + +[**JsonApiPageResponseOfAccount**](JsonApiPageResponseOfAccount.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + ## removeBrands > ValueResourceOfRetailMediaBrands removeBrands(accountId, valueResourceInputOfRetailMediaBrands) @@ -239,8 +333,8 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); AccountsApi apiInstance = new AccountsApi(defaultClient); - String accountId = "accountId_example"; // String | the account id to update - ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands = new ValueResourceInputOfRetailMediaBrands(); // ValueResourceInputOfRetailMediaBrands | + String accountId = "accountId_example"; // String | The account id to update + ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands = new ValueResourceInputOfRetailMediaBrands(); // ValueResourceInputOfRetailMediaBrands | Brands to remove from account try { ValueResourceOfRetailMediaBrands result = apiInstance.removeBrands(accountId, valueResourceInputOfRetailMediaBrands); System.out.println(result); @@ -260,8 +354,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| the account id to update | | -| **valueResourceInputOfRetailMediaBrands** | [**ValueResourceInputOfRetailMediaBrands**](ValueResourceInputOfRetailMediaBrands.md)| | [optional] | +| **accountId** | **String**| The account id to update | | +| **valueResourceInputOfRetailMediaBrands** | [**ValueResourceInputOfRetailMediaBrands**](ValueResourceInputOfRetailMediaBrands.md)| Brands to remove from account | [optional] | ### Return type diff --git a/sdks/retailmedia_2024-04/docs/ApplicationSummaryModel.md b/sdks/retailmedia_2024-04/docs/ApplicationSummaryModel.md index 704b26ad..d5e84458 100644 --- a/sdks/retailmedia_2024-04/docs/ApplicationSummaryModel.md +++ b/sdks/retailmedia_2024-04/docs/ApplicationSummaryModel.md @@ -2,7 +2,7 @@ # ApplicationSummaryModel -Model of ApplicationSummary +Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients ## Properties diff --git a/sdks/retailmedia_2024-04/docs/ApplicationSummaryModelResource.md b/sdks/retailmedia_2024-04/docs/ApplicationSummaryModelResource.md index 81ed2c97..af688c5d 100644 --- a/sdks/retailmedia_2024-04/docs/ApplicationSummaryModelResource.md +++ b/sdks/retailmedia_2024-04/docs/ApplicationSummaryModelResource.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResource -A class that represents a ValueType in a guild compliant way +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/retailmedia_2024-04/docs/ApplicationSummaryModelResponse.md b/sdks/retailmedia_2024-04/docs/ApplicationSummaryModelResponse.md index 47b6bd74..658b5549 100644 --- a/sdks/retailmedia_2024-04/docs/ApplicationSummaryModelResponse.md +++ b/sdks/retailmedia_2024-04/docs/ApplicationSummaryModelResponse.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResponse -Response of ApplicationSummaryModel +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/retailmedia_2024-04/docs/AsyncCampaignsReport.md b/sdks/retailmedia_2024-04/docs/AsyncCampaignsReport.md index d735484a..18252b4c 100644 --- a/sdks/retailmedia_2024-04/docs/AsyncCampaignsReport.md +++ b/sdks/retailmedia_2024-04/docs/AsyncCampaignsReport.md @@ -116,6 +116,8 @@ Async Campaigns report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_2024-04/docs/AsyncLineItemsReport.md b/sdks/retailmedia_2024-04/docs/AsyncLineItemsReport.md index 9a3a2e0e..276cd5a1 100644 --- a/sdks/retailmedia_2024-04/docs/AsyncLineItemsReport.md +++ b/sdks/retailmedia_2024-04/docs/AsyncLineItemsReport.md @@ -116,6 +116,8 @@ Async Line Items report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_2024-04/docs/AsyncRevenueReport.md b/sdks/retailmedia_2024-04/docs/AsyncRevenueReport.md index bb77396b..16ae32dc 100644 --- a/sdks/retailmedia_2024-04/docs/AsyncRevenueReport.md +++ b/sdks/retailmedia_2024-04/docs/AsyncRevenueReport.md @@ -8,12 +8,13 @@ Async Revenue report body request | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**ids** | **List<String>** | Campaign ids to report on | [optional] | -|**id** | **String** | Campaign id to report on | [optional] | +|**ids** | **List<String>** | Supply account ids to report on | [optional] | +|**id** | **String** | Supply account id to report on | [optional] | |**reportType** | [**ReportTypeEnum**](#ReportTypeEnum) | Type of report | [optional] | |**revenueType** | [**RevenueTypeEnum**](#RevenueTypeEnum) | Type of revenue | [optional] | |**soldBy** | [**SoldByEnum**](#SoldByEnum) | Filter on the seller: Indirect Sold, Direct Sold or Private Market | [optional] | |**buyType** | [**BuyTypeEnum**](#BuyTypeEnum) | Filter on buy type: Auction, Preferred Deals or Sponsorship | [optional] | +|**advertiserTypes** | [**List<AdvertiserTypesEnum>**](#List<AdvertiserTypesEnum>) | Filter on the type of advertiser: retailer, brand, seller | [optional] | |**skuRelations** | [**List<SkuRelationsEnum>**](#List<SkuRelationsEnum>) | Filter on sku relations: Same SKU, Same Parent SKU, Same Category, Same Brand or Same Seller | [optional] | |**format** | [**FormatEnum**](#FormatEnum) | Format of the output | [optional] | |**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Filter the type of campaigns to report on: sponsoredProducts or onSiteDisplays | [optional] | @@ -69,6 +70,16 @@ Async Revenue report body request +## Enum: List<AdvertiserTypesEnum> + +| Name | Value | +|---- | -----| +| RETAILER | "retailer" | +| BRAND | "brand" | +| SELLER | "seller" | + + + ## Enum: List<SkuRelationsEnum> | Name | Value | @@ -145,6 +156,7 @@ Async Revenue report body request | ACCOUNTID | "accountId" | | ACCOUNTNAME | "accountName" | | ACCOUNTTYPENAME | "accountTypeName" | +| ADVERTISERTYPE | "advertiserType" | | CAMPAIGNID | "campaignId" | | CAMPAIGNNAME | "campaignName" | | CAMPAIGNTYPENAME | "campaignTypeName" | @@ -168,6 +180,7 @@ Async Revenue report body request | ADVPRODUCTNAME | "advProductName" | | ADVPRODUCTGTIN | "advProductGtin" | | ADVPRODUCTMPN | "advProductMpn" | +| BUYTYPE | "buyType" | | SOLDBY | "soldBy" | | SALECHANNEL | "saleChannel" | | ATTRIBUTIONSETTINGS | "attributionSettings" | @@ -212,6 +225,7 @@ Async Revenue report body request | TRANSACTIONS | "transactions" | | ASSISTEDSALES | "assistedSales" | | ASSISTEDUNITS | "assistedUnits" | +| REVENUE | "revenue" | | OPENAUCTIONREVENUE | "openAuctionRevenue" | | PREFERREDDEALSREVENUE | "preferredDealsRevenue" | | CTR | "ctr" | diff --git a/sdks/retailmedia_2024-04/docs/BalanceApi.md b/sdks/retailmedia_2024-04/docs/BalanceApi.md new file mode 100644 index 00000000..35bd2e9a --- /dev/null +++ b/sdks/retailmedia_2024-04/docs/BalanceApi.md @@ -0,0 +1,666 @@ +# BalanceApi + +All URIs are relative to *https://api.criteo.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getApi202110ExternalBalanceCampaignsByBalanceId**](BalanceApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2024-04/retail-media/balances/{balance-id}/campaigns | | +| [**getApiV1ExternalAccountBalancesByAccountId**](BalanceApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2024-04/retail-media/accounts/{account-id}/balances | | +| [**getApiV1ExternalAccountByAccountIdAndBalanceId**](BalanceApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId} | | +| [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](BalanceApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId} | | +| [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](BalanceApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | | +| [**postApiV1ExternalAccountBalancesByAccountId**](BalanceApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2024-04/retail-media/accounts/{account-id}/balances | | +| [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](BalanceApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | | + + + +## getApi202110ExternalBalanceCampaignsByBalanceId + +> BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize) + + + +Gets page of campaigns for the given balanceId + +### Example + +```java +package com.criteo.api.retailmedia.v2024_04; + +import com.criteo.api.retailmedia.v2024_04.ApiClient; +import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_04.ApiException; +import com.criteo.api.retailmedia.v2024_04.Configuration; +import com.criteo.api.retailmedia.v2024_04.auth.*; +import com.criteo.api.retailmedia.v2024_04.model.*; +import com.criteo.api.retailmedia.v2024_04.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String balanceId = "balanceId_example"; // String | The balance to get campaigns from + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + try { + BalanceCampaign202110PagedListResponse result = apiInstance.getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApi202110ExternalBalanceCampaignsByBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **balanceId** | **String**| The balance to get campaigns from | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | + +### Return type + +[**BalanceCampaign202110PagedListResponse**](BalanceCampaign202110PagedListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## getApiV1ExternalAccountBalancesByAccountId + +> BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize) + + + +Get page of balances for the given accountId. + +### Example + +```java +package com.criteo.api.retailmedia.v2024_04; + +import com.criteo.api.retailmedia.v2024_04.ApiClient; +import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_04.ApiException; +import com.criteo.api.retailmedia.v2024_04.Configuration; +import com.criteo.api.retailmedia.v2024_04.auth.*; +import com.criteo.api.retailmedia.v2024_04.model.*; +import com.criteo.api.retailmedia.v2024_04.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account to get page of balances for + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request + try { + BalanceResponsePagedListResponse result = apiInstance.getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApiV1ExternalAccountBalancesByAccountId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account to get page of balances for | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | + +### Return type + +[**BalanceResponsePagedListResponse**](BalanceResponsePagedListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## getApiV1ExternalAccountByAccountIdAndBalanceId + +> BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId) + + + +Get a balance for the given account id and balance id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_04; + +import com.criteo.api.retailmedia.v2024_04.ApiClient; +import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_04.ApiException; +import com.criteo.api.retailmedia.v2024_04.Configuration; +import com.criteo.api.retailmedia.v2024_04.auth.*; +import com.criteo.api.retailmedia.v2024_04.model.*; +import com.criteo.api.retailmedia.v2024_04.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance id + try { + BalanceResponse result = apiInstance.getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApiV1ExternalAccountByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance id | | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## patchApiV1ExternalAccountByAccountIdAndBalanceId + +> BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest) + + + +Modify a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_04; + +import com.criteo.api.retailmedia.v2024_04.ApiClient; +import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_04.ApiException; +import com.criteo.api.retailmedia.v2024_04.Configuration; +import com.criteo.api.retailmedia.v2024_04.auth.*; +import com.criteo.api.retailmedia.v2024_04.model.*; +import com.criteo.api.retailmedia.v2024_04.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to change the dates + UpdateBalanceModelRequest updateBalanceModelRequest = new UpdateBalanceModelRequest(); // UpdateBalanceModelRequest | + try { + BalanceResponse result = apiInstance.patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#patchApiV1ExternalAccountByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to change the dates | | +| **updateBalanceModelRequest** | [**UpdateBalanceModelRequest**](UpdateBalanceModelRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId + +> BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest) + + + +Add funds to a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_04; + +import com.criteo.api.retailmedia.v2024_04.ApiClient; +import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_04.ApiException; +import com.criteo.api.retailmedia.v2024_04.Configuration; +import com.criteo.api.retailmedia.v2024_04.auth.*; +import com.criteo.api.retailmedia.v2024_04.model.*; +import com.criteo.api.retailmedia.v2024_04.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to add funds to + AddFundsToBalanceRequest addFundsToBalanceRequest = new AddFundsToBalanceRequest(); // AddFundsToBalanceRequest | + try { + BalanceResponse result = apiInstance.postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to add funds to | | +| **addFundsToBalanceRequest** | [**AddFundsToBalanceRequest**](AddFundsToBalanceRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## postApiV1ExternalAccountBalancesByAccountId + +> BalanceResponse postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest) + + + +Create balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_04; + +import com.criteo.api.retailmedia.v2024_04.ApiClient; +import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_04.ApiException; +import com.criteo.api.retailmedia.v2024_04.Configuration; +import com.criteo.api.retailmedia.v2024_04.auth.*; +import com.criteo.api.retailmedia.v2024_04.model.*; +import com.criteo.api.retailmedia.v2024_04.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account to create balances for + CreateBalanceRequest createBalanceRequest = new CreateBalanceRequest(); // CreateBalanceRequest | + try { + BalanceResponse result = apiInstance.postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV1ExternalAccountBalancesByAccountId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account to create balances for | | +| **createBalanceRequest** | [**CreateBalanceRequest**](CreateBalanceRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Success | - | + + +## postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId + +> BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest) + + + +Change dates of a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_04; + +import com.criteo.api.retailmedia.v2024_04.ApiClient; +import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_04.ApiException; +import com.criteo.api.retailmedia.v2024_04.Configuration; +import com.criteo.api.retailmedia.v2024_04.auth.*; +import com.criteo.api.retailmedia.v2024_04.model.*; +import com.criteo.api.retailmedia.v2024_04.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to change the dates + ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest = new ChangeDatesOfBalanceRequest(); // ChangeDatesOfBalanceRequest | + try { + BalanceResponse result = apiInstance.postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to change the dates | | +| **changeDatesOfBalanceRequest** | [**ChangeDatesOfBalanceRequest**](ChangeDatesOfBalanceRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + diff --git a/sdks/retailmedia_2024-04/docs/CampaignApi.md b/sdks/retailmedia_2024-04/docs/CampaignApi.md index d942a07b..647c199d 100644 --- a/sdks/retailmedia_2024-04/docs/CampaignApi.md +++ b/sdks/retailmedia_2024-04/docs/CampaignApi.md @@ -10,7 +10,6 @@ All URIs are relative to *https://api.criteo.com* | [**fetchProposal**](CampaignApi.md#fetchProposal) | **GET** /2024-04/retail-media/preferred-deal-line-items/{id}/proposal | | | [**getApi202110ExternalAccountCreativesByAccountId**](CampaignApi.md#getApi202110ExternalAccountCreativesByAccountId) | **GET** /2024-04/retail-media/accounts/{account-id}/creatives | | | [**getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId**](CampaignApi.md#getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId) | **GET** /2024-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords | | -| [**getApi202110ExternalBalanceCampaignsByBalanceId**](CampaignApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2024-04/retail-media/balances/{balance-id}/campaigns | | | [**getApi202110ExternalCampaignPreferredLineItemsByCampaignId**](CampaignApi.md#getApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **GET** /2024-04/retail-media/campaigns/{campaign-id}/preferred-line-items | | | [**getApi202110ExternalLineItemProductsByLineItemId**](CampaignApi.md#getApi202110ExternalLineItemProductsByLineItemId) | **GET** /2024-04/retail-media/line-items/{line-item-id}/products | | | [**getApi202110ExternalPreferredLineItemByLineItemId**](CampaignApi.md#getApi202110ExternalPreferredLineItemByLineItemId) | **GET** /2024-04/retail-media/preferred-line-items/{line-item-id} | | @@ -26,11 +25,8 @@ All URIs are relative to *https://api.criteo.com* | [**getApi202301ExternalAccountCampaignsByAccountId**](CampaignApi.md#getApi202301ExternalAccountCampaignsByAccountId) | **GET** /2024-04/retail-media/accounts/{account-id}/campaigns | | | [**getApi202301ExternalCampaignByCampaignId**](CampaignApi.md#getApi202301ExternalCampaignByCampaignId) | **GET** /2024-04/retail-media/campaigns/{campaignId} | | | [**getApi202301ExternalLineItemBidMultipliersByLineItemId**](CampaignApi.md#getApi202301ExternalLineItemBidMultipliersByLineItemId) | **GET** /2024-04/retail-media/line-items/{line-item-id}/bid-multipliers | | -| [**getApiV1ExternalAccountBalancesByAccountId**](CampaignApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2024-04/retail-media/accounts/{account-id}/balances | | | [**getApiV1ExternalAccountBrandsByAccountId**](CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /2024-04/retail-media/accounts/{accountId}/brands | | -| [**getApiV1ExternalAccountByAccountIdAndBalanceId**](CampaignApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId} | | | [**getApiV1ExternalAccountRetailersByAccountId**](CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /2024-04/retail-media/accounts/{accountId}/retailers | | -| [**getApiV1ExternalAccounts**](CampaignApi.md#getApiV1ExternalAccounts) | **GET** /2024-04/retail-media/accounts | | | [**getApiV1ExternalCatalogOutputByCatalogId**](CampaignApi.md#getApiV1ExternalCatalogOutputByCatalogId) | **GET** /2024-04/retail-media/catalogs/{catalogId}/output | | | [**getApiV1ExternalCatalogStatusByCatalogId**](CampaignApi.md#getApiV1ExternalCatalogStatusByCatalogId) | **GET** /2024-04/retail-media/catalogs/{catalogId}/status | | | [**getApiV2ExternalAccountLineItemsByAccountId**](CampaignApi.md#getApiV2ExternalAccountLineItemsByAccountId) | **GET** /2024-04/retail-media/accounts/{account-id}/line-items | | @@ -40,7 +36,6 @@ All URIs are relative to *https://api.criteo.com* | [**getCampaignBudgetOverrides**](CampaignApi.md#getCampaignBudgetOverrides) | **GET** /2024-04/retail-media/campaigns/{campaignId}/campaign-budget-overrides | | | [**getInsertionOrderHistoryChangeDataCapture**](CampaignApi.md#getInsertionOrderHistoryChangeDataCapture) | **GET** /2024-04/retail-media/insertion-order-history/{insertionOrderId}/change-data-capture | | | [**getLineItemBudgetOverrides**](CampaignApi.md#getLineItemBudgetOverrides) | **GET** /2024-04/retail-media/line-items/{lineItemId}/line-item-budget-overrides | | -| [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](CampaignApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId} | | | [**postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId**](CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId) | **POST** /2024-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append | | | [**postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId**](CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId) | **POST** /2024-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete | | | [**postApi202110ExternalBalanceCampaignsAppendByBalanceId**](CampaignApi.md#postApi202110ExternalBalanceCampaignsAppendByBalanceId) | **POST** /2024-04/retail-media/balances/{balance-id}/campaigns/append | | @@ -59,10 +54,7 @@ All URIs are relative to *https://api.criteo.com* | [**postApi202210ExternalAccountCreativesByAccountId**](CampaignApi.md#postApi202210ExternalAccountCreativesByAccountId) | **POST** /2024-04/retail-media/accounts/{account-id}/creatives | | | [**postApi202210ExternalAccountCreativesSearchByAccountId**](CampaignApi.md#postApi202210ExternalAccountCreativesSearchByAccountId) | **POST** /2024-04/retail-media/accounts/{account-id}/creatives/search | | | [**postApi202301ExternalAccountCampaignsByAccountId**](CampaignApi.md#postApi202301ExternalAccountCampaignsByAccountId) | **POST** /2024-04/retail-media/accounts/{account-id}/campaigns | | -| [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](CampaignApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | | -| [**postApiV1ExternalAccountBalancesByAccountId**](CampaignApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2024-04/retail-media/accounts/{account-id}/balances | | | [**postApiV1ExternalAccountCatalogsByAccountId**](CampaignApi.md#postApiV1ExternalAccountCatalogsByAccountId) | **POST** /2024-04/retail-media/accounts/{accountId}/catalogs | | -| [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](CampaignApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | | | [**postApiV2ExternalCampaignAuctionLineItemsByCampaignId**](CampaignApi.md#postApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **POST** /2024-04/retail-media/campaigns/{campaign-id}/auction-line-items | | | [**putApi202110ExternalPreferredLineItemByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemByLineItemId) | **PUT** /2024-04/retail-media/preferred-line-items/{line-item-id} | | | [**putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **PUT** /2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | | @@ -620,101 +612,6 @@ public class Example { | **400** | Bad Request | - | -## getApi202110ExternalBalanceCampaignsByBalanceId - -> BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize) - - - -Gets page of campaigns for the given balanceId - -### Example - -```java -package com.criteo.api.retailmedia.v2024_04; - -import com.criteo.api.retailmedia.v2024_04.ApiClient; -import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_04.ApiException; -import com.criteo.api.retailmedia.v2024_04.Configuration; -import com.criteo.api.retailmedia.v2024_04.auth.*; -import com.criteo.api.retailmedia.v2024_04.model.*; -import com.criteo.api.retailmedia.v2024_04.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String balanceId = "balanceId_example"; // String | The balance to get campaigns from - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request - try { - BalanceCampaign202110PagedListResponse result = apiInstance.getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApi202110ExternalBalanceCampaignsByBalanceId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **balanceId** | **String**| The balance to get campaigns from | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | - -### Return type - -[**BalanceCampaign202110PagedListResponse**](BalanceCampaign202110PagedListResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - ## getApi202110ExternalCampaignPreferredLineItemsByCampaignId > PreferredLineItem202110PagedListResponse getApi202110ExternalCampaignPreferredLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize) @@ -2085,13 +1982,13 @@ public class Example { | **200** | Success | - | -## getApiV1ExternalAccountBalancesByAccountId +## getApiV1ExternalAccountBrandsByAccountId -> BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize) +> JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize) -Get page of balances for the given accountId. +Gets page of retailer objects that are associated with the given account ### Example @@ -2132,15 +2029,15 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account to get page of balances for + String accountId = "accountId_example"; // String | The given account id List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { - BalanceResponsePagedListResponse result = apiInstance.getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize); + JsonApiPageResponseOfBrand result = apiInstance.getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountBalancesByAccountId"); + System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountBrandsByAccountId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2155,14 +2052,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account to get page of balances for | | +| **accountId** | **String**| The given account id | | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | | **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | | **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type -[**BalanceResponsePagedListResponse**](BalanceResponsePagedListResponse.md) +[**JsonApiPageResponseOfBrand**](JsonApiPageResponseOfBrand.md) ### Authorization @@ -2171,7 +2068,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/plain, application/json, text/json ### HTTP response details @@ -2180,9 +2077,9 @@ public class Example { | **200** | Success | - | -## getApiV1ExternalAccountBrandsByAccountId +## getApiV1ExternalAccountRetailersByAccountId -> JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize) +> JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize) @@ -2229,13 +2126,13 @@ public class Example { CampaignApi apiInstance = new CampaignApi(defaultClient); String accountId = "accountId_example"; // String | The given account id List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { - JsonApiPageResponseOfBrand result = apiInstance.getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize); + JsonApiPageResponseOfRetailer result = apiInstance.getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountBrandsByAccountId"); + System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountRetailersByAccountId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2252,12 +2149,12 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **accountId** | **String**| The given account id | | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type -[**JsonApiPageResponseOfBrand**](JsonApiPageResponseOfBrand.md) +[**JsonApiPageResponseOfRetailer**](JsonApiPageResponseOfRetailer.md) ### Authorization @@ -2266,7 +2163,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/plain, application/json, text/json ### HTTP response details @@ -2275,13 +2172,13 @@ public class Example { | **200** | Success | - | -## getApiV1ExternalAccountByAccountIdAndBalanceId +## getApiV1ExternalCatalogOutputByCatalogId -> BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId) +> File getApiV1ExternalCatalogOutputByCatalogId(catalogId) -Get a balance for the given account id and balance id +Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. ### Example @@ -2322,13 +2219,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account of the balance - String balanceId = "balanceId_example"; // String | The balance id + String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. try { - BalanceResponse result = apiInstance.getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId); + File result = apiInstance.getApiV1ExternalCatalogOutputByCatalogId(catalogId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountByAccountIdAndBalanceId"); + System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogOutputByCatalogId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2343,12 +2239,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account of the balance | | -| **balanceId** | **String**| The balance id | | +| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | ### Return type -[**BalanceResponse**](BalanceResponse.md) +[**File**](File.md) ### Authorization @@ -2357,22 +2252,23 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: application/x-json-stream, application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Success | - | +| **200** | Catalog download initiated. | - | +| **400** | The indicated catalog is not available for retrieval, wait for a success status. | - | -## getApiV1ExternalAccountRetailersByAccountId +## getApiV1ExternalCatalogStatusByCatalogId -> JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize) +> JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(catalogId) -Gets page of retailer objects that are associated with the given account +Check the status of a catalog request. ### Example @@ -2413,15 +2309,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The given account id - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. try { - JsonApiPageResponseOfRetailer result = apiInstance.getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize); + JsonApiSingleResponseOfCatalogStatus result = apiInstance.getApiV1ExternalCatalogStatusByCatalogId(catalogId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccountRetailersByAccountId"); + System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogStatusByCatalogId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2436,14 +2329,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The given account id | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | ### Return type -[**JsonApiPageResponseOfRetailer**](JsonApiPageResponseOfRetailer.md) +[**JsonApiSingleResponseOfCatalogStatus**](JsonApiSingleResponseOfCatalogStatus.md) ### Authorization @@ -2458,16 +2348,16 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Success | - | +| **200** | Catalog request found. | - | -## getApiV1ExternalAccounts +## getApiV2ExternalAccountLineItemsByAccountId -> JsonApiPageResponseOfAccount getApiV1ExternalAccounts(limitToId, pageIndex, pageSize) +> CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize) -Gets page of account objects that the current user can access +Gets page of line item objects for the given account id ### Example @@ -2508,14 +2398,17 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); + String accountId = "accountId_example"; // String | The given account id + List limitToCampaignId = Arrays.asList(); // List | The campaign ids that you would like to limit your result set to + String limitToType = "Unknown"; // String | The campaign types that you would like to limit your result set to List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request try { - JsonApiPageResponseOfAccount result = apiInstance.getApiV1ExternalAccounts(limitToId, pageIndex, pageSize); + CommonLineItemPagedListResponse result = apiInstance.getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccounts"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalAccountLineItemsByAccountId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2530,13 +2423,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The given account id | | +| **limitToCampaignId** | [**List<String>**](String.md)| The campaign ids that you would like to limit your result set to | [optional] | +| **limitToType** | **String**| The campaign types that you would like to limit your result set to | [optional] [enum: Unknown, Auction, Preferred] | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | | **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | | **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | ### Return type -[**JsonApiPageResponseOfAccount**](JsonApiPageResponseOfAccount.md) +[**CommonLineItemPagedListResponse**](CommonLineItemPagedListResponse.md) ### Authorization @@ -2554,13 +2450,13 @@ public class Example { | **200** | Success | - | -## getApiV1ExternalCatalogOutputByCatalogId +## getApiV2ExternalAuctionLineItemByLineItemId -> File getApiV1ExternalCatalogOutputByCatalogId(catalogId) +> AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(lineItemId) -Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. +Gets the auction line item for the given line item id ### Example @@ -2601,12 +2497,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. + String lineItemId = "lineItemId_example"; // String | The given line item id try { - File result = apiInstance.getApiV1ExternalCatalogOutputByCatalogId(catalogId); + AuctionLineItemResponse result = apiInstance.getApiV2ExternalAuctionLineItemByLineItemId(lineItemId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogOutputByCatalogId"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalAuctionLineItemByLineItemId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2621,11 +2517,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | +| **lineItemId** | **String**| The given line item id | | ### Return type -[**File**](File.md) +[**AuctionLineItemResponse**](AuctionLineItemResponse.md) ### Authorization @@ -2634,23 +2530,23 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/x-json-stream, application/json +- **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Catalog download initiated. | - | -| **400** | The indicated catalog is not available for retrieval, wait for a success status. | - | +| **200** | Success | - | +| **400** | Bad Request | - | -## getApiV1ExternalCatalogStatusByCatalogId +## getApiV2ExternalCampaignAuctionLineItemsByCampaignId -> JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(catalogId) +> AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize) -Check the status of a catalog request. +Gets page of auction line item objects for the given campaign id ### Example @@ -2691,12 +2587,15 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. + String campaignId = "campaignId_example"; // String | The given campaign id + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request try { - JsonApiSingleResponseOfCatalogStatus result = apiInstance.getApiV1ExternalCatalogStatusByCatalogId(catalogId); + AuctionLineItemPagedListResponse result = apiInstance.getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogStatusByCatalogId"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalCampaignAuctionLineItemsByCampaignId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2711,11 +2610,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | +| **campaignId** | **String**| The given campaign id | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | ### Return type -[**JsonApiSingleResponseOfCatalogStatus**](JsonApiSingleResponseOfCatalogStatus.md) +[**AuctionLineItemPagedListResponse**](AuctionLineItemPagedListResponse.md) ### Authorization @@ -2730,16 +2632,17 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Catalog request found. | - | +| **200** | Success | - | +| **400** | Bad Request | - | -## getApiV2ExternalAccountLineItemsByAccountId +## getApiV2ExternalLineItemByLineItemId -> CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize) +> CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(lineItemId) -Gets page of line item objects for the given account id +Gets the line item for the given line item id ### Example @@ -2780,17 +2683,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The given account id - List limitToCampaignId = Arrays.asList(); // List | The campaign ids that you would like to limit your result set to - String limitToType = "Unknown"; // String | The campaign types that you would like to limit your result set to - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + String lineItemId = "lineItemId_example"; // String | The given line item id try { - CommonLineItemPagedListResponse result = apiInstance.getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); + CommonLineItemResponse result = apiInstance.getApiV2ExternalLineItemByLineItemId(lineItemId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalAccountLineItemsByAccountId"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalLineItemByLineItemId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2805,16 +2703,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The given account id | | -| **limitToCampaignId** | [**List<String>**](String.md)| The campaign ids that you would like to limit your result set to | [optional] | -| **limitToType** | **String**| The campaign types that you would like to limit your result set to | [optional] [enum: Unknown, Auction, Preferred] | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **lineItemId** | **String**| The given line item id | | ### Return type -[**CommonLineItemPagedListResponse**](CommonLineItemPagedListResponse.md) +[**CommonLineItemResponse**](CommonLineItemResponse.md) ### Authorization @@ -2832,13 +2725,13 @@ public class Example { | **200** | Success | - | -## getApiV2ExternalAuctionLineItemByLineItemId +## getCampaignBudgetOverrides -> AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(lineItemId) +> ValueResourceOutcomeOfCampaignBudgetOverrides getCampaignBudgetOverrides(campaignId) -Gets the auction line item for the given line item id +Get current campaign budget overrides by given external campaign id. ### Example @@ -2879,12 +2772,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String lineItemId = "lineItemId_example"; // String | The given line item id + Long campaignId = 56L; // Long | External campaign id. try { - AuctionLineItemResponse result = apiInstance.getApiV2ExternalAuctionLineItemByLineItemId(lineItemId); + ValueResourceOutcomeOfCampaignBudgetOverrides result = apiInstance.getCampaignBudgetOverrides(campaignId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalAuctionLineItemByLineItemId"); + System.err.println("Exception when calling CampaignApi#getCampaignBudgetOverrides"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2899,286 +2792,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **lineItemId** | **String**| The given line item id | | +| **campaignId** | **Long**| External campaign id. | | ### Return type -[**AuctionLineItemResponse**](AuctionLineItemResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | -| **400** | Bad Request | - | - - -## getApiV2ExternalCampaignAuctionLineItemsByCampaignId - -> AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize) - - - -Gets page of auction line item objects for the given campaign id - -### Example - -```java -package com.criteo.api.retailmedia.v2024_04; - -import com.criteo.api.retailmedia.v2024_04.ApiClient; -import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_04.ApiException; -import com.criteo.api.retailmedia.v2024_04.Configuration; -import com.criteo.api.retailmedia.v2024_04.auth.*; -import com.criteo.api.retailmedia.v2024_04.model.*; -import com.criteo.api.retailmedia.v2024_04.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String campaignId = "campaignId_example"; // String | The given campaign id - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request - try { - AuctionLineItemPagedListResponse result = apiInstance.getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalCampaignAuctionLineItemsByCampaignId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The given campaign id | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | - -### Return type - -[**AuctionLineItemPagedListResponse**](AuctionLineItemPagedListResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | -| **400** | Bad Request | - | - - -## getApiV2ExternalLineItemByLineItemId - -> CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(lineItemId) - - - -Gets the line item for the given line item id - -### Example - -```java -package com.criteo.api.retailmedia.v2024_04; - -import com.criteo.api.retailmedia.v2024_04.ApiClient; -import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_04.ApiException; -import com.criteo.api.retailmedia.v2024_04.Configuration; -import com.criteo.api.retailmedia.v2024_04.auth.*; -import com.criteo.api.retailmedia.v2024_04.model.*; -import com.criteo.api.retailmedia.v2024_04.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String lineItemId = "lineItemId_example"; // String | The given line item id - try { - CommonLineItemResponse result = apiInstance.getApiV2ExternalLineItemByLineItemId(lineItemId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalLineItemByLineItemId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **lineItemId** | **String**| The given line item id | | - -### Return type - -[**CommonLineItemResponse**](CommonLineItemResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## getCampaignBudgetOverrides - -> ValueResourceOutcomeOfCampaignBudgetOverrides getCampaignBudgetOverrides(campaignId) - - - -Get current campaign budget overrides by given external campaign id. - -### Example - -```java -package com.criteo.api.retailmedia.v2024_04; - -import com.criteo.api.retailmedia.v2024_04.ApiClient; -import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_04.ApiException; -import com.criteo.api.retailmedia.v2024_04.Configuration; -import com.criteo.api.retailmedia.v2024_04.auth.*; -import com.criteo.api.retailmedia.v2024_04.model.*; -import com.criteo.api.retailmedia.v2024_04.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - Long campaignId = 56L; // Long | External campaign id. - try { - ValueResourceOutcomeOfCampaignBudgetOverrides result = apiInstance.getCampaignBudgetOverrides(campaignId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getCampaignBudgetOverrides"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **campaignId** | **Long**| External campaign id. | | - -### Return type - -[**ValueResourceOutcomeOfCampaignBudgetOverrides**](ValueResourceOutcomeOfCampaignBudgetOverrides.md) +[**ValueResourceOutcomeOfCampaignBudgetOverrides**](ValueResourceOutcomeOfCampaignBudgetOverrides.md) ### Authorization @@ -3269,100 +2887,11 @@ public class Example { | **insertionOrderId** | **String**| External insertion order id. | | | **offset** | **Integer**| The (zero-based) starting offset in the collection. | [optional] [default to 0] | | **limit** | **Integer**| The number of elements to be returned. | [optional] [default to 25] | -| **limitToChangeTypes** | **String**| Comma separated change types string that will be queried. | [optional] | - -### Return type - -[**PageOfInsertionOrderHistoryChangeDataCapture**](PageOfInsertionOrderHistoryChangeDataCapture.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## getLineItemBudgetOverrides - -> ValueResourceOutcomeOfLineItemBudgetOverrides getLineItemBudgetOverrides(lineItemId) - - - -Gets a collection of monthly and daily budget overrides for the provided line item. - -### Example - -```java -package com.criteo.api.retailmedia.v2024_04; - -import com.criteo.api.retailmedia.v2024_04.ApiClient; -import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_04.ApiException; -import com.criteo.api.retailmedia.v2024_04.Configuration; -import com.criteo.api.retailmedia.v2024_04.auth.*; -import com.criteo.api.retailmedia.v2024_04.model.*; -import com.criteo.api.retailmedia.v2024_04.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String lineItemId = "lineItemId_example"; // String | The line item id to get budget overrides for. - try { - ValueResourceOutcomeOfLineItemBudgetOverrides result = apiInstance.getLineItemBudgetOverrides(lineItemId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getLineItemBudgetOverrides"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **lineItemId** | **String**| The line item id to get budget overrides for. | | +| **limitToChangeTypes** | **String**| Comma separated change types string that will be queried. | [optional] | ### Return type -[**ValueResourceOutcomeOfLineItemBudgetOverrides**](ValueResourceOutcomeOfLineItemBudgetOverrides.md) +[**PageOfInsertionOrderHistoryChangeDataCapture**](PageOfInsertionOrderHistoryChangeDataCapture.md) ### Authorization @@ -3380,13 +2909,13 @@ public class Example { | **200** | Success | - | -## patchApiV1ExternalAccountByAccountIdAndBalanceId +## getLineItemBudgetOverrides -> BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest) +> ValueResourceOutcomeOfLineItemBudgetOverrides getLineItemBudgetOverrides(lineItemId) -Modify a balance for the given account id +Gets a collection of monthly and daily budget overrides for the provided line item. ### Example @@ -3427,14 +2956,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account of the balance - String balanceId = "balanceId_example"; // String | The balance to change the dates - UpdateBalanceModelRequest updateBalanceModelRequest = new UpdateBalanceModelRequest(); // UpdateBalanceModelRequest | + String lineItemId = "lineItemId_example"; // String | The line item id to get budget overrides for. try { - BalanceResponse result = apiInstance.patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest); + ValueResourceOutcomeOfLineItemBudgetOverrides result = apiInstance.getLineItemBudgetOverrides(lineItemId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#patchApiV1ExternalAccountByAccountIdAndBalanceId"); + System.err.println("Exception when calling CampaignApi#getLineItemBudgetOverrides"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -3449,13 +2976,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account of the balance | | -| **balanceId** | **String**| The balance to change the dates | | -| **updateBalanceModelRequest** | [**UpdateBalanceModelRequest**](UpdateBalanceModelRequest.md)| | [optional] | +| **lineItemId** | **String**| The line item id to get budget overrides for. | | ### Return type -[**BalanceResponse**](BalanceResponse.md) +[**ValueResourceOutcomeOfLineItemBudgetOverrides**](ValueResourceOutcomeOfLineItemBudgetOverrides.md) ### Authorization @@ -3463,7 +2988,7 @@ public class Example { ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json @@ -5118,190 +4643,6 @@ public class Example { | **201** | Success | - | -## postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId - -> BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest) - - - -Add funds to a balance for the given account id - -### Example - -```java -package com.criteo.api.retailmedia.v2024_04; - -import com.criteo.api.retailmedia.v2024_04.ApiClient; -import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_04.ApiException; -import com.criteo.api.retailmedia.v2024_04.Configuration; -import com.criteo.api.retailmedia.v2024_04.auth.*; -import com.criteo.api.retailmedia.v2024_04.model.*; -import com.criteo.api.retailmedia.v2024_04.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account of the balance - String balanceId = "balanceId_example"; // String | The balance to add funds to - AddFundsToBalanceRequest addFundsToBalanceRequest = new AddFundsToBalanceRequest(); // AddFundsToBalanceRequest | - try { - BalanceResponse result = apiInstance.postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account of the balance | | -| **balanceId** | **String**| The balance to add funds to | | -| **addFundsToBalanceRequest** | [**AddFundsToBalanceRequest**](AddFundsToBalanceRequest.md)| | [optional] | - -### Return type - -[**BalanceResponse**](BalanceResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## postApiV1ExternalAccountBalancesByAccountId - -> BalanceResponse postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest) - - - -Create balance for the given account id - -### Example - -```java -package com.criteo.api.retailmedia.v2024_04; - -import com.criteo.api.retailmedia.v2024_04.ApiClient; -import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_04.ApiException; -import com.criteo.api.retailmedia.v2024_04.Configuration; -import com.criteo.api.retailmedia.v2024_04.auth.*; -import com.criteo.api.retailmedia.v2024_04.model.*; -import com.criteo.api.retailmedia.v2024_04.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account to create balances for - CreateBalanceRequest createBalanceRequest = new CreateBalanceRequest(); // CreateBalanceRequest | - try { - BalanceResponse result = apiInstance.postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#postApiV1ExternalAccountBalancesByAccountId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account to create balances for | | -| **createBalanceRequest** | [**CreateBalanceRequest**](CreateBalanceRequest.md)| | [optional] | - -### Return type - -[**BalanceResponse**](BalanceResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Success | - | - - ## postApiV1ExternalAccountCatalogsByAccountId > JsonApiSingleResponseOfCatalogStatus postApiV1ExternalAccountCatalogsByAccountId(accountId, jsonApiRequestOfCatalogRequest) @@ -5393,99 +4734,6 @@ public class Example { | **200** | Catalog request successfully created | - | -## postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId - -> BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest) - - - -Change dates of a balance for the given account id - -### Example - -```java -package com.criteo.api.retailmedia.v2024_04; - -import com.criteo.api.retailmedia.v2024_04.ApiClient; -import com.criteo.api.retailmedia.v2024_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2024_04.ApiException; -import com.criteo.api.retailmedia.v2024_04.Configuration; -import com.criteo.api.retailmedia.v2024_04.auth.*; -import com.criteo.api.retailmedia.v2024_04.model.*; -import com.criteo.api.retailmedia.v2024_04.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account of the balance - String balanceId = "balanceId_example"; // String | The balance to change the dates - ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest = new ChangeDatesOfBalanceRequest(); // ChangeDatesOfBalanceRequest | - try { - BalanceResponse result = apiInstance.postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account of the balance | | -| **balanceId** | **String**| The balance to change the dates | | -| **changeDatesOfBalanceRequest** | [**ChangeDatesOfBalanceRequest**](ChangeDatesOfBalanceRequest.md)| | [optional] | - -### Return type - -[**BalanceResponse**](BalanceResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - ## postApiV2ExternalCampaignAuctionLineItemsByCampaignId > AuctionLineItemResponse postApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, auctionLineItemCreateModelRequest) diff --git a/sdks/retailmedia_2024-04/docs/CommonProblem.md b/sdks/retailmedia_2024-04/docs/CommonProblem.md index 1ee7a1f1..3f7f164b 100644 --- a/sdks/retailmedia_2024-04/docs/CommonProblem.md +++ b/sdks/retailmedia_2024-04/docs/CommonProblem.md @@ -2,7 +2,7 @@ # CommonProblem -Common problem object. Can be specialized as needed. +Common problem object. ## Properties @@ -11,7 +11,7 @@ Common problem object. Can be specialized as needed. |**traceId** | **String** | The request correlation ID this problem comes from. | [optional] | |**traceIdentifier** | **String** | The request correlation ID this problem comes from. (deprecated, use traceId instead) | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The problem's category. | [optional] | -|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | +|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | |**instance** | **String** | A URI that identifies the specific occurrence of the problem. | [optional] | |**title** | **String** | A short human-readable description of the problem type | [optional] | |**detail** | **String** | A human-readable explanation specific to this occurrence of the problem | [optional] | diff --git a/sdks/retailmedia_2024-04/docs/ExternalBalanceResponse.md b/sdks/retailmedia_2024-04/docs/ExternalBalanceResponse.md index 15a6dde1..127b9534 100644 --- a/sdks/retailmedia_2024-04/docs/ExternalBalanceResponse.md +++ b/sdks/retailmedia_2024-04/docs/ExternalBalanceResponse.md @@ -22,6 +22,7 @@ A Retail Media Balance used to determine the funds available for any or all camp |**balanceType** | [**BalanceTypeEnum**](#BalanceTypeEnum) | Type of the balance | | |**salesForceId** | **String** | SalesForceId the balance is linked to. | | |**spendType** | [**SpendTypeEnum**](#SpendTypeEnum) | Spend Type of the balance. | | +|**privateMarketBillingType** | [**PrivateMarketBillingTypeEnum**](#PrivateMarketBillingTypeEnum) | Billing type for Private Market. | | @@ -56,3 +57,14 @@ A Retail Media Balance used to determine the funds available for any or all camp +## Enum: PrivateMarketBillingTypeEnum + +| Name | Value | +|---- | -----| +| NOTAPPLICABLE | "NotApplicable" | +| BILLBYRETAILER | "BillByRetailer" | +| BILLBYCRITEO | "BillByCriteo" | +| UNKNOWN | "Unknown" | + + + diff --git a/sdks/retailmedia_2024-04/docs/JsonApiPageResponseOfAccount.md b/sdks/retailmedia_2024-04/docs/JsonApiPageResponseOfAccount.md index af50ec88..aa059cfb 100644 --- a/sdks/retailmedia_2024-04/docs/JsonApiPageResponseOfAccount.md +++ b/sdks/retailmedia_2024-04/docs/JsonApiPageResponseOfAccount.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndAccountAndAccount>**](JsonApiBodyWithIdOfInt64AndAccountAndAccount.md) | | | diff --git a/sdks/retailmedia_2024-04/docs/JsonApiPageResponseOfBrand.md b/sdks/retailmedia_2024-04/docs/JsonApiPageResponseOfBrand.md index 0c2714ac..83498f93 100644 --- a/sdks/retailmedia_2024-04/docs/JsonApiPageResponseOfBrand.md +++ b/sdks/retailmedia_2024-04/docs/JsonApiPageResponseOfBrand.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndBrandAndBrand>**](JsonApiBodyWithIdOfInt64AndBrandAndBrand.md) | | | diff --git a/sdks/retailmedia_2024-04/docs/JsonApiPageResponseOfRetailer.md b/sdks/retailmedia_2024-04/docs/JsonApiPageResponseOfRetailer.md index e62ca2fd..4c29b7d7 100644 --- a/sdks/retailmedia_2024-04/docs/JsonApiPageResponseOfRetailer.md +++ b/sdks/retailmedia_2024-04/docs/JsonApiPageResponseOfRetailer.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndRetailerAndRetailer>**](JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md) | | | diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/ApiClient.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/ApiClient.java index 210808a0..07660619 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/ApiClient.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/ApiClient.java @@ -213,7 +213,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2024.04.0.240626/java"); + setUserAgent("OpenAPI-Generator/2024.04.0.240731/java"); authentications = new HashMap(); } diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/api/AccountsApi.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/api/AccountsApi.java index cd44b411..eb4da20b 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/api/AccountsApi.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/api/AccountsApi.java @@ -27,6 +27,7 @@ import java.io.IOException; +import com.criteo.api.retailmedia.v2024_04.model.JsonApiPageResponseOfAccount; import com.criteo.api.retailmedia.v2024_04.model.ResourceOutcomeOfRetailMediaAccount; import com.criteo.api.retailmedia.v2024_04.model.ValueResourceInputOfRetailMediaBrandAccountCreation; import com.criteo.api.retailmedia.v2024_04.model.ValueResourceInputOfRetailMediaBrands; @@ -338,10 +339,149 @@ public okhttp3.Call createPrivateMarketDemandBrandAccountAsync(String accountId, localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getApiV1ExternalAccounts + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-04/retail-media/accounts"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + return getApiV1ExternalAccountsCall(limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return JsonApiPageResponseOfAccount + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountsWithHttpInfo(limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return ApiResponse<JsonApiPageResponseOfAccount> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV1ExternalAccountsWithHttpInfo(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountsAsync(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for removeBrands - * @param accountId the account id to update (required) - * @param valueResourceInputOfRetailMediaBrands (optional) + * @param accountId The account id to update (required) + * @param valueResourceInputOfRetailMediaBrands Brands to remove from account (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -414,8 +554,8 @@ private okhttp3.Call removeBrandsValidateBeforeCall(String accountId, ValueResou /** * * Remove a brand from an account - * @param accountId the account id to update (required) - * @param valueResourceInputOfRetailMediaBrands (optional) + * @param accountId The account id to update (required) + * @param valueResourceInputOfRetailMediaBrands Brands to remove from account (optional) * @return ValueResourceOfRetailMediaBrands * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -432,8 +572,8 @@ public ValueResourceOfRetailMediaBrands removeBrands(String accountId, ValueReso /** * * Remove a brand from an account - * @param accountId the account id to update (required) - * @param valueResourceInputOfRetailMediaBrands (optional) + * @param accountId The account id to update (required) + * @param valueResourceInputOfRetailMediaBrands Brands to remove from account (optional) * @return ApiResponse<ValueResourceOfRetailMediaBrands> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -451,8 +591,8 @@ public ApiResponse removeBrandsWithHttpInfo(St /** * (asynchronously) * Remove a brand from an account - * @param accountId the account id to update (required) - * @param valueResourceInputOfRetailMediaBrands (optional) + * @param accountId The account id to update (required) + * @param valueResourceInputOfRetailMediaBrands Brands to remove from account (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/api/BalanceApi.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/api/BalanceApi.java new file mode 100644 index 00000000..d349bd3d --- /dev/null +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/api/BalanceApi.java @@ -0,0 +1,1051 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-04 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_04.api; + +import com.criteo.api.retailmedia.v2024_04.ApiCallback; +import com.criteo.api.retailmedia.v2024_04.ApiClient; +import com.criteo.api.retailmedia.v2024_04.ApiException; +import com.criteo.api.retailmedia.v2024_04.ApiResponse; +import com.criteo.api.retailmedia.v2024_04.Configuration; +import com.criteo.api.retailmedia.v2024_04.Pair; +import com.criteo.api.retailmedia.v2024_04.ProgressRequestBody; +import com.criteo.api.retailmedia.v2024_04.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.criteo.api.retailmedia.v2024_04.model.AddFundsToBalanceRequest; +import com.criteo.api.retailmedia.v2024_04.model.BalanceCampaign202110PagedListResponse; +import com.criteo.api.retailmedia.v2024_04.model.BalanceResponse; +import com.criteo.api.retailmedia.v2024_04.model.BalanceResponsePagedListResponse; +import com.criteo.api.retailmedia.v2024_04.model.ChangeDatesOfBalanceRequest; +import com.criteo.api.retailmedia.v2024_04.model.CreateBalanceRequest; +import com.criteo.api.retailmedia.v2024_04.model.UpdateBalanceModelRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class BalanceApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public BalanceApi() { + this(Configuration.getDefaultApiClient()); + } + + public BalanceApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getApi202110ExternalBalanceCampaignsByBalanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-04/retail-media/balances/{balance-id}/campaigns" + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling getApi202110ExternalBalanceCampaignsByBalanceId(Async)"); + } + + return getApi202110ExternalBalanceCampaignsByBalanceIdCall(balanceId, limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return BalanceCampaign202110PagedListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(balanceId, limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return ApiResponse<BalanceCampaign202110PagedListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdAsync(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiV1ExternalAccountBalancesByAccountId + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-04/retail-media/accounts/{account-id}/balances" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountBalancesByAccountId(Async)"); + } + + return getApiV1ExternalAccountBalancesByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Get page of balances for the given accountId. + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return BalanceResponsePagedListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Get page of balances for the given accountId. + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return ApiResponse<BalanceResponsePagedListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get page of balances for the given accountId. + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiV1ExternalAccountByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-04/retail-media/accounts/{account-id}/balances/{balanceId}" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + return getApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, _callback); + + } + + /** + * + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId); + return localVarResp.getData(); + } + + /** + * + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for patchApiV1ExternalAccountByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateBalanceModelRequest; + + // create path and map variables + String localVarPath = "/2024-04/retail-media/accounts/{account-id}/balances/{balanceId}" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + return patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, updateBalanceModelRequest, _callback); + + } + + /** + * + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { + ApiResponse localVarResp = patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, updateBalanceModelRequest); + return localVarResp.getData(); + } + + /** + * + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { + okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = addFundsToBalanceRequest; + + // create path and map variables + String localVarPath = "/2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); + } + + return postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(accountId, balanceId, addFundsToBalanceRequest, _callback); + + } + + /** + * + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, addFundsToBalanceRequest); + return localVarResp.getData(); + } + + /** + * + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdAsync(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV1ExternalAccountBalancesByAccountId + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createBalanceRequest; + + // create path and map variables + String localVarPath = "/2024-04/retail-media/accounts/{account-id}/balances" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountBalancesByAccountId(Async)"); + } + + return postApiV1ExternalAccountBalancesByAccountIdCall(accountId, createBalanceRequest, _callback); + + } + + /** + * + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public BalanceResponse postApiV1ExternalAccountBalancesByAccountId(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, createBalanceRequest); + return localVarResp.getData(); + } + + /** + * + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public ApiResponse postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = changeDatesOfBalanceRequest; + + // create path and map variables + String localVarPath = "/2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); + } + + return postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); + + } + + /** + * + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, changeDatesOfBalanceRequest); + return localVarResp.getData(); + } + + /** + * + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdAsync(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/api/CampaignApi.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/api/CampaignApi.java index ad57e628..7bf2c364 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/api/CampaignApi.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/api/CampaignApi.java @@ -27,7 +27,6 @@ import java.io.IOException; -import com.criteo.api.retailmedia.v2024_04.model.AddFundsToBalanceRequest; import com.criteo.api.retailmedia.v2024_04.model.AddRemoveKeywordsModelRequest; import com.criteo.api.retailmedia.v2024_04.model.AddToBasketIdsUpdateModel202110Request; import com.criteo.api.retailmedia.v2024_04.model.AddToBasketTarget202110Request; @@ -42,14 +41,10 @@ import com.criteo.api.retailmedia.v2024_04.model.AudienceTarget202110Response; import com.criteo.api.retailmedia.v2024_04.model.BalanceCampaign202110ListRequest; import com.criteo.api.retailmedia.v2024_04.model.BalanceCampaign202110PagedListResponse; -import com.criteo.api.retailmedia.v2024_04.model.BalanceResponse; -import com.criteo.api.retailmedia.v2024_04.model.BalanceResponsePagedListResponse; import com.criteo.api.retailmedia.v2024_04.model.Category202204; import com.criteo.api.retailmedia.v2024_04.model.Category202204ListResponse; -import com.criteo.api.retailmedia.v2024_04.model.ChangeDatesOfBalanceRequest; import com.criteo.api.retailmedia.v2024_04.model.CommonLineItemPagedListResponse; import com.criteo.api.retailmedia.v2024_04.model.CommonLineItemResponse; -import com.criteo.api.retailmedia.v2024_04.model.CreateBalanceRequest; import com.criteo.api.retailmedia.v2024_04.model.Creative202110ListResponse; import com.criteo.api.retailmedia.v2024_04.model.Creative202210ListResponse; import com.criteo.api.retailmedia.v2024_04.model.Creative202210Response; @@ -57,7 +52,6 @@ import com.criteo.api.retailmedia.v2024_04.model.CreativeUpdateModel202207; import com.criteo.api.retailmedia.v2024_04.model.ExternalRetailerPages202110; import java.io.File; -import com.criteo.api.retailmedia.v2024_04.model.JsonApiPageResponseOfAccount; import com.criteo.api.retailmedia.v2024_04.model.JsonApiPageResponseOfBrand; import com.criteo.api.retailmedia.v2024_04.model.JsonApiPageResponseOfCampaignV202301; import com.criteo.api.retailmedia.v2024_04.model.JsonApiPageResponseOfRetailer; @@ -87,7 +81,6 @@ import com.criteo.api.retailmedia.v2024_04.model.StoreTarget202110Response; import com.criteo.api.retailmedia.v2024_04.model.TemplateListResponse; import com.criteo.api.retailmedia.v2024_04.model.TemplateResponse; -import com.criteo.api.retailmedia.v2024_04.model.UpdateBalanceModelRequest; import com.criteo.api.retailmedia.v2024_04.model.ValueResourceInputOfCampaignBudgetOverrides; import com.criteo.api.retailmedia.v2024_04.model.ValueResourceInputOfLineItemBudgetOverrides; import com.criteo.api.retailmedia.v2024_04.model.ValueResourceOutcomeOfCampaignBudgetOverrides; @@ -906,153 +899,6 @@ public okhttp3.Call getApi202110ExternalAuctionLineItemTargetingKeywordsByLineIt localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getApi202110ExternalBalanceCampaignsByBalanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-04/retail-media/balances/{balance-id}/campaigns" - .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling getApi202110ExternalBalanceCampaignsByBalanceId(Async)"); - } - - return getApi202110ExternalBalanceCampaignsByBalanceIdCall(balanceId, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return BalanceCampaign202110PagedListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(balanceId, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<BalanceCampaign202110PagedListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdAsync(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getApi202110ExternalCampaignPreferredLineItemsByCampaignId * @param campaignId The given campaign id (required) @@ -3043,8 +2889,8 @@ public okhttp3.Call getApi202301ExternalLineItemBidMultipliersByLineItemIdAsync( return localVarCall; } /** - * Build call for getApiV1ExternalAccountBalancesByAccountId - * @param accountId The account to get page of balances for (required) + * Build call for getApiV1ExternalAccountBrandsByAccountId + * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) @@ -3057,7 +2903,7 @@ public okhttp3.Call getApi202301ExternalLineItemBidMultipliersByLineItemIdAsync( 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3074,8 +2920,8 @@ public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accoun Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts/{account-id}/balances" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2024-04/retail-media/accounts/{accountId}/brands" + .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3096,7 +2942,9 @@ public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accoun } final String[] localVarAccepts = { - "application/json" + "text/plain", + "application/json", + "text/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3115,24 +2963,24 @@ public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accoun } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountBalancesByAccountId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountBrandsByAccountId(Async)"); } - return getApiV1ExternalAccountBalancesByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + return getApiV1ExternalAccountBrandsByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); } /** * - * Get page of balances for the given accountId. - * @param accountId The account to get page of balances for (required) + * Gets page of retailer objects that are associated with the given account + * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) - * @return BalanceResponsePagedListResponse + * @return JsonApiPageResponseOfBrand * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3140,19 +2988,19 @@ private okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCal
200 Success -
*/ - public BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountBrandsByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); return localVarResp.getData(); } /** * - * Get page of balances for the given accountId. - * @param accountId The account to get page of balances for (required) + * Gets page of retailer objects that are associated with the given account + * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) - * @return ApiResponse<BalanceResponsePagedListResponse> + * @return ApiResponse<JsonApiPageResponseOfBrand> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3160,16 +3008,16 @@ public BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccount
200 Success -
*/ - public ApiResponse getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV1ExternalAccountBrandsByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Get page of balances for the given accountId. - * @param accountId The account to get page of balances for (required) + * Gets page of retailer objects that are associated with the given account + * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) @@ -3182,19 +3030,19 @@ public ApiResponse getApiV1ExternalAccountBala 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalAccountBrandsByAccountId + * Build call for getApiV1ExternalAccountRetailersByAccountId * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3204,7 +3052,7 @@ public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdAsync(String accou 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3221,7 +3069,7 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts/{accountId}/brands" + String localVarPath = "/2024-04/retail-media/accounts/{accountId}/retailers" .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -3243,7 +3091,9 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountI } final String[] localVarAccepts = { - "application/json" + "text/plain", + "application/json", + "text/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3262,13 +3112,13 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountI } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountBrandsByAccountId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountRetailersByAccountId(Async)"); } - return getApiV1ExternalAccountBrandsByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + return getApiV1ExternalAccountRetailersByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); } @@ -3277,9 +3127,9 @@ private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall( * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return JsonApiPageResponseOfBrand + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return JsonApiPageResponseOfRetailer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3287,8 +3137,8 @@ private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(
200 Success -
*/ - public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountBrandsByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + public JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountRetailersByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); return localVarResp.getData(); } @@ -3297,9 +3147,9 @@ public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(Strin * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<JsonApiPageResponseOfBrand> + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return ApiResponse<JsonApiPageResponseOfRetailer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3307,9 +3157,9 @@ public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(Strin
200 Success -
*/ - public ApiResponse getApiV1ExternalAccountBrandsByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV1ExternalAccountRetailersByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -3318,8 +3168,8 @@ public ApiResponse getApiV1ExternalAccountBrandsByAc * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3329,27 +3179,27 @@ public ApiResponse getApiV1ExternalAccountBrandsByAc 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalAccountByAccountIdAndBalanceId - * @param accountId The account of the balance (required) - * @param balanceId The balance id (required) + * Build call for getApiV1ExternalCatalogOutputByCatalogId + * @param catalogId A catalog ID returned from an account catalog request. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Success -
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
*/ - public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdCall(String catalogId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3366,9 +3216,8 @@ public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String ac Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts/{account-id}/balances/{balanceId}" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2024-04/retail-media/catalogs/{catalogId}/output" + .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3377,6 +3226,7 @@ public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String ac Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + "application/x-json-stream", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); @@ -3396,95 +3246,87 @@ public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String ac } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); - } - - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + private okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(String catalogId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'catalogId' is set + if (catalogId == null) { + throw new ApiException("Missing the required parameter 'catalogId' when calling getApiV1ExternalCatalogOutputByCatalogId(Async)"); } - return getApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, _callback); + return getApiV1ExternalCatalogOutputByCatalogIdCall(catalogId, _callback); } /** * - * Get a balance for the given account id and balance id - * @param accountId The account of the balance (required) - * @param balanceId The balance id (required) - * @return BalanceResponse + * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. + * @param catalogId A catalog ID returned from an account catalog request. (required) + * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Success -
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
*/ - public BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId); + public File getApiV1ExternalCatalogOutputByCatalogId(String catalogId) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalCatalogOutputByCatalogIdWithHttpInfo(catalogId); return localVarResp.getData(); } /** * - * Get a balance for the given account id and balance id - * @param accountId The account of the balance (required) - * @param balanceId The balance id (required) - * @return ApiResponse<BalanceResponse> + * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. + * @param catalogId A catalog ID returned from an account catalog request. (required) + * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Success -
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
*/ - public ApiResponse getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV1ExternalCatalogOutputByCatalogIdWithHttpInfo(String catalogId) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(catalogId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Get a balance for the given account id and balance id - * @param accountId The account of the balance (required) - * @param balanceId The balance id (required) + * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. + * @param catalogId A catalog ID returned from an account catalog request. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Success -
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
*/ - public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdAsync(String catalogId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(catalogId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalAccountRetailersByAccountId - * @param accountId The given account id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * Build call for getApiV1ExternalCatalogStatusByCatalogId + * @param catalogId A catalog ID returned from an account catalog request. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request found. -
*/ - public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdCall(String catalogId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3501,8 +3343,8 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accou Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts/{accountId}/retailers" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2024-04/retail-media/catalogs/{catalogId}/status" + .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3510,18 +3352,6 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accou Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - final String[] localVarAccepts = { "application/json" }; @@ -3542,82 +3372,76 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accou } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountRetailersByAccountId(Async)"); + private okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(String catalogId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'catalogId' is set + if (catalogId == null) { + throw new ApiException("Missing the required parameter 'catalogId' when calling getApiV1ExternalCatalogStatusByCatalogId(Async)"); } - return getApiV1ExternalAccountRetailersByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + return getApiV1ExternalCatalogStatusByCatalogIdCall(catalogId, _callback); } /** * - * Gets page of retailer objects that are associated with the given account - * @param accountId The given account id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return JsonApiPageResponseOfRetailer + * Check the status of a catalog request. + * @param catalogId A catalog ID returned from an account catalog request. (required) + * @return JsonApiSingleResponseOfCatalogStatus * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request found. -
*/ - public JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountRetailersByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + public JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(String catalogId) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalCatalogStatusByCatalogIdWithHttpInfo(catalogId); return localVarResp.getData(); } /** * - * Gets page of retailer objects that are associated with the given account - * @param accountId The given account id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<JsonApiPageResponseOfRetailer> + * Check the status of a catalog request. + * @param catalogId A catalog ID returned from an account catalog request. (required) + * @return ApiResponse<JsonApiSingleResponseOfCatalogStatus> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request found. -
*/ - public ApiResponse getApiV1ExternalAccountRetailersByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV1ExternalCatalogStatusByCatalogIdWithHttpInfo(String catalogId) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(catalogId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Gets page of retailer objects that are associated with the given account - * @param accountId The given account id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * Check the status of a catalog request. + * @param catalogId A catalog ID returned from an account catalog request. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request found. -
*/ - public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdAsync(String catalogId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(catalogId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalAccounts + * Build call for getApiV2ExternalAccountLineItemsByAccountId + * @param accountId The given account id (required) + * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) + * @param limitToType The campaign types that you would like to limit your result set to (optional) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) * @param pageSize The maximum number of items you would like to receive in this request (optional) @@ -3630,7 +3454,7 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdAsync(String acco 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdCall(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3647,7 +3471,8 @@ public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts"; + String localVarPath = "/2024-04/retail-media/accounts/{account-id}/line-items" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3655,6 +3480,14 @@ public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (limitToCampaignId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToCampaignId", limitToCampaignId)); + } + + if (limitToType != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limitToType", limitToType)); + } + if (limitToId != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); } @@ -3687,18 +3520,26 @@ public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - return getApiV1ExternalAccountsCall(limitToId, pageIndex, pageSize, _callback); + private okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV2ExternalAccountLineItemsByAccountId(Async)"); + } + + return getApiV2ExternalAccountLineItemsByAccountIdCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, _callback); } /** * - * Gets page of account objects that the current user can access + * Gets page of line item objects for the given account id + * @param accountId The given account id (required) + * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) + * @param limitToType The campaign types that you would like to limit your result set to (optional) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return JsonApiPageResponseOfAccount + * @return CommonLineItemPagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3706,18 +3547,21 @@ private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List lim
200 Success -
*/ - public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountsWithHttpInfo(limitToId, pageIndex, pageSize); + public CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalAccountLineItemsByAccountIdWithHttpInfo(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); return localVarResp.getData(); } /** * - * Gets page of account objects that the current user can access + * Gets page of line item objects for the given account id + * @param accountId The given account id (required) + * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) + * @param limitToType The campaign types that you would like to limit your result set to (optional) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<JsonApiPageResponseOfAccount> + * @return ApiResponse<CommonLineItemPagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3725,15 +3569,18 @@ public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitT
200 Success -
*/ - public ApiResponse getApiV1ExternalAccountsWithHttpInfo(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV2ExternalAccountLineItemsByAccountIdWithHttpInfo(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Gets page of account objects that the current user can access + * Gets page of line item objects for the given account id + * @param accountId The given account id (required) + * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) + * @param limitToType The campaign types that you would like to limit your result set to (optional) * @param limitToId The ids that you would like to limit your result set to (optional) * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) * @param pageSize The maximum number of items you would like to receive in this request (optional) @@ -3746,27 +3593,27 @@ public ApiResponse getApiV1ExternalAccountsWithHtt 200 Success - */ - public okhttp3.Call getApiV1ExternalAccountsAsync(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdAsync(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalCatalogOutputByCatalogId - * @param catalogId A catalog ID returned from an account catalog request. (required) + * Build call for getApiV2ExternalAuctionLineItemByLineItemId + * @param lineItemId The given line item id (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - + +
Status Code Description Response Headers
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdCall(String catalogId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3783,8 +3630,8 @@ public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdCall(String catalogI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-04/retail-media/catalogs/{catalogId}/output" - .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); + String localVarPath = "/2024-04/retail-media/auction-line-items/{line-item-id}" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3793,7 +3640,6 @@ public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdCall(String catalogI Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/x-json-stream", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); @@ -3813,87 +3659,91 @@ public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdCall(String catalogI } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(String catalogId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'catalogId' is set - if (catalogId == null) { - throw new ApiException("Missing the required parameter 'catalogId' when calling getApiV1ExternalCatalogOutputByCatalogId(Async)"); + private okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalAuctionLineItemByLineItemId(Async)"); } - return getApiV1ExternalCatalogOutputByCatalogIdCall(catalogId, _callback); + return getApiV2ExternalAuctionLineItemByLineItemIdCall(lineItemId, _callback); } /** * - * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @return File + * Gets the auction line item for the given line item id + * @param lineItemId The given line item id (required) + * @return AuctionLineItemResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + +
Status Code Description Response Headers
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
200 Success -
400 Bad Request -
*/ - public File getApiV1ExternalCatalogOutputByCatalogId(String catalogId) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalCatalogOutputByCatalogIdWithHttpInfo(catalogId); + public AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(String lineItemId) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalAuctionLineItemByLineItemIdWithHttpInfo(lineItemId); return localVarResp.getData(); } /** * - * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @return ApiResponse<File> + * Gets the auction line item for the given line item id + * @param lineItemId The given line item id (required) + * @return ApiResponse<AuctionLineItemResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + +
Status Code Description Response Headers
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
200 Success -
400 Bad Request -
*/ - public ApiResponse getApiV1ExternalCatalogOutputByCatalogIdWithHttpInfo(String catalogId) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(catalogId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV2ExternalAuctionLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(lineItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. - * @param catalogId A catalog ID returned from an account catalog request. (required) + * Gets the auction line item for the given line item id + * @param lineItemId The given line item id (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - + +
Status Code Description Response Headers
200 Catalog download initiated. -
400 The indicated catalog is not available for retrieval, wait for a success status. -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdAsync(String catalogId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalCatalogOutputByCatalogIdValidateBeforeCall(catalogId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV1ExternalCatalogStatusByCatalogId - * @param catalogId A catalog ID returned from an account catalog request. (required) + * Build call for getApiV2ExternalCampaignAuctionLineItemsByCampaignId + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Catalog request found. -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdCall(String catalogId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3910,8 +3760,8 @@ public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdCall(String catalogI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-04/retail-media/catalogs/{catalogId}/status" - .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); + String localVarPath = "/2024-04/retail-media/campaigns/{campaign-id}/auction-line-items" + .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3919,6 +3769,18 @@ public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdCall(String catalogI Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + final String[] localVarAccepts = { "application/json" }; @@ -3939,889 +3801,66 @@ public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdCall(String catalogI } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(String catalogId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'catalogId' is set - if (catalogId == null) { - throw new ApiException("Missing the required parameter 'catalogId' when calling getApiV1ExternalCatalogStatusByCatalogId(Async)"); + private okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling getApiV2ExternalCampaignAuctionLineItemsByCampaignId(Async)"); } - return getApiV1ExternalCatalogStatusByCatalogIdCall(catalogId, _callback); + return getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(campaignId, limitToId, pageIndex, pageSize, _callback); } /** * - * Check the status of a catalog request. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @return JsonApiSingleResponseOfCatalogStatus + * Gets page of auction line item objects for the given campaign id + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return AuctionLineItemPagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Catalog request found. -
200 Success -
400 Bad Request -
*/ - public JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(String catalogId) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalCatalogStatusByCatalogIdWithHttpInfo(catalogId); + public AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(campaignId, limitToId, pageIndex, pageSize); return localVarResp.getData(); } /** * - * Check the status of a catalog request. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @return ApiResponse<JsonApiSingleResponseOfCatalogStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Catalog request found. -
- */ - public ApiResponse getApiV1ExternalCatalogStatusByCatalogIdWithHttpInfo(String catalogId) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(catalogId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Check the status of a catalog request. - * @param catalogId A catalog ID returned from an account catalog request. (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Catalog request found. -
- */ - public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdAsync(String catalogId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV1ExternalCatalogStatusByCatalogIdValidateBeforeCall(catalogId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV2ExternalAccountLineItemsByAccountId - * @param accountId The given account id (required) - * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) - * @param limitToType The campaign types that you would like to limit your result set to (optional) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdCall(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts/{account-id}/line-items" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToCampaignId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToCampaignId", limitToCampaignId)); - } - - if (limitToType != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limitToType", limitToType)); - } - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApiV2ExternalAccountLineItemsByAccountId(Async)"); - } - - return getApiV2ExternalAccountLineItemsByAccountIdCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of line item objects for the given account id - * @param accountId The given account id (required) - * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) - * @param limitToType The campaign types that you would like to limit your result set to (optional) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return CommonLineItemPagedListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalAccountLineItemsByAccountIdWithHttpInfo(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of line item objects for the given account id - * @param accountId The given account id (required) - * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) - * @param limitToType The campaign types that you would like to limit your result set to (optional) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<CommonLineItemPagedListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApiV2ExternalAccountLineItemsByAccountIdWithHttpInfo(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of line item objects for the given account id - * @param accountId The given account id (required) - * @param limitToCampaignId The campaign ids that you would like to limit your result set to (optional) - * @param limitToType The campaign types that you would like to limit your result set to (optional) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdAsync(String accountId, List limitToCampaignId, String limitToType, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV2ExternalAccountLineItemsByAccountIdValidateBeforeCall(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV2ExternalAuctionLineItemByLineItemId - * @param lineItemId The given line item id (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-04/retail-media/auction-line-items/{line-item-id}" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalAuctionLineItemByLineItemId(Async)"); - } - - return getApiV2ExternalAuctionLineItemByLineItemIdCall(lineItemId, _callback); - - } - - /** - * - * Gets the auction line item for the given line item id - * @param lineItemId The given line item id (required) - * @return AuctionLineItemResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(String lineItemId) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalAuctionLineItemByLineItemIdWithHttpInfo(lineItemId); - return localVarResp.getData(); - } - - /** - * - * Gets the auction line item for the given line item id - * @param lineItemId The given line item id (required) - * @return ApiResponse<AuctionLineItemResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public ApiResponse getApiV2ExternalAuctionLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(lineItemId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets the auction line item for the given line item id - * @param lineItemId The given line item id (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV2ExternalAuctionLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV2ExternalCampaignAuctionLineItemsByCampaignId - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-04/retail-media/campaigns/{campaign-id}/auction-line-items" - .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'campaignId' is set - if (campaignId == null) { - throw new ApiException("Missing the required parameter 'campaignId' when calling getApiV2ExternalCampaignAuctionLineItemsByCampaignId(Async)"); - } - - return getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(campaignId, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of auction line item objects for the given campaign id - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return AuctionLineItemPagedListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(campaignId, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of auction line item objects for the given campaign id - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<AuctionLineItemPagedListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public ApiResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of auction line item objects for the given campaign id - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
- */ - public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdAsync(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getApiV2ExternalLineItemByLineItemId - * @param lineItemId The given line item id (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV2ExternalLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-04/retail-media/line-items/{line-item-id}" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalLineItemByLineItemId(Async)"); - } - - return getApiV2ExternalLineItemByLineItemIdCall(lineItemId, _callback); - - } - - /** - * - * Gets the line item for the given line item id - * @param lineItemId The given line item id (required) - * @return CommonLineItemResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(String lineItemId) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalLineItemByLineItemIdWithHttpInfo(lineItemId); - return localVarResp.getData(); - } - - /** - * - * Gets the line item for the given line item id - * @param lineItemId The given line item id (required) - * @return ApiResponse<CommonLineItemResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApiV2ExternalLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets the line item for the given line item id - * @param lineItemId The given line item id (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV2ExternalLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getCampaignBudgetOverrides - * @param campaignId External campaign id. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getCampaignBudgetOverridesCall(Long campaignId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-04/retail-media/campaigns/{campaignId}/campaign-budget-overrides" - .replace("{" + "campaignId" + "}", localVarApiClient.escapeString(campaignId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getCampaignBudgetOverridesValidateBeforeCall(Long campaignId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'campaignId' is set - if (campaignId == null) { - throw new ApiException("Missing the required parameter 'campaignId' when calling getCampaignBudgetOverrides(Async)"); - } - - return getCampaignBudgetOverridesCall(campaignId, _callback); - - } - - /** - * - * Get current campaign budget overrides by given external campaign id. - * @param campaignId External campaign id. (required) - * @return ValueResourceOutcomeOfCampaignBudgetOverrides - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ValueResourceOutcomeOfCampaignBudgetOverrides getCampaignBudgetOverrides(Long campaignId) throws ApiException { - ApiResponse localVarResp = getCampaignBudgetOverridesWithHttpInfo(campaignId); - return localVarResp.getData(); - } - - /** - * - * Get current campaign budget overrides by given external campaign id. - * @param campaignId External campaign id. (required) - * @return ApiResponse<ValueResourceOutcomeOfCampaignBudgetOverrides> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getCampaignBudgetOverridesWithHttpInfo(Long campaignId) throws ApiException { - okhttp3.Call localVarCall = getCampaignBudgetOverridesValidateBeforeCall(campaignId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Get current campaign budget overrides by given external campaign id. - * @param campaignId External campaign id. (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getCampaignBudgetOverridesAsync(Long campaignId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getCampaignBudgetOverridesValidateBeforeCall(campaignId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getInsertionOrderHistoryChangeDataCapture - * @param insertionOrderId External insertion order id. (required) - * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) - * @param limit The number of elements to be returned. (optional, default to 25) - * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getInsertionOrderHistoryChangeDataCaptureCall(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2024-04/retail-media/insertion-order-history/{insertionOrderId}/change-data-capture" - .replace("{" + "insertionOrderId" + "}", localVarApiClient.escapeString(insertionOrderId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (offset != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (limitToChangeTypes != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limitToChangeTypes", limitToChangeTypes)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getInsertionOrderHistoryChangeDataCaptureValidateBeforeCall(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'insertionOrderId' is set - if (insertionOrderId == null) { - throw new ApiException("Missing the required parameter 'insertionOrderId' when calling getInsertionOrderHistoryChangeDataCapture(Async)"); - } - - return getInsertionOrderHistoryChangeDataCaptureCall(insertionOrderId, offset, limit, limitToChangeTypes, _callback); - - } - - /** - * - * Gets the balance's historical data change capture. - * @param insertionOrderId External insertion order id. (required) - * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) - * @param limit The number of elements to be returned. (optional, default to 25) - * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) - * @return PageOfInsertionOrderHistoryChangeDataCapture - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public PageOfInsertionOrderHistoryChangeDataCapture getInsertionOrderHistoryChangeDataCapture(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes) throws ApiException { - ApiResponse localVarResp = getInsertionOrderHistoryChangeDataCaptureWithHttpInfo(insertionOrderId, offset, limit, limitToChangeTypes); - return localVarResp.getData(); - } - - /** - * - * Gets the balance's historical data change capture. - * @param insertionOrderId External insertion order id. (required) - * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) - * @param limit The number of elements to be returned. (optional, default to 25) - * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) - * @return ApiResponse<PageOfInsertionOrderHistoryChangeDataCapture> + * Gets page of auction line item objects for the given campaign id + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return ApiResponse<AuctionLineItemPagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse getInsertionOrderHistoryChangeDataCaptureWithHttpInfo(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes) throws ApiException { - okhttp3.Call localVarCall = getInsertionOrderHistoryChangeDataCaptureValidateBeforeCall(insertionOrderId, offset, limit, limitToChangeTypes, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Gets the balance's historical data change capture. - * @param insertionOrderId External insertion order id. (required) - * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) - * @param limit The number of elements to be returned. (optional, default to 25) - * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) + * Gets page of auction line item objects for the given campaign id + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -4829,18 +3868,19 @@ public ApiResponse getInsertionOrd +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call getInsertionOrderHistoryChangeDataCaptureAsync(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdAsync(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getInsertionOrderHistoryChangeDataCaptureValidateBeforeCall(insertionOrderId, offset, limit, limitToChangeTypes, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getLineItemBudgetOverrides - * @param lineItemId The line item id to get budget overrides for. (required) + * Build call for getApiV2ExternalLineItemByLineItemId + * @param lineItemId The given line item id (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4850,7 +3890,7 @@ public okhttp3.Call getInsertionOrderHistoryChangeDataCaptureAsync(String insert 200 Success - */ - public okhttp3.Call getLineItemBudgetOverridesCall(String lineItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4867,8 +3907,8 @@ public okhttp3.Call getLineItemBudgetOverridesCall(String lineItemId, final ApiC Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-04/retail-media/line-items/{lineItemId}/line-item-budget-overrides" - .replace("{" + "lineItemId" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2024-04/retail-media/line-items/{line-item-id}" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4896,155 +3936,21 @@ public okhttp3.Call getLineItemBudgetOverridesCall(String lineItemId, final ApiC } @SuppressWarnings("rawtypes") - private okhttp3.Call getLineItemBudgetOverridesValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling getLineItemBudgetOverrides(Async)"); - } - - return getLineItemBudgetOverridesCall(lineItemId, _callback); - - } - - /** - * - * Gets a collection of monthly and daily budget overrides for the provided line item. - * @param lineItemId The line item id to get budget overrides for. (required) - * @return ValueResourceOutcomeOfLineItemBudgetOverrides - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ValueResourceOutcomeOfLineItemBudgetOverrides getLineItemBudgetOverrides(String lineItemId) throws ApiException { - ApiResponse localVarResp = getLineItemBudgetOverridesWithHttpInfo(lineItemId); - return localVarResp.getData(); - } - - /** - * - * Gets a collection of monthly and daily budget overrides for the provided line item. - * @param lineItemId The line item id to get budget overrides for. (required) - * @return ApiResponse<ValueResourceOutcomeOfLineItemBudgetOverrides> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getLineItemBudgetOverridesWithHttpInfo(String lineItemId) throws ApiException { - okhttp3.Call localVarCall = getLineItemBudgetOverridesValidateBeforeCall(lineItemId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets a collection of monthly and daily budget overrides for the provided line item. - * @param lineItemId The line item id to get budget overrides for. (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getLineItemBudgetOverridesAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getLineItemBudgetOverridesValidateBeforeCall(lineItemId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for patchApiV1ExternalAccountByAccountIdAndBalanceId - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param updateBalanceModelRequest (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = updateBalanceModelRequest; - - // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts/{account-id}/balances/{balanceId}" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); - } - - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalLineItemByLineItemId(Async)"); } - return patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, updateBalanceModelRequest, _callback); + return getApiV2ExternalLineItemByLineItemIdCall(lineItemId, _callback); } /** * - * Modify a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param updateBalanceModelRequest (optional) - * @return BalanceResponse + * Gets the line item for the given line item id + * @param lineItemId The given line item id (required) + * @return CommonLineItemResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5052,18 +3958,16 @@ private okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBef
200 Success -
*/ - public BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { - ApiResponse localVarResp = patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, updateBalanceModelRequest); + public CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(String lineItemId) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalLineItemByLineItemIdWithHttpInfo(lineItemId); return localVarResp.getData(); } /** * - * Modify a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param updateBalanceModelRequest (optional) - * @return ApiResponse<BalanceResponse> + * Gets the line item for the given line item id + * @param lineItemId The given line item id (required) + * @return ApiResponse<CommonLineItemResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5071,18 +3975,16 @@ public BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(String a
200 Success -
*/ - public ApiResponse patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { - okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV2ExternalLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Modify a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param updateBalanceModelRequest (optional) + * Gets the line item for the given line item id + * @param lineItemId The given line item id (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5092,17 +3994,16 @@ public ApiResponse patchApiV1ExternalAccountByAccountIdAndBalan 200 Success - */ - public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV2ExternalLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) + * Build call for getCampaignBudgetOverrides + * @param campaignId External campaign id. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5110,10 +4011,9 @@ public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCampaignBudgetOverridesCall(Long campaignId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5127,11 +4027,11 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendB basePath = null; } - Object localVarPostBody = keywordTarget202110Request; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2024-04/retail-media/campaigns/{campaignId}/campaign-budget-overrides" + .replace("{" + "campaignId" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5148,7 +4048,6 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendB } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -5156,64 +4055,59 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendB } String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(Async)"); + private okhttp3.Call getCampaignBudgetOverridesValidateBeforeCall(Long campaignId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling getCampaignBudgetOverrides(Async)"); } - return postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdCall(lineItemId, keywordTarget202110Request, _callback); + return getCampaignBudgetOverridesCall(campaignId, _callback); } /** * - * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @return KeywordTarget202110Response + * Get current campaign budget overrides by given external campaign id. + * @param campaignId External campaign id. (required) + * @return ValueResourceOutcomeOfCampaignBudgetOverrides * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdWithHttpInfo(lineItemId, keywordTarget202110Request); + public ValueResourceOutcomeOfCampaignBudgetOverrides getCampaignBudgetOverrides(Long campaignId) throws ApiException { + ApiResponse localVarResp = getCampaignBudgetOverridesWithHttpInfo(campaignId); return localVarResp.getData(); } /** * - * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @return ApiResponse<KeywordTarget202110Response> + * Get current campaign budget overrides by given external campaign id. + * @param campaignId External campaign id. (required) + * @return ApiResponse<ValueResourceOutcomeOfCampaignBudgetOverrides> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdWithHttpInfo(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getCampaignBudgetOverridesWithHttpInfo(Long campaignId) throws ApiException { + okhttp3.Call localVarCall = getCampaignBudgetOverridesValidateBeforeCall(campaignId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) + * Get current campaign budget overrides by given external campaign id. + * @param campaignId External campaign id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5221,20 +4115,21 @@ public ApiResponse postApi202110ExternalAuctionLine -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdAsync(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCampaignBudgetOverridesAsync(Long campaignId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getCampaignBudgetOverridesValidateBeforeCall(campaignId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) + * Build call for getInsertionOrderHistoryChangeDataCapture + * @param insertionOrderId External insertion order id. (required) + * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) + * @param limit The number of elements to be returned. (optional, default to 25) + * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5242,10 +4137,9 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendB -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInsertionOrderHistoryChangeDataCaptureCall(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5259,11 +4153,11 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteB basePath = null; } - Object localVarPostBody = keywordTarget202110Request; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2024-04/retail-media/insertion-order-history/{insertionOrderId}/change-data-capture" + .replace("{" + "insertionOrderId" + "}", localVarApiClient.escapeString(insertionOrderId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5271,6 +4165,18 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteB Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (limitToChangeTypes != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limitToChangeTypes", limitToChangeTypes)); + } + final String[] localVarAccepts = { "application/json" }; @@ -5280,7 +4186,6 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteB } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -5288,64 +4193,68 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteB } String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId(Async)"); + private okhttp3.Call getInsertionOrderHistoryChangeDataCaptureValidateBeforeCall(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'insertionOrderId' is set + if (insertionOrderId == null) { + throw new ApiException("Missing the required parameter 'insertionOrderId' when calling getInsertionOrderHistoryChangeDataCapture(Async)"); } - return postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdCall(lineItemId, keywordTarget202110Request, _callback); + return getInsertionOrderHistoryChangeDataCaptureCall(insertionOrderId, offset, limit, limitToChangeTypes, _callback); } /** * - * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @return KeywordTarget202110Response + * Gets the balance's historical data change capture. + * @param insertionOrderId External insertion order id. (required) + * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) + * @param limit The number of elements to be returned. (optional, default to 25) + * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) + * @return PageOfInsertionOrderHistoryChangeDataCapture * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdWithHttpInfo(lineItemId, keywordTarget202110Request); + public PageOfInsertionOrderHistoryChangeDataCapture getInsertionOrderHistoryChangeDataCapture(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes) throws ApiException { + ApiResponse localVarResp = getInsertionOrderHistoryChangeDataCaptureWithHttpInfo(insertionOrderId, offset, limit, limitToChangeTypes); return localVarResp.getData(); } /** * - * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) - * @return ApiResponse<KeywordTarget202110Response> + * Gets the balance's historical data change capture. + * @param insertionOrderId External insertion order id. (required) + * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) + * @param limit The number of elements to be returned. (optional, default to 25) + * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) + * @return ApiResponse<PageOfInsertionOrderHistoryChangeDataCapture> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdWithHttpInfo(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getInsertionOrderHistoryChangeDataCaptureWithHttpInfo(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes) throws ApiException { + okhttp3.Call localVarCall = getInsertionOrderHistoryChangeDataCaptureValidateBeforeCall(insertionOrderId, offset, limit, limitToChangeTypes, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. - * @param lineItemId The line item to interact with (required) - * @param keywordTarget202110Request (optional) + * Gets the balance's historical data change capture. + * @param insertionOrderId External insertion order id. (required) + * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) + * @param limit The number of elements to be returned. (optional, default to 25) + * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5353,20 +4262,18 @@ public ApiResponse postApi202110ExternalAuctionLine -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdAsync(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInsertionOrderHistoryChangeDataCaptureAsync(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getInsertionOrderHistoryChangeDataCaptureValidateBeforeCall(insertionOrderId, offset, limit, limitToChangeTypes, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalBalanceCampaignsAppendByBalanceId - * @param balanceId The balance to add campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * Build call for getLineItemBudgetOverrides + * @param lineItemId The line item id to get budget overrides for. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5376,7 +4283,7 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteB 200 Success - */ - public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLineItemBudgetOverridesCall(String lineItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5390,11 +4297,11 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(S basePath = null; } - Object localVarPostBody = balanceCampaign202110ListRequest; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-04/retail-media/balances/{balance-id}/campaigns/append" - .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2024-04/retail-media/line-items/{lineItemId}/line-item-budget-overrides" + .replace("{" + "lineItemId" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5411,7 +4318,6 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(S } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -5419,26 +4325,25 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(S } String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling postApi202110ExternalBalanceCampaignsAppendByBalanceId(Async)"); + private okhttp3.Call getLineItemBudgetOverridesValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling getLineItemBudgetOverrides(Async)"); } - return postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(balanceId, balanceCampaign202110ListRequest, _callback); + return getLineItemBudgetOverridesCall(lineItemId, _callback); } /** * - * appends one or more campaigns to the specified balance - * @param balanceId The balance to add campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) - * @return BalanceCampaign202110PagedListResponse + * Gets a collection of monthly and daily budget overrides for the provided line item. + * @param lineItemId The line item id to get budget overrides for. (required) + * @return ValueResourceOutcomeOfLineItemBudgetOverrides * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5446,17 +4351,16 @@ private okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdValid
200 Success -
*/ - public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampaignsAppendByBalanceId(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalBalanceCampaignsAppendByBalanceIdWithHttpInfo(balanceId, balanceCampaign202110ListRequest); + public ValueResourceOutcomeOfLineItemBudgetOverrides getLineItemBudgetOverrides(String lineItemId) throws ApiException { + ApiResponse localVarResp = getLineItemBudgetOverridesWithHttpInfo(lineItemId); return localVarResp.getData(); } /** * - * appends one or more campaigns to the specified balance - * @param balanceId The balance to add campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) - * @return ApiResponse<BalanceCampaign202110PagedListResponse> + * Gets a collection of monthly and daily budget overrides for the provided line item. + * @param lineItemId The line item id to get budget overrides for. (required) + * @return ApiResponse<ValueResourceOutcomeOfLineItemBudgetOverrides> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5464,17 +4368,16 @@ public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampai
200 Success -
*/ - public ApiResponse postApi202110ExternalBalanceCampaignsAppendByBalanceIdWithHttpInfo(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getLineItemBudgetOverridesWithHttpInfo(String lineItemId) throws ApiException { + okhttp3.Call localVarCall = getLineItemBudgetOverridesValidateBeforeCall(lineItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * appends one or more campaigns to the specified balance - * @param balanceId The balance to add campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * Gets a collection of monthly and daily budget overrides for the provided line item. + * @param lineItemId The line item id to get budget overrides for. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5484,17 +4387,17 @@ public ApiResponse postApi202110External 200 Success - */ - public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdAsync(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLineItemBudgetOverridesAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getLineItemBudgetOverridesValidateBeforeCall(lineItemId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalBalanceCampaignsDeleteByBalanceId - * @param balanceId The balance to remove campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * Build call for postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5502,9 +4405,10 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdAsync( +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5518,11 +4422,11 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(S basePath = null; } - Object localVarPostBody = balanceCampaign202110ListRequest; + Object localVarPostBody = keywordTarget202110Request; // create path and map variables - String localVarPath = "/2024-04/retail-media/balances/{balance-id}/campaigns/delete" - .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2024-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5551,58 +4455,60 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(S } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling postApi202110ExternalBalanceCampaignsDeleteByBalanceId(Async)"); + private okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(Async)"); } - return postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(balanceId, balanceCampaign202110ListRequest, _callback); + return postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdCall(lineItemId, keywordTarget202110Request, _callback); } /** * - * Removes one or more campaigns on the specified balance - * @param balanceId The balance to remove campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) - * @return BalanceCampaign202110PagedListResponse + * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) + * @return KeywordTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampaignsDeleteByBalanceId(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdWithHttpInfo(balanceId, balanceCampaign202110ListRequest); + public KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdWithHttpInfo(lineItemId, keywordTarget202110Request); return localVarResp.getData(); } /** * - * Removes one or more campaigns on the specified balance - * @param balanceId The balance to remove campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) - * @return ApiResponse<BalanceCampaign202110PagedListResponse> + * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) + * @return ApiResponse<KeywordTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalBalanceCampaignsDeleteByBalanceIdWithHttpInfo(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdWithHttpInfo(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Removes one or more campaigns on the specified balance - * @param balanceId The balance to remove campaigns from (required) - * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * This endpoint appends one or more keywords to targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5610,30 +4516,31 @@ public ApiResponse postApi202110External +
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdAsync(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdAsync(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalCampaignPreferredLineItemsByCampaignId - * @param campaignId The given campaign id (required) - * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) + * Build call for postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdCall(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5647,11 +4554,11 @@ public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdC basePath = null; } - Object localVarPostBody = preferredLineItemCreateModel202110Request; + Object localVarPostBody = keywordTarget202110Request; // create path and map variables - String localVarPath = "/2024-04/retail-media/campaigns/{campaign-id}/preferred-line-items" - .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); + String localVarPath = "/2024-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5680,81 +4587,81 @@ public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdC } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'campaignId' is set - if (campaignId == null) { - throw new ApiException("Missing the required parameter 'campaignId' when calling postApi202110ExternalCampaignPreferredLineItemsByCampaignId(Async)"); + private okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId(Async)"); } - return postApi202110ExternalCampaignPreferredLineItemsByCampaignIdCall(campaignId, preferredLineItemCreateModel202110Request, _callback); + return postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdCall(lineItemId, keywordTarget202110Request, _callback); } /** * - * Creates a new preferred line item with the specified settings - * @param campaignId The given campaign id (required) - * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) - * @return PreferredLineItem202110Response + * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) + * @return KeywordTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public PreferredLineItem202110Response postApi202110ExternalCampaignPreferredLineItemsByCampaignId(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdWithHttpInfo(campaignId, preferredLineItemCreateModel202110Request); + public KeywordTarget202110Response postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdWithHttpInfo(lineItemId, keywordTarget202110Request); return localVarResp.getData(); } /** * - * Creates a new preferred line item with the specified settings - * @param campaignId The given campaign id (required) - * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) - * @return ApiResponse<PreferredLineItem202110Response> + * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) + * @return ApiResponse<KeywordTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalCampaignPreferredLineItemsByCampaignIdWithHttpInfo(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(campaignId, preferredLineItemCreateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdWithHttpInfo(String lineItemId, KeywordTarget202110Request keywordTarget202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Creates a new preferred line item with the specified settings - * @param campaignId The given campaign id (required) - * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) + * This endpoint removes one or more keywords from targeting on the specified line item. The resulting state of the keyword target is returned. + * @param lineItemId The line item to interact with (required) + * @param keywordTarget202110Request (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdAsync(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdAsync(String lineItemId, KeywordTarget202110Request keywordTarget202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(campaignId, preferredLineItemCreateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemIdValidateBeforeCall(lineItemId, keywordTarget202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalLineItemProductsAppendByLineItemId - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest the products to append to this line item (optional) + * Build call for postApi202110ExternalBalanceCampaignsAppendByBalanceId + * @param balanceId The balance to add campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5764,7 +4671,7 @@ public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdA 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5778,11 +4685,11 @@ public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdCall( basePath = null; } - Object localVarPostBody = promotedProduct202110ListRequest; + Object localVarPostBody = balanceCampaign202110ListRequest; // create path and map variables - String localVarPath = "/2024-04/retail-media/line-items/{line-item-id}/products/append" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2024-04/retail-media/balances/{balance-id}/campaigns/append" + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5811,22 +4718,22 @@ public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsAppendByLineItemId(Async)"); + private okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApi202110ExternalBalanceCampaignsAppendByBalanceId(Async)"); } - return postApi202110ExternalLineItemProductsAppendByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); + return postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(balanceId, balanceCampaign202110ListRequest, _callback); } /** * - * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest the products to append to this line item (optional) - * @return PromotedProduct202110PagedListResponse + * appends one or more campaigns to the specified balance + * @param balanceId The balance to add campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * @return BalanceCampaign202110PagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5834,17 +4741,17 @@ private okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdVali
200 Success -
*/ - public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProductsAppendByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalLineItemProductsAppendByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampaignsAppendByBalanceId(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalBalanceCampaignsAppendByBalanceIdWithHttpInfo(balanceId, balanceCampaign202110ListRequest); return localVarResp.getData(); } /** * - * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest the products to append to this line item (optional) - * @return ApiResponse<PromotedProduct202110PagedListResponse> + * appends one or more campaigns to the specified balance + * @param balanceId The balance to add campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * @return ApiResponse<BalanceCampaign202110PagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5852,17 +4759,17 @@ public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProdu
200 Success -
*/ - public ApiResponse postApi202110ExternalLineItemProductsAppendByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalBalanceCampaignsAppendByBalanceIdWithHttpInfo(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest the products to append to this line item (optional) + * appends one or more campaigns to the specified balance + * @param balanceId The balance to add campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -5872,17 +4779,17 @@ public ApiResponse postApi202110External 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdAsync(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsAppendByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalLineItemProductsDeleteByLineItemId - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest (optional) + * Build call for postApi202110ExternalBalanceCampaignsDeleteByBalanceId + * @param balanceId The balance to remove campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -5892,7 +4799,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdAsync 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -5906,11 +4813,11 @@ public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdCall( basePath = null; } - Object localVarPostBody = promotedProduct202110ListRequest; + Object localVarPostBody = balanceCampaign202110ListRequest; // create path and map variables - String localVarPath = "/2024-04/retail-media/line-items/{line-item-id}/products/delete" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2024-04/retail-media/balances/{balance-id}/campaigns/delete" + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -5939,22 +4846,22 @@ public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsDeleteByLineItemId(Async)"); + private okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApi202110ExternalBalanceCampaignsDeleteByBalanceId(Async)"); } - return postApi202110ExternalLineItemProductsDeleteByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); + return postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(balanceId, balanceCampaign202110ListRequest, _callback); } /** * - * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest (optional) - * @return PromotedProduct202110PagedListResponse + * Removes one or more campaigns on the specified balance + * @param balanceId The balance to remove campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * @return BalanceCampaign202110PagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5962,17 +4869,17 @@ private okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdVali
200 Success -
*/ - public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProductsDeleteByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalLineItemProductsDeleteByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + public BalanceCampaign202110PagedListResponse postApi202110ExternalBalanceCampaignsDeleteByBalanceId(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdWithHttpInfo(balanceId, balanceCampaign202110ListRequest); return localVarResp.getData(); } /** * - * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest (optional) - * @return ApiResponse<PromotedProduct202110PagedListResponse> + * Removes one or more campaigns on the specified balance + * @param balanceId The balance to remove campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) + * @return ApiResponse<BalanceCampaign202110PagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -5980,17 +4887,17 @@ public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProdu
200 Success -
*/ - public ApiResponse postApi202110ExternalLineItemProductsDeleteByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalBalanceCampaignsDeleteByBalanceIdWithHttpInfo(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. - * @param lineItemId The line item to interact with (required) - * @param promotedProduct202110ListRequest (optional) + * Removes one or more campaigns on the specified balance + * @param balanceId The balance to remove campaigns from (required) + * @param balanceCampaign202110ListRequest The campaigns to append (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6000,27 +4907,28 @@ public ApiResponse postApi202110External 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdAsync(String balanceId, BalanceCampaign202110ListRequest balanceCampaign202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalBalanceCampaignsDeleteByBalanceIdValidateBeforeCall(balanceId, balanceCampaign202110ListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalLineItemProductsPauseByLineItemId - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) + * Build call for postApi202110ExternalCampaignPreferredLineItemsByCampaignId + * @param campaignId The given campaign id (required) + * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Success -
201 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdCall(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6034,11 +4942,11 @@ public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(S basePath = null; } - Object localVarPostBody = promotedProduct202110ListRequest; + Object localVarPostBody = preferredLineItemCreateModel202110Request; // create path and map variables - String localVarPath = "/2024-04/retail-media/line-items/{line-item-id}/products/pause" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2024-04/retail-media/campaigns/{campaign-id}/preferred-line-items" + .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -6047,6 +4955,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(S Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -6066,74 +4975,81 @@ public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(S } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'lineItemId' is set - if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsPauseByLineItemId(Async)"); + private okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling postApi202110ExternalCampaignPreferredLineItemsByCampaignId(Async)"); } - return postApi202110ExternalLineItemProductsPauseByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); + return postApi202110ExternalCampaignPreferredLineItemsByCampaignIdCall(campaignId, preferredLineItemCreateModel202110Request, _callback); } /** * - * This endpoint pauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) + * Creates a new preferred line item with the specified settings + * @param campaignId The given campaign id (required) + * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) + * @return PreferredLineItem202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Success -
201 Success -
400 Bad Request -
*/ - public void postApi202110ExternalLineItemProductsPauseByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - postApi202110ExternalLineItemProductsPauseByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + public PreferredLineItem202110Response postApi202110ExternalCampaignPreferredLineItemsByCampaignId(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdWithHttpInfo(campaignId, preferredLineItemCreateModel202110Request); + return localVarResp.getData(); } /** * - * This endpoint pauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) - * @return ApiResponse<Void> + * Creates a new preferred line item with the specified settings + * @param campaignId The given campaign id (required) + * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) + * @return ApiResponse<PreferredLineItem202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Success -
201 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalLineItemProductsPauseByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); - return localVarApiClient.execute(localVarCall); + public ApiResponse postApi202110ExternalCampaignPreferredLineItemsByCampaignIdWithHttpInfo(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(campaignId, preferredLineItemCreateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint pauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) + * Creates a new preferred line item with the specified settings + * @param campaignId The given campaign id (required) + * @param preferredLineItemCreateModel202110Request The line item settings to create a line item with (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Success -
201 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdAsync(String campaignId, PreferredLineItemCreateModel202110Request preferredLineItemCreateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = postApi202110ExternalCampaignPreferredLineItemsByCampaignIdValidateBeforeCall(campaignId, preferredLineItemCreateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalLineItemProductsUnpauseByLineItemId - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) + * Build call for postApi202110ExternalLineItemProductsAppendByLineItemId + * @param lineItemId The line item to interact with (required) + * @param promotedProduct202110ListRequest the products to append to this line item (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6143,7 +5059,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdAsync( 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6160,7 +5076,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2024-04/retail-media/line-items/{line-item-id}/products/unpause" + String localVarPath = "/2024-04/retail-media/line-items/{line-item-id}/products/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6170,6 +5086,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -6189,21 +5106,22 @@ public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsUnpauseByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsAppendByLineItemId(Async)"); } - return postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); + return postApi202110ExternalLineItemProductsAppendByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); } /** * - * This endpoint unpauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) + * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. + * @param lineItemId The line item to interact with (required) + * @param promotedProduct202110ListRequest the products to append to this line item (optional) + * @return PromotedProduct202110PagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6211,16 +5129,17 @@ private okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdVal
200 Success -
*/ - public void postApi202110ExternalLineItemProductsUnpauseByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - postApi202110ExternalLineItemProductsUnpauseByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProductsAppendByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalLineItemProductsAppendByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); + return localVarResp.getData(); } /** * - * This endpoint unpauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) - * @return ApiResponse<Void> + * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. + * @param lineItemId The line item to interact with (required) + * @param promotedProduct202110ListRequest the products to append to this line item (optional) + * @return ApiResponse<PromotedProduct202110PagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6228,16 +5147,17 @@ public void postApi202110ExternalLineItemProductsUnpauseByLineItemId(String line
200 Success -
*/ - public ApiResponse postApi202110ExternalLineItemProductsUnpauseByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); - return localVarApiClient.execute(localVarCall); + public ApiResponse postApi202110ExternalLineItemProductsAppendByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint unpauses one or more promoted products on a specified line item. - * @param lineItemId The line item to interact with. (required) - * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) + * This endpoint appends one or more products to promote on the specified line item. The resulting state of the line item is returned. + * @param lineItemId The line item to interact with (required) + * @param promotedProduct202110ListRequest the products to append to this line item (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6247,16 +5167,17 @@ public ApiResponse postApi202110ExternalLineItemProductsUnpauseByLineItemI 200 Success - */ - public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsAppendByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId + * Build call for postApi202110ExternalLineItemProductsDeleteByLineItemId * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) + * @param promotedProduct202110ListRequest (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6264,10 +5185,9 @@ public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdAsyn -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6281,10 +5201,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAp basePath = null; } - Object localVarPostBody = addToBasketIdsUpdateModel202110Request; + Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append" + String localVarPath = "/2024-04/retail-media/line-items/{line-item-id}/products/delete" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6314,60 +5234,58 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAp } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsDeleteByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); + return postApi202110ExternalLineItemProductsDeleteByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); } /** * - * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. + * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) - * @return AddToBasketTarget202110Response + * @param promotedProduct202110ListRequest (optional) + * @return PromotedProduct202110PagedListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public AddToBasketTarget202110Response postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdWithHttpInfo(lineItemId, addToBasketIdsUpdateModel202110Request); + public PromotedProduct202110PagedListResponse postApi202110ExternalLineItemProductsDeleteByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalLineItemProductsDeleteByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); return localVarResp.getData(); } /** * - * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. + * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) - * @return ApiResponse<AddToBasketTarget202110Response> + * @param promotedProduct202110ListRequest (optional) + * @return ApiResponse<PromotedProduct202110PagedListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdWithHttpInfo(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalLineItemProductsDeleteByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. + * This endpoint removes one or more products from promotion on the specified line item. The resulting state of the line item is returned. * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) + * @param promotedProduct202110ListRequest (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6375,20 +5293,19 @@ public ApiResponse postApi202110ExternalPreferr -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdAsync(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsDeleteByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId - * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) + * Build call for postApi202110ExternalLineItemProductsPauseByLineItemId + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6396,10 +5313,9 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAp -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6413,10 +5329,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDe basePath = null; } - Object localVarPostBody = addToBasketIdsUpdateModel202110Request; + Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete" + String localVarPath = "/2024-04/retail-media/line-items/{line-item-id}/products/pause" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6426,7 +5342,6 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDe Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -6446,60 +5361,55 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDe } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsPauseByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); + return postApi202110ExternalLineItemProductsPauseByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); } /** * - * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. - * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) - * @return AddToBasketTarget202110Response + * This endpoint pauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public AddToBasketTarget202110Response postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdWithHttpInfo(lineItemId, addToBasketIdsUpdateModel202110Request); - return localVarResp.getData(); + public void postApi202110ExternalLineItemProductsPauseByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + postApi202110ExternalLineItemProductsPauseByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); } /** * - * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. - * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) - * @return ApiResponse<AddToBasketTarget202110Response> + * This endpoint pauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdWithHttpInfo(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse postApi202110ExternalLineItemProductsPauseByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); + return localVarApiClient.execute(localVarCall); } /** * (asynchronously) - * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. - * @param lineItemId The line item to interact with (required) - * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) + * This endpoint pauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to pause. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6507,20 +5417,18 @@ public ApiResponse postApi202110ExternalPreferr -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdAsync(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsPauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId - * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) + * Build call for postApi202110ExternalLineItemProductsUnpauseByLineItemId + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6528,10 +5436,9 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDe -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6545,10 +5452,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppe basePath = null; } - Object localVarPostBody = audienceIdsUpdateModel202110Request; + Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append" + String localVarPath = "/2024-04/retail-media/line-items/{line-item-id}/products/unpause" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6558,7 +5465,6 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppe Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -6578,60 +5484,55 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppe } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalLineItemProductsUnpauseByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); + return postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall(lineItemId, promotedProduct202110ListRequest, _callback); } /** * - * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. - * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) - * @return AudienceTarget202110Response + * This endpoint unpauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdWithHttpInfo(lineItemId, audienceIdsUpdateModel202110Request); - return localVarResp.getData(); + public void postApi202110ExternalLineItemProductsUnpauseByLineItemId(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + postApi202110ExternalLineItemProductsUnpauseByLineItemIdWithHttpInfo(lineItemId, promotedProduct202110ListRequest); } /** * - * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. - * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) - * @return ApiResponse<AudienceTarget202110Response> + * This endpoint unpauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdWithHttpInfo(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse postApi202110ExternalLineItemProductsUnpauseByLineItemIdWithHttpInfo(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, null); + return localVarApiClient.execute(localVarCall); } /** * (asynchronously) - * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. - * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) + * This endpoint unpauses one or more promoted products on a specified line item. + * @param lineItemId The line item to interact with. (required) + * @param promotedProduct202110ListRequest The products from which their IDs will be used to unpause. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6639,20 +5540,18 @@ public ApiResponse postApi202110ExternalPreferredL -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdAsync(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdAsync(String lineItemId, PromotedProduct202110ListRequest promotedProduct202110ListRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = postApi202110ExternalLineItemProductsUnpauseByLineItemIdValidateBeforeCall(lineItemId, promotedProduct202110ListRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId + * Build call for postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) + * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6663,7 +5562,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppe 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6677,10 +5576,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDele basePath = null; } - Object localVarPostBody = audienceIdsUpdateModel202110Request; + Object localVarPostBody = addToBasketIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete" + String localVarPath = "/2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6710,22 +5609,22 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDele } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); + return postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); } /** * - * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) - * @return AudienceTarget202110Response + * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) + * @return AddToBasketTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6734,17 +5633,17 @@ private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDel
400 Bad Request -
*/ - public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdWithHttpInfo(lineItemId, audienceIdsUpdateModel202110Request); + public AddToBasketTarget202110Response postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdWithHttpInfo(lineItemId, addToBasketIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) - * @return ApiResponse<AudienceTarget202110Response> + * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) + * @return ApiResponse<AddToBasketTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6753,17 +5652,17 @@ public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTarget
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdWithHttpInfo(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdWithHttpInfo(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * This endpoint appends one or more add to basket ids to targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) + * @param addToBasketIdsUpdateModel202110Request Ids to append to the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6774,17 +5673,17 @@ public ApiResponse postApi202110ExternalPreferredL 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdAsync(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdAsync(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId + * Build call for postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) + * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6795,7 +5694,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDele 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6809,10 +5708,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendB basePath = null; } - Object localVarPostBody = storeIdsUpdateModel202110Request; + Object localVarPostBody = addToBasketIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append" + String localVarPath = "/2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6842,22 +5741,22 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendB } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdCall(lineItemId, storeIdsUpdateModel202110Request, _callback); + return postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); } /** * - * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) - * @return StoreTarget202110Response + * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) + * @return AddToBasketTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6866,17 +5765,17 @@ private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppend
400 Bad Request -
*/ - public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdWithHttpInfo(lineItemId, storeIdsUpdateModel202110Request); + public AddToBasketTarget202110Response postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdWithHttpInfo(lineItemId, addToBasketIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) - * @return ApiResponse<StoreTarget202110Response> + * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) + * @return ApiResponse<AddToBasketTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6885,17 +5784,17 @@ public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargeting
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdWithHttpInfo(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdWithHttpInfo(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint removes one or more add to basket ids from targeting on the specified line item. The resulting state of the add to basket target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) + * @param addToBasketIdsUpdateModel202110Request Ids to remove from the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -6906,17 +5805,17 @@ public ApiResponse postApi202110ExternalPreferredLine 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdAsync(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdAsync(String lineItemId, AddToBasketIdsUpdateModel202110Request addToBasketIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemIdValidateBeforeCall(lineItemId, addToBasketIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId + * Build call for postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) + * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -6927,7 +5826,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendB 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -6941,10 +5840,10 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteB basePath = null; } - Object localVarPostBody = storeIdsUpdateModel202110Request; + Object localVarPostBody = audienceIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete" + String localVarPath = "/2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6974,22 +5873,22 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteB } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId(Async)"); } - return postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdCall(lineItemId, storeIdsUpdateModel202110Request, _callback); + return postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); } /** * - * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) - * @return StoreTarget202110Response + * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) + * @return AudienceTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -6998,17 +5897,17 @@ private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDelete
400 Bad Request -
*/ - public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { - ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdWithHttpInfo(lineItemId, storeIdsUpdateModel202110Request); + public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdWithHttpInfo(lineItemId, audienceIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) - * @return ApiResponse<StoreTarget202110Response> + * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) + * @return ApiResponse<AudienceTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -7017,17 +5916,17 @@ public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargeting
400 Bad Request -
*/ - public ApiResponse postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdWithHttpInfo(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdWithHttpInfo(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * This endpoint appends one or more audiences ids to targeting on the specified line item. The resulting state of the audience target is returned. * @param lineItemId The line item to interact with (required) - * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) + * @param audienceIdsUpdateModel202110Request Audience ids to append to the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -7038,27 +5937,28 @@ public ApiResponse postApi202110ExternalPreferredLine 400 Bad Request - */ - public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdAsync(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdAsync(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202210ExternalAccountCreativesByAccountId - * @param accountId External account id to create a creative for (required) - * @param creativeCreateModel202207 The creative to create (optional) + * Build call for postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId + * @param lineItemId The line item to interact with (required) + * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
201 Creatives created -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdCall(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7072,11 +5972,11 @@ public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdCall(String basePath = null; } - Object localVarPostBody = creativeCreateModel202207; + Object localVarPostBody = audienceIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts/{account-id}/creatives" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7105,88 +6005,92 @@ public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdCall(String } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApi202210ExternalAccountCreativesByAccountId(Async)"); + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId(Async)"); } - return postApi202210ExternalAccountCreativesByAccountIdCall(accountId, creativeCreateModel202207, _callback); + return postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); } /** * - * Create a creative for an account - * @param accountId External account id to create a creative for (required) - * @param creativeCreateModel202207 The creative to create (optional) - * @return Creative202210Response + * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * @param lineItemId The line item to interact with (required) + * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) + * @return AudienceTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
201 Creatives created -
200 Success -
400 Bad Request -
*/ - public Creative202210Response postApi202210ExternalAccountCreativesByAccountId(String accountId, CreativeCreateModel202207 creativeCreateModel202207) throws ApiException { - ApiResponse localVarResp = postApi202210ExternalAccountCreativesByAccountIdWithHttpInfo(accountId, creativeCreateModel202207); + public AudienceTarget202110Response postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdWithHttpInfo(lineItemId, audienceIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * Create a creative for an account - * @param accountId External account id to create a creative for (required) - * @param creativeCreateModel202207 The creative to create (optional) - * @return ApiResponse<Creative202210Response> + * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * @param lineItemId The line item to interact with (required) + * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) + * @return ApiResponse<AudienceTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
201 Creatives created -
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202210ExternalAccountCreativesByAccountIdWithHttpInfo(String accountId, CreativeCreateModel202207 creativeCreateModel202207) throws ApiException { - okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(accountId, creativeCreateModel202207, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdWithHttpInfo(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Create a creative for an account - * @param accountId External account id to create a creative for (required) - * @param creativeCreateModel202207 The creative to create (optional) + * This endpoint removes one or more audiences ids from targeting on the specified line item. The resulting state of the audience target is returned. + * @param lineItemId The line item to interact with (required) + * @param audienceIdsUpdateModel202110Request Audience ids to remove from the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
201 Creatives created -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdAsync(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdAsync(String lineItemId, AudienceIdsUpdateModel202110Request audienceIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(accountId, creativeCreateModel202207, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemIdValidateBeforeCall(lineItemId, audienceIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202210ExternalAccountCreativesSearchByAccountId - * @param accountId External account id to retrieve creatives for (required) - * @param creativeIds Creatives to filter by (optional) + * Build call for postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Creatives found -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7200,11 +6104,11 @@ public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(S basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = storeIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts/{account-id}/creatives/search" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7212,10 +6116,6 @@ public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(S Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (creativeIds != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "creative-ids", creativeIds)); - } - final String[] localVarAccepts = { "application/json" }; @@ -7225,6 +6125,7 @@ public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(S } final String[] localVarContentTypes = { + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -7236,88 +6137,92 @@ public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(S } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApi202210ExternalAccountCreativesSearchByAccountId(Async)"); + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId(Async)"); } - return postApi202210ExternalAccountCreativesSearchByAccountIdCall(accountId, creativeIds, _callback); + return postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdCall(lineItemId, storeIdsUpdateModel202110Request, _callback); } /** * - * Get account creatives - * @param accountId External account id to retrieve creatives for (required) - * @param creativeIds Creatives to filter by (optional) - * @return Creative202210ListResponse + * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) + * @return StoreTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Creatives found -
200 Success -
400 Bad Request -
*/ - public Creative202210ListResponse postApi202210ExternalAccountCreativesSearchByAccountId(String accountId, List creativeIds) throws ApiException { - ApiResponse localVarResp = postApi202210ExternalAccountCreativesSearchByAccountIdWithHttpInfo(accountId, creativeIds); + public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdWithHttpInfo(lineItemId, storeIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * Get account creatives - * @param accountId External account id to retrieve creatives for (required) - * @param creativeIds Creatives to filter by (optional) - * @return ApiResponse<Creative202210ListResponse> + * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) + * @return ApiResponse<StoreTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Creatives found -
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202210ExternalAccountCreativesSearchByAccountIdWithHttpInfo(String accountId, List creativeIds) throws ApiException { - okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(accountId, creativeIds, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdWithHttpInfo(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Get account creatives - * @param accountId External account id to retrieve creatives for (required) - * @param creativeIds Creatives to filter by (optional) + * This endpoint appends one or more store ids to targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to append to the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Creatives found -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdAsync(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdAsync(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(accountId, creativeIds, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApi202301ExternalAccountCampaignsByAccountId - * @param accountId The account to request the campaign for. (required) - * @param postCampaignV202301 Creatable campaign attributes (optional) + * Build call for postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdCall(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7331,11 +6236,11 @@ public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdCall(String basePath = null; } - Object localVarPostBody = postCampaignV202301; + Object localVarPostBody = storeIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts/{account-id}/campaigns" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2024-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7364,89 +6269,91 @@ public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdCall(String } @SuppressWarnings("rawtypes") - private okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApi202301ExternalAccountCampaignsByAccountId(Async)"); + private okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId(Async)"); } - return postApi202301ExternalAccountCampaignsByAccountIdCall(accountId, postCampaignV202301, _callback); + return postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdCall(lineItemId, storeIdsUpdateModel202110Request, _callback); } /** * - * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. - * @param accountId The account to request the campaign for. (required) - * @param postCampaignV202301 Creatable campaign attributes (optional) - * @return JsonApiSingleResponseOfCampaignV202301 + * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) + * @return StoreTarget202110Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public JsonApiSingleResponseOfCampaignV202301 postApi202301ExternalAccountCampaignsByAccountId(String accountId, PostCampaignV202301 postCampaignV202301) throws ApiException { - ApiResponse localVarResp = postApi202301ExternalAccountCampaignsByAccountIdWithHttpInfo(accountId, postCampaignV202301); + public StoreTarget202110Response postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { + ApiResponse localVarResp = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdWithHttpInfo(lineItemId, storeIdsUpdateModel202110Request); return localVarResp.getData(); } /** * - * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. - * @param accountId The account to request the campaign for. (required) - * @param postCampaignV202301 Creatable campaign attributes (optional) - * @return ApiResponse<JsonApiSingleResponseOfCampaignV202301> + * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) + * @return ApiResponse<StoreTarget202110Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public ApiResponse postApi202301ExternalAccountCampaignsByAccountIdWithHttpInfo(String accountId, PostCampaignV202301 postCampaignV202301) throws ApiException { - okhttp3.Call localVarCall = postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(accountId, postCampaignV202301, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdWithHttpInfo(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request) throws ApiException { + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. - * @param accountId The account to request the campaign for. (required) - * @param postCampaignV202301 Creatable campaign attributes (optional) + * This endpoint removes one or more store ids from targeting on the specified line item. The resulting state of the store target is returned. + * @param lineItemId The line item to interact with (required) + * @param storeIdsUpdateModel202110Request Store ids to remove from the target (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
201 Success -
200 Success -
400 Bad Request -
*/ - public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdAsync(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdAsync(String lineItemId, StoreIdsUpdateModel202110Request storeIdsUpdateModel202110Request, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(accountId, postCampaignV202301, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemIdValidateBeforeCall(lineItemId, storeIdsUpdateModel202110Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId - * @param accountId The account of the balance (required) - * @param balanceId The balance to add funds to (required) - * @param addFundsToBalanceRequest (optional) + * Build call for postApi202210ExternalAccountCreativesByAccountId + * @param accountId External account id to create a creative for (required) + * @param creativeCreateModel202207 The creative to create (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
201 Creatives created -
*/ - public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdCall(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7460,12 +6367,11 @@ public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall( basePath = null; } - Object localVarPostBody = addFundsToBalanceRequest; + Object localVarPostBody = creativeCreateModel202207; // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2024-04/retail-media/accounts/{account-id}/creatives" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7494,96 +6400,88 @@ public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); - } - - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling postApi202210ExternalAccountCreativesByAccountId(Async)"); } - return postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(accountId, balanceId, addFundsToBalanceRequest, _callback); + return postApi202210ExternalAccountCreativesByAccountIdCall(accountId, creativeCreateModel202207, _callback); } /** * - * Add funds to a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to add funds to (required) - * @param addFundsToBalanceRequest (optional) - * @return BalanceResponse + * Create a creative for an account + * @param accountId External account id to create a creative for (required) + * @param creativeCreateModel202207 The creative to create (optional) + * @return Creative202210Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
201 Creatives created -
*/ - public BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { - ApiResponse localVarResp = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, addFundsToBalanceRequest); + public Creative202210Response postApi202210ExternalAccountCreativesByAccountId(String accountId, CreativeCreateModel202207 creativeCreateModel202207) throws ApiException { + ApiResponse localVarResp = postApi202210ExternalAccountCreativesByAccountIdWithHttpInfo(accountId, creativeCreateModel202207); return localVarResp.getData(); } /** * - * Add funds to a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to add funds to (required) - * @param addFundsToBalanceRequest (optional) - * @return ApiResponse<BalanceResponse> + * Create a creative for an account + * @param accountId External account id to create a creative for (required) + * @param creativeCreateModel202207 The creative to create (optional) + * @return ApiResponse<Creative202210Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
201 Creatives created -
*/ - public ApiResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202210ExternalAccountCreativesByAccountIdWithHttpInfo(String accountId, CreativeCreateModel202207 creativeCreateModel202207) throws ApiException { + okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(accountId, creativeCreateModel202207, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Add funds to a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to add funds to (required) - * @param addFundsToBalanceRequest (optional) + * Create a creative for an account + * @param accountId External account id to create a creative for (required) + * @param creativeCreateModel202207 The creative to create (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
201 Creatives created -
*/ - public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdAsync(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdAsync(String accountId, CreativeCreateModel202207 creativeCreateModel202207, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesByAccountIdValidateBeforeCall(accountId, creativeCreateModel202207, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApiV1ExternalAccountBalancesByAccountId - * @param accountId The account to create balances for (required) - * @param createBalanceRequest (optional) + * Build call for postApi202210ExternalAccountCreativesSearchByAccountId + * @param accountId External account id to retrieve creatives for (required) + * @param creativeIds Creatives to filter by (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Creatives found -
*/ - public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7597,10 +6495,10 @@ public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accou basePath = null; } - Object localVarPostBody = createBalanceRequest; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts/{account-id}/balances" + String localVarPath = "/2024-04/retail-media/accounts/{account-id}/creatives/search" .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -7609,6 +6507,10 @@ public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accou Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (creativeIds != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "creative-ids", creativeIds)); + } + final String[] localVarAccepts = { "application/json" }; @@ -7618,7 +6520,6 @@ public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accou } final String[] localVarContentTypes = { - "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -7630,88 +6531,88 @@ public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accou } @SuppressWarnings("rawtypes") - private okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountBalancesByAccountId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling postApi202210ExternalAccountCreativesSearchByAccountId(Async)"); } - return postApiV1ExternalAccountBalancesByAccountIdCall(accountId, createBalanceRequest, _callback); + return postApi202210ExternalAccountCreativesSearchByAccountIdCall(accountId, creativeIds, _callback); } /** * - * Create balance for the given account id - * @param accountId The account to create balances for (required) - * @param createBalanceRequest (optional) - * @return BalanceResponse + * Get account creatives + * @param accountId External account id to retrieve creatives for (required) + * @param creativeIds Creatives to filter by (optional) + * @return Creative202210ListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Creatives found -
*/ - public BalanceResponse postApiV1ExternalAccountBalancesByAccountId(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { - ApiResponse localVarResp = postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, createBalanceRequest); + public Creative202210ListResponse postApi202210ExternalAccountCreativesSearchByAccountId(String accountId, List creativeIds) throws ApiException { + ApiResponse localVarResp = postApi202210ExternalAccountCreativesSearchByAccountIdWithHttpInfo(accountId, creativeIds); return localVarResp.getData(); } /** * - * Create balance for the given account id - * @param accountId The account to create balances for (required) - * @param createBalanceRequest (optional) - * @return ApiResponse<BalanceResponse> + * Get account creatives + * @param accountId External account id to retrieve creatives for (required) + * @param creativeIds Creatives to filter by (optional) + * @return ApiResponse<Creative202210ListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Creatives found -
*/ - public ApiResponse postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202210ExternalAccountCreativesSearchByAccountIdWithHttpInfo(String accountId, List creativeIds) throws ApiException { + okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(accountId, creativeIds, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Create balance for the given account id - * @param accountId The account to create balances for (required) - * @param createBalanceRequest (optional) + * Get account creatives + * @param accountId External account id to retrieve creatives for (required) + * @param creativeIds Creatives to filter by (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Creatives found -
*/ - public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdAsync(String accountId, List creativeIds, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202210ExternalAccountCreativesSearchByAccountIdValidateBeforeCall(accountId, creativeIds, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApiV1ExternalAccountCatalogsByAccountId - * @param accountId The account to request the catalog for. (required) - * @param jsonApiRequestOfCatalogRequest (optional) + * Build call for postApi202301ExternalAccountCampaignsByAccountId + * @param accountId The account to request the campaign for. (required) + * @param postCampaignV202301 Creatable campaign attributes (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 Catalog request successfully created -
201 Success -
*/ - public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdCall(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdCall(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7725,11 +6626,11 @@ public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdCall(String accou basePath = null; } - Object localVarPostBody = jsonApiRequestOfCatalogRequest; + Object localVarPostBody = postCampaignV202301; // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts/{accountId}/catalogs" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/2024-04/retail-media/accounts/{account-id}/campaigns" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7758,89 +6659,88 @@ public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdCall(String accou } @SuppressWarnings("rawtypes") - private okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountCatalogsByAccountId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling postApi202301ExternalAccountCampaignsByAccountId(Async)"); } - return postApiV1ExternalAccountCatalogsByAccountIdCall(accountId, jsonApiRequestOfCatalogRequest, _callback); + return postApi202301ExternalAccountCampaignsByAccountIdCall(accountId, postCampaignV202301, _callback); } /** * - * Create a request for a Catalog available to the indicated account. - * @param accountId The account to request the catalog for. (required) - * @param jsonApiRequestOfCatalogRequest (optional) - * @return JsonApiSingleResponseOfCatalogStatus + * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. + * @param accountId The account to request the campaign for. (required) + * @param postCampaignV202301 Creatable campaign attributes (optional) + * @return JsonApiSingleResponseOfCampaignV202301 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Catalog request successfully created -
201 Success -
*/ - public JsonApiSingleResponseOfCatalogStatus postApiV1ExternalAccountCatalogsByAccountId(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest) throws ApiException { - ApiResponse localVarResp = postApiV1ExternalAccountCatalogsByAccountIdWithHttpInfo(accountId, jsonApiRequestOfCatalogRequest); + public JsonApiSingleResponseOfCampaignV202301 postApi202301ExternalAccountCampaignsByAccountId(String accountId, PostCampaignV202301 postCampaignV202301) throws ApiException { + ApiResponse localVarResp = postApi202301ExternalAccountCampaignsByAccountIdWithHttpInfo(accountId, postCampaignV202301); return localVarResp.getData(); } /** * - * Create a request for a Catalog available to the indicated account. - * @param accountId The account to request the catalog for. (required) - * @param jsonApiRequestOfCatalogRequest (optional) - * @return ApiResponse<JsonApiSingleResponseOfCatalogStatus> + * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. + * @param accountId The account to request the campaign for. (required) + * @param postCampaignV202301 Creatable campaign attributes (optional) + * @return ApiResponse<JsonApiSingleResponseOfCampaignV202301> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Catalog request successfully created -
201 Success -
*/ - public ApiResponse postApiV1ExternalAccountCatalogsByAccountIdWithHttpInfo(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfCatalogRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApi202301ExternalAccountCampaignsByAccountIdWithHttpInfo(String accountId, PostCampaignV202301 postCampaignV202301) throws ApiException { + okhttp3.Call localVarCall = postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(accountId, postCampaignV202301, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Create a request for a Catalog available to the indicated account. - * @param accountId The account to request the catalog for. (required) - * @param jsonApiRequestOfCatalogRequest (optional) + * Create a campaign and assign budgets for the given account id with creatable campaign attributes given in request body constrained by business validation. The validation error includes details and source of errors. Pacing can be adjusted and affected by the status of the campaign and the days left on the campaign if auto daily pacing is enabled. + * @param accountId The account to request the campaign for. (required) + * @param postCampaignV202301 Creatable campaign attributes (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 Catalog request successfully created -
201 Success -
*/ - public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdAsync(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdAsync(String accountId, PostCampaignV202301 postCampaignV202301, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfCatalogRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApi202301ExternalAccountCampaignsByAccountIdValidateBeforeCall(accountId, postCampaignV202301, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param changeDatesOfBalanceRequest (optional) + * Build call for postApiV1ExternalAccountCatalogsByAccountId + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfCatalogRequest (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request successfully created -
*/ - public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdCall(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -7854,12 +6754,11 @@ public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCa basePath = null; } - Object localVarPostBody = changeDatesOfBalanceRequest; + Object localVarPostBody = jsonApiRequestOfCatalogRequest; // create path and map variables - String localVarPath = "/2024-04/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) - .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + String localVarPath = "/2024-04/retail-media/accounts/{accountId}/catalogs" + .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -7888,79 +6787,71 @@ public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCa } @SuppressWarnings("rawtypes") - private okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); - } - - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountCatalogsByAccountId(Async)"); } - return postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); + return postApiV1ExternalAccountCatalogsByAccountIdCall(accountId, jsonApiRequestOfCatalogRequest, _callback); } /** * - * Change dates of a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param changeDatesOfBalanceRequest (optional) - * @return BalanceResponse + * Create a request for a Catalog available to the indicated account. + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfCatalogRequest (optional) + * @return JsonApiSingleResponseOfCatalogStatus * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request successfully created -
*/ - public BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { - ApiResponse localVarResp = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, changeDatesOfBalanceRequest); + public JsonApiSingleResponseOfCatalogStatus postApiV1ExternalAccountCatalogsByAccountId(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountCatalogsByAccountIdWithHttpInfo(accountId, jsonApiRequestOfCatalogRequest); return localVarResp.getData(); } /** * - * Change dates of a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param changeDatesOfBalanceRequest (optional) - * @return ApiResponse<BalanceResponse> + * Create a request for a Catalog available to the indicated account. + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfCatalogRequest (optional) + * @return ApiResponse<JsonApiSingleResponseOfCatalogStatus> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request successfully created -
*/ - public ApiResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse postApiV1ExternalAccountCatalogsByAccountIdWithHttpInfo(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfCatalogRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Change dates of a balance for the given account id - * @param accountId The account of the balance (required) - * @param balanceId The balance to change the dates (required) - * @param changeDatesOfBalanceRequest (optional) + * Create a request for a Catalog available to the indicated account. + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfCatalogRequest (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 Success -
200 Catalog request successfully created -
*/ - public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdAsync(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdAsync(String accountId, JsonApiRequestOfCatalogRequest jsonApiRequestOfCatalogRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfCatalogRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ApplicationSummaryModel.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ApplicationSummaryModel.java index 720f85e5..3e47cba8 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ApplicationSummaryModel.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ApplicationSummaryModel.java @@ -45,7 +45,7 @@ import com.criteo.api.retailmedia.v2024_04.JSON; /** - * Model of ApplicationSummary + * Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModel { diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ApplicationSummaryModelResource.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ApplicationSummaryModelResource.java index 427ec8df..7dd797ce 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ApplicationSummaryModelResource.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ApplicationSummaryModelResource.java @@ -46,7 +46,7 @@ import com.criteo.api.retailmedia.v2024_04.JSON; /** - * A class that represents a ValueType in a guild compliant way + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResource { diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ApplicationSummaryModelResponse.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ApplicationSummaryModelResponse.java index 8e0f410c..bf5928e0 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ApplicationSummaryModelResponse.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ApplicationSummaryModelResponse.java @@ -49,7 +49,7 @@ import com.criteo.api.retailmedia.v2024_04.JSON; /** - * Response of ApplicationSummaryModel + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResponse { diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/AsyncCampaignsReport.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/AsyncCampaignsReport.java index 607a7f0b..8a7b1433 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/AsyncCampaignsReport.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/AsyncCampaignsReport.java @@ -439,6 +439,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/AsyncLineItemsReport.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/AsyncLineItemsReport.java index 546e428c..e5ddedb2 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/AsyncLineItemsReport.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/AsyncLineItemsReport.java @@ -439,6 +439,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/AsyncRevenueReport.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/AsyncRevenueReport.java index da68e878..f926b1f0 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/AsyncRevenueReport.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/AsyncRevenueReport.java @@ -274,6 +274,59 @@ public BuyTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_BUY_TYPE) private BuyTypeEnum buyType; + /** + * Gets or Sets advertiserTypes + */ + @JsonAdapter(AdvertiserTypesEnum.Adapter.class) + public enum AdvertiserTypesEnum { + RETAILER("retailer"), + + BRAND("brand"), + + SELLER("seller"); + + private String value; + + AdvertiserTypesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AdvertiserTypesEnum fromValue(String value) { + for (AdvertiserTypesEnum b : AdvertiserTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AdvertiserTypesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AdvertiserTypesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AdvertiserTypesEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_ADVERTISER_TYPES = "advertiserTypes"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_TYPES) + private List advertiserTypes = null; + /** * Gets or Sets skuRelations */ @@ -621,6 +674,8 @@ public enum DimensionsEnum { ACCOUNTTYPENAME("accountTypeName"), + ADVERTISERTYPE("advertiserType"), + CAMPAIGNID("campaignId"), CAMPAIGNNAME("campaignName"), @@ -667,6 +722,8 @@ public enum DimensionsEnum { ADVPRODUCTMPN("advProductMpn"), + BUYTYPE("buyType"), + SOLDBY("soldBy"), SALECHANNEL("saleChannel"), @@ -788,6 +845,8 @@ public enum MetricsEnum { ASSISTEDUNITS("assistedUnits"), + REVENUE("revenue"), + OPENAUCTIONREVENUE("openAuctionRevenue"), PREFERREDDEALSREVENUE("preferredDealsRevenue"), @@ -898,7 +957,7 @@ public AsyncRevenueReport addIdsItem(String idsItem) { } /** - * Campaign ids to report on + * Supply account ids to report on * @return ids **/ @javax.annotation.Nullable @@ -920,7 +979,7 @@ public AsyncRevenueReport id(String id) { } /** - * Campaign id to report on + * Supply account id to report on * @return id **/ @javax.annotation.Nullable @@ -1023,6 +1082,36 @@ public void setBuyType(BuyTypeEnum buyType) { } + public AsyncRevenueReport advertiserTypes(List advertiserTypes) { + + this.advertiserTypes = advertiserTypes; + return this; + } + + public AsyncRevenueReport addAdvertiserTypesItem(AdvertiserTypesEnum advertiserTypesItem) { + if (this.advertiserTypes == null) { + this.advertiserTypes = null; + } + this.advertiserTypes.add(advertiserTypesItem); + return this; + } + + /** + * Filter on the type of advertiser: retailer, brand, seller + * @return advertiserTypes + **/ + @javax.annotation.Nullable + + public List getAdvertiserTypes() { + return advertiserTypes; + } + + + public void setAdvertiserTypes(List advertiserTypes) { + this.advertiserTypes = advertiserTypes; + } + + public AsyncRevenueReport skuRelations(List skuRelations) { this.skuRelations = skuRelations; @@ -1349,6 +1438,7 @@ public boolean equals(Object o) { Objects.equals(this.revenueType, asyncRevenueReport.revenueType) && Objects.equals(this.soldBy, asyncRevenueReport.soldBy) && Objects.equals(this.buyType, asyncRevenueReport.buyType) && + Objects.equals(this.advertiserTypes, asyncRevenueReport.advertiserTypes) && Objects.equals(this.skuRelations, asyncRevenueReport.skuRelations) && Objects.equals(this.format, asyncRevenueReport.format) && Objects.equals(this.campaignType, asyncRevenueReport.campaignType) && @@ -1369,7 +1459,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ids, id, reportType, revenueType, soldBy, buyType, skuRelations, format, campaignType, salesChannel, clickAttributionWindow, viewAttributionWindow, dimensions, metrics, startDate, endDate, timezone, additionalProperties); + return Objects.hash(ids, id, reportType, revenueType, soldBy, buyType, advertiserTypes, skuRelations, format, campaignType, salesChannel, clickAttributionWindow, viewAttributionWindow, dimensions, metrics, startDate, endDate, timezone, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -1389,6 +1479,7 @@ public String toString() { sb.append(" revenueType: ").append(toIndentedString(revenueType)).append("\n"); sb.append(" soldBy: ").append(toIndentedString(soldBy)).append("\n"); sb.append(" buyType: ").append(toIndentedString(buyType)).append("\n"); + sb.append(" advertiserTypes: ").append(toIndentedString(advertiserTypes)).append("\n"); sb.append(" skuRelations: ").append(toIndentedString(skuRelations)).append("\n"); sb.append(" format: ").append(toIndentedString(format)).append("\n"); sb.append(" campaignType: ").append(toIndentedString(campaignType)).append("\n"); @@ -1429,6 +1520,7 @@ private String toIndentedString(Object o) { openapiFields.add("revenueType"); openapiFields.add("soldBy"); openapiFields.add("buyType"); + openapiFields.add("advertiserTypes"); openapiFields.add("skuRelations"); openapiFields.add("format"); openapiFields.add("campaignType"); @@ -1486,6 +1578,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `buyType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyType").toString())); } // ensure the optional json data is an array if present + if (jsonObj.get("advertiserTypes") != null && !jsonObj.get("advertiserTypes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserTypes` to be an array in the JSON string but got `%s`", jsonObj.get("advertiserTypes").toString())); + } + // ensure the optional json data is an array if present if (jsonObj.get("skuRelations") != null && !jsonObj.get("skuRelations").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `skuRelations` to be an array in the JSON string but got `%s`", jsonObj.get("skuRelations").toString())); } diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/CommonProblem.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/CommonProblem.java index c1c1eabb..c63af0d2 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/CommonProblem.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/CommonProblem.java @@ -47,7 +47,7 @@ import com.criteo.api.retailmedia.v2024_04.JSON; /** - * Common problem object. Can be specialized as needed. + * Common problem object. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CommonProblem { @@ -222,7 +222,7 @@ public CommonProblem code(String code) { } /** - * A machine-readable error code, expressed as a string value. + * A machine-readable error code, expressed as a string value. * @return code **/ @javax.annotation.Nullable diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ExternalBalanceResponse.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ExternalBalanceResponse.java index 4ef27940..00437db4 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ExternalBalanceResponse.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/ExternalBalanceResponse.java @@ -256,6 +256,61 @@ public SpendTypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_SPEND_TYPE) private SpendTypeEnum spendType; + /** + * Billing type for Private Market. + */ + @JsonAdapter(PrivateMarketBillingTypeEnum.Adapter.class) + public enum PrivateMarketBillingTypeEnum { + NOTAPPLICABLE("NotApplicable"), + + BILLBYRETAILER("BillByRetailer"), + + BILLBYCRITEO("BillByCriteo"), + + UNKNOWN("Unknown"); + + private String value; + + PrivateMarketBillingTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivateMarketBillingTypeEnum fromValue(String value) { + for (PrivateMarketBillingTypeEnum b : PrivateMarketBillingTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivateMarketBillingTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivateMarketBillingTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivateMarketBillingTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_PRIVATE_MARKET_BILLING_TYPE = "privateMarketBillingType"; + @SerializedName(SERIALIZED_NAME_PRIVATE_MARKET_BILLING_TYPE) + private PrivateMarketBillingTypeEnum privateMarketBillingType; + public ExternalBalanceResponse() { } @@ -566,6 +621,28 @@ public void setSpendType(SpendTypeEnum spendType) { this.spendType = spendType; } + + public ExternalBalanceResponse privateMarketBillingType(PrivateMarketBillingTypeEnum privateMarketBillingType) { + + this.privateMarketBillingType = privateMarketBillingType; + return this; + } + + /** + * Billing type for Private Market. + * @return privateMarketBillingType + **/ + @javax.annotation.Nonnull + + public PrivateMarketBillingTypeEnum getPrivateMarketBillingType() { + return privateMarketBillingType; + } + + + public void setPrivateMarketBillingType(PrivateMarketBillingTypeEnum privateMarketBillingType) { + this.privateMarketBillingType = privateMarketBillingType; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -634,13 +711,14 @@ public boolean equals(Object o) { Objects.equals(this.updatedAt, externalBalanceResponse.updatedAt) && Objects.equals(this.balanceType, externalBalanceResponse.balanceType) && Objects.equals(this.salesForceId, externalBalanceResponse.salesForceId) && - Objects.equals(this.spendType, externalBalanceResponse.spendType)&& + Objects.equals(this.spendType, externalBalanceResponse.spendType) && + Objects.equals(this.privateMarketBillingType, externalBalanceResponse.privateMarketBillingType)&& Objects.equals(this.additionalProperties, externalBalanceResponse.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name, poNumber, memo, deposited, spent, remaining, startDate, endDate, status, createdAt, updatedAt, balanceType, salesForceId, spendType, additionalProperties); + return Objects.hash(name, poNumber, memo, deposited, spent, remaining, startDate, endDate, status, createdAt, updatedAt, balanceType, salesForceId, spendType, privateMarketBillingType, additionalProperties); } @Override @@ -661,6 +739,7 @@ public String toString() { sb.append(" balanceType: ").append(toIndentedString(balanceType)).append("\n"); sb.append(" salesForceId: ").append(toIndentedString(salesForceId)).append("\n"); sb.append(" spendType: ").append(toIndentedString(spendType)).append("\n"); + sb.append(" privateMarketBillingType: ").append(toIndentedString(privateMarketBillingType)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -698,6 +777,7 @@ private String toIndentedString(Object o) { openapiFields.add("balanceType"); openapiFields.add("salesForceId"); openapiFields.add("spendType"); + openapiFields.add("privateMarketBillingType"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -715,6 +795,7 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("balanceType"); openapiRequiredFields.add("salesForceId"); openapiRequiredFields.add("spendType"); + openapiRequiredFields.add("privateMarketBillingType"); } /** @@ -757,6 +838,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (!jsonObj.get("spendType").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `spendType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("spendType").toString())); } + if (!jsonObj.get("privateMarketBillingType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `privateMarketBillingType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privateMarketBillingType").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/JsonApiPageResponseOfAccount.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/JsonApiPageResponseOfAccount.java index 9a8547a8..7aecebb7 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/JsonApiPageResponseOfAccount.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/JsonApiPageResponseOfAccount.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfAccount metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/JsonApiPageResponseOfBrand.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/JsonApiPageResponseOfBrand.java index bffc5bf8..8495f963 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/JsonApiPageResponseOfBrand.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/JsonApiPageResponseOfBrand.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfBrand metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/JsonApiPageResponseOfRetailer.java b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/JsonApiPageResponseOfRetailer.java index 1c4b487a..30fa0131 100644 --- a/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/JsonApiPageResponseOfRetailer.java +++ b/sdks/retailmedia_2024-04/src/main/java/com/criteo/api/retailmedia/v2024_04/model/JsonApiPageResponseOfRetailer.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfRetailer metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2023-04/.github/workflows/maven.yml b/sdks/retailmedia_2024-07/.github/workflows/maven.yml similarity index 100% rename from sdks/retailmedia_2023-04/.github/workflows/maven.yml rename to sdks/retailmedia_2024-07/.github/workflows/maven.yml diff --git a/sdks/retailmedia_2023-04/.gitignore b/sdks/retailmedia_2024-07/.gitignore similarity index 100% rename from sdks/retailmedia_2023-04/.gitignore rename to sdks/retailmedia_2024-07/.gitignore diff --git a/sdks/retailmedia_2024-07/.openapi-generator/FILES b/sdks/retailmedia_2024-07/.openapi-generator/FILES new file mode 100644 index 00000000..c1428db8 --- /dev/null +++ b/sdks/retailmedia_2024-07/.openapi-generator/FILES @@ -0,0 +1,522 @@ +.github/workflows/maven.yml +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +api/openapi.yaml +build.gradle +build.sbt +docs/AccountsApi.md +docs/AddFundsToBalanceRequest.md +docs/AddRemoveKeywordModel.md +docs/AddRemoveKeywordsModel.md +docs/AddRemoveKeywordsModelRequest.md +docs/AddRemoveKeywordsModelResource.md +docs/AddToBasketIdsUpdateModel202110Request.md +docs/AddToBasketTarget202110Request.md +docs/AddToBasketTarget202110Response.md +docs/AnalyticsApi.md +docs/ApplicationSummaryModel.md +docs/ApplicationSummaryModelResource.md +docs/ApplicationSummaryModelResponse.md +docs/ApprovalStatusModel.md +docs/Asset.md +docs/AssetResource.md +docs/AssetResponse.md +docs/AsyncCampaignsReport.md +docs/AsyncCampaignsReportRequest.md +docs/AsyncCampaignsReportResource.md +docs/AsyncLineItemsReport.md +docs/AsyncLineItemsReportRequest.md +docs/AsyncLineItemsReportResource.md +docs/AsyncReportResponse.md +docs/AsyncRevenueReport.md +docs/AsyncRevenueReportRequest.md +docs/AsyncRevenueReportResource.md +docs/AuctionLineItemCreateModelRequest.md +docs/AuctionLineItemPagedListResponse.md +docs/AuctionLineItemResponse.md +docs/AuctionLineItemUpdateModelRequest.md +docs/AudienceApi.md +docs/AudienceIdsUpdateModel202110Request.md +docs/AudienceTarget202110Request.md +docs/AudienceTarget202110Response.md +docs/BalanceApi.md +docs/BalanceCampaign202110ListRequest.md +docs/BalanceCampaign202110PagedListResponse.md +docs/BalanceHistoryChangeDataCaptureV1.md +docs/BalanceResponse.md +docs/BalanceResponsePagedListResponse.md +docs/CampaignApi.md +docs/CampaignAttributesV202301.md +docs/CampaignBudgetOverrides.md +docs/CampaignDailyBudgetOverride.md +docs/CampaignMonthlyBudgetOverride.md +docs/CampaignV202301.md +docs/Category202204.md +docs/Category202204ListResponse.md +docs/ChangeDatesOfBalanceRequest.md +docs/ChangeDetailsV1.md +docs/ChoiceOption.md +docs/ChoiceVariableSpecification.md +docs/ChoiceVariableValue.md +docs/ColorVariableValue.md +docs/CommonError.md +docs/CommonLineItemPagedListResponse.md +docs/CommonLineItemResponse.md +docs/CommonProblem.md +docs/CommonWarning.md +docs/CreateBalanceRequest.md +docs/Creative202110.md +docs/Creative202110ListResponse.md +docs/Creative202210.md +docs/Creative202210ListResponse.md +docs/Creative202210Response.md +docs/CreativeCreateModel202207.md +docs/CreativeUpdateModel202207.md +docs/DailyLineItemBudgetOverride.md +docs/EditableCampaignAttributesV202301.md +docs/ExternalAccount.md +docs/ExternalAddFundsToBalance.md +docs/ExternalAddToBasketIdsUpdateModel202110.md +docs/ExternalAddToBasketTarget202110.md +docs/ExternalAuctionLineItem.md +docs/ExternalAuctionLineItemCreateModel.md +docs/ExternalAuctionLineItemUpdateModel.md +docs/ExternalAudienceIdsUpdateModel202110.md +docs/ExternalAudienceTarget202110.md +docs/ExternalBalanceResponse.md +docs/ExternalBrand.md +docs/ExternalCatalogRequest.md +docs/ExternalCatalogStatus.md +docs/ExternalChangeDatesOfBalance.md +docs/ExternalCommonLineItem.md +docs/ExternalCreateBalance.md +docs/ExternalKeywordTarget202110.md +docs/ExternalLineItemCapping202110.md +docs/ExternalLineItemPage202110.md +docs/ExternalLineItemPageCategory202110.md +docs/ExternalPreferredLineItem202110.md +docs/ExternalPreferredLineItemCreateModel202110.md +docs/ExternalPreferredLineItemUpdateModel202110.md +docs/ExternalPromotedProduct202110.md +docs/ExternalRetailer.md +docs/ExternalRetailerPages202110.md +docs/ExternalStoreIdsUpdateModel202110.md +docs/ExternalStoreTarget202110.md +docs/ExternalUpdateBalanceModel.md +docs/FilesVariableValue.md +docs/FilesVariablesSpecification.md +docs/GatewayApi.md +docs/HyperlinkVariableValue.md +docs/InputKeywordsModel.md +docs/InputResourceOfAuctionLineItemCreateModel.md +docs/InputResourceOfPreferredLineItemCreateModel202110.md +docs/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.md +docs/JsonApiBodyWithIdOfInt64AndAccountAndAccount.md +docs/JsonApiBodyWithIdOfInt64AndBrandAndBrand.md +docs/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.md +docs/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md +docs/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.md +docs/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md +docs/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.md +docs/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.md +docs/JsonApiPageResponseOfAccount.md +docs/JsonApiPageResponseOfBrand.md +docs/JsonApiPageResponseOfCampaignV202301.md +docs/JsonApiPageResponseOfRetailer.md +docs/JsonApiRequestOfCatalogRequest.md +docs/JsonApiSingleResponseOfCampaignV202301.md +docs/JsonApiSingleResponseOfCatalogStatus.md +docs/JsonApiSingleResponseOfLineItemBidMultipliers.md +docs/KeywordDataModel.md +docs/KeywordTarget202110Request.md +docs/KeywordTarget202110Response.md +docs/KeywordsModel.md +docs/KeywordsModelResource.md +docs/KeywordsModelResponse.md +docs/LineItemBidMultipliers.md +docs/LineItemBidMultipliersRequest.md +docs/LineItemBidMultipliersResponse.md +docs/LineItemBudgetOverrides.md +docs/MatchTypeModel.md +docs/Metadata.md +docs/MonthlyLineItemBudegetOverride.md +docs/NegotiationStateModel.md +docs/PageMetadata.md +docs/PageOfBalanceHistoryChangeDataCaptureV1.md +docs/PageTypeEnvironment.md +docs/PostCampaignV202301.md +docs/PreferredLineItem202110PagedListResponse.md +docs/PreferredLineItem202110Response.md +docs/PreferredLineItemCreateModel202110Request.md +docs/PreferredLineItemUpdateModel202110Request.md +docs/ProblemDetails.md +docs/PromotedProduct202110ListRequest.md +docs/PromotedProduct202110PagedListResponse.md +docs/ProposalStatusModel.md +docs/ProposalStatusModelResource.md +docs/ProposalStatusModelResponse.md +docs/PutCampaignV202301.md +docs/ReportOutcome.md +docs/ResourceOfAddFundsToBalance.md +docs/ResourceOfAuctionLineItem.md +docs/ResourceOfAuctionLineItemUpdateModel.md +docs/ResourceOfBalanceCampaign202110.md +docs/ResourceOfBalanceResponse.md +docs/ResourceOfCategory202204.md +docs/ResourceOfChangeDatesOfBalance.md +docs/ResourceOfCommonLineItem.md +docs/ResourceOfCreateBalance.md +docs/ResourceOfCreative202110.md +docs/ResourceOfCreative202210.md +docs/ResourceOfLineItemBidMultipliers.md +docs/ResourceOfPreferredLineItem202110.md +docs/ResourceOfPreferredLineItemUpdateModel202110.md +docs/ResourceOfPromotedProduct202110.md +docs/ResourceOfRetailMediaAccount.md +docs/ResourceOfTemplate.md +docs/ResourceOfUpdateBalanceModel.md +docs/ResourceOutcome.md +docs/ResourceOutcomeOfRetailMediaAccount.md +docs/RetailMediaAccount.md +docs/RetailMediaBrandAccountCreation.md +docs/RetailMediaBrands.md +docs/RetailMediaSeller.md +docs/RetailMediaSellerAccountCreation.md +docs/ReviewStateModel.md +docs/RmLegacyAudienceCreateEntityV1.md +docs/RmLegacyAudienceCreateEntityV1Resource.md +docs/RmLegacyAudienceCreateEntityV1Response.md +docs/RmLegacyAudienceCreateEntityV2.md +docs/RmLegacyAudienceCreateEntityV2Resource.md +docs/RmLegacyAudienceCreateEntityV2Response.md +docs/RmLegacyAudienceCreateInputEntityV1.md +docs/RmLegacyAudienceCreateInputEntityV2.md +docs/RmLegacyAudienceGetEntityV1.md +docs/RmLegacyAudienceGetEntityV1ListResponse.md +docs/RmLegacyAudienceGetEntityV1Resource.md +docs/RmLegacyAudienceGetEntityV2.md +docs/RmLegacyAudienceGetEntityV2ListResponse.md +docs/RmLegacyAudienceGetEntityV2Resource.md +docs/RmLegacyAudienceUserBehaviorCreateV2.md +docs/RmLegacyAudienceUserBehaviorDetailsV2.md +docs/RmLegacySegmentCustomerList.md +docs/RmLegacySegmentUserBehaviorCreateV2.md +docs/RmLegacySegmentUserBehaviorV1.md +docs/RmLegacySegmentUserBehaviorV2.md +docs/RmcaCommonProblem.md +docs/Section.md +docs/SetBidModel.md +docs/SetBidsModel.md +docs/SetBidsModelRequest.md +docs/SetBidsModelResource.md +docs/StatusResponse.md +docs/StatusResponseResource.md +docs/StoreIdsUpdateModel202110Request.md +docs/StoreTarget202110Request.md +docs/StoreTarget202110Response.md +docs/Template.md +docs/TemplateListResponse.md +docs/TemplateResponse.md +docs/TemplateVariable.md +docs/TemplateVariableValue.md +docs/TextVariableSpecification.md +docs/TextVariableValue.md +docs/UpdateBalanceModelRequest.md +docs/ValueResourceCollectionInputOfRetailMediaSeller.md +docs/ValueResourceCollectionOutcomeOfRetailMediaSeller.md +docs/ValueResourceInputOfCampaignBudgetOverrides.md +docs/ValueResourceInputOfLineItemBudgetOverrides.md +docs/ValueResourceInputOfRetailMediaBrandAccountCreation.md +docs/ValueResourceInputOfRetailMediaBrands.md +docs/ValueResourceInputOfRetailMediaSellerAccountCreation.md +docs/ValueResourceOfCampaignBudgetOverrides.md +docs/ValueResourceOfLineItemBudgetOverrides.md +docs/ValueResourceOfRetailMediaBrandAccountCreation.md +docs/ValueResourceOfRetailMediaBrands.md +docs/ValueResourceOfRetailMediaSeller.md +docs/ValueResourceOfRetailMediaSellerAccountCreation.md +docs/ValueResourceOutcomeOfCampaignBudgetOverrides.md +docs/ValueResourceOutcomeOfLineItemBudgetOverrides.md +docs/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.md +docs/ValueTypeResourceOfAddToBasketTarget202110.md +docs/ValueTypeResourceOfAudienceIdsUpdateModel202110.md +docs/ValueTypeResourceOfAudienceTarget202110.md +docs/ValueTypeResourceOfKeywordTarget202110.md +docs/ValueTypeResourceOfStoreIdsUpdateModel202110.md +docs/ValueTypeResourceOfStoreTarget202110.md +git_push.sh +gradle.properties +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +pom.xml +settings.gradle +src/main/AndroidManifest.xml +src/main/java/com/criteo/api/retailmedia/v2024_07/ApiCallback.java +src/main/java/com/criteo/api/retailmedia/v2024_07/ApiClient.java +src/main/java/com/criteo/api/retailmedia/v2024_07/ApiClientBuilder.java +src/main/java/com/criteo/api/retailmedia/v2024_07/ApiException.java +src/main/java/com/criteo/api/retailmedia/v2024_07/ApiResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/Configuration.java +src/main/java/com/criteo/api/retailmedia/v2024_07/GzipRequestInterceptor.java +src/main/java/com/criteo/api/retailmedia/v2024_07/JSON.java +src/main/java/com/criteo/api/retailmedia/v2024_07/Pair.java +src/main/java/com/criteo/api/retailmedia/v2024_07/ProgressRequestBody.java +src/main/java/com/criteo/api/retailmedia/v2024_07/ProgressResponseBody.java +src/main/java/com/criteo/api/retailmedia/v2024_07/ServerConfiguration.java +src/main/java/com/criteo/api/retailmedia/v2024_07/ServerVariable.java +src/main/java/com/criteo/api/retailmedia/v2024_07/StringUtil.java +src/main/java/com/criteo/api/retailmedia/v2024_07/api/AccountsApi.java +src/main/java/com/criteo/api/retailmedia/v2024_07/api/AnalyticsApi.java +src/main/java/com/criteo/api/retailmedia/v2024_07/api/AudienceApi.java +src/main/java/com/criteo/api/retailmedia/v2024_07/api/BalanceApi.java +src/main/java/com/criteo/api/retailmedia/v2024_07/api/CampaignApi.java +src/main/java/com/criteo/api/retailmedia/v2024_07/api/GatewayApi.java +src/main/java/com/criteo/api/retailmedia/v2024_07/auth/ApiKeyAuth.java +src/main/java/com/criteo/api/retailmedia/v2024_07/auth/Authentication.java +src/main/java/com/criteo/api/retailmedia/v2024_07/auth/HttpBasicAuth.java +src/main/java/com/criteo/api/retailmedia/v2024_07/auth/HttpBearerAuth.java +src/main/java/com/criteo/api/retailmedia/v2024_07/auth/OAuth.java +src/main/java/com/criteo/api/retailmedia/v2024_07/auth/OAuthFlow.java +src/main/java/com/criteo/api/retailmedia/v2024_07/auth/OAuthOkHttpClient.java +src/main/java/com/criteo/api/retailmedia/v2024_07/auth/RetryingOAuth.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AbstractOpenApiSchema.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddFundsToBalanceRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordsModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordsModelRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordsModelResource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddToBasketIdsUpdateModel202110Request.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddToBasketTarget202110Request.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddToBasketTarget202110Response.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApplicationSummaryModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApplicationSummaryModelResource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApplicationSummaryModelResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApprovalStatusModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/Asset.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AssetResource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AssetResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncCampaignsReport.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncCampaignsReportRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncCampaignsReportResource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncLineItemsReport.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncLineItemsReportRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncLineItemsReportResource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncReportResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReport.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReportRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReportResource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemCreateModelRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemPagedListResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemUpdateModelRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AudienceIdsUpdateModel202110Request.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AudienceTarget202110Request.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/AudienceTarget202110Response.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceCampaign202110ListRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceCampaign202110PagedListResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceHistoryChangeDataCaptureV1.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceResponsePagedListResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignAttributesV202301.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignBudgetOverrides.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignDailyBudgetOverride.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignMonthlyBudgetOverride.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignV202301.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/Category202204.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/Category202204ListResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChangeDatesOfBalanceRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChangeDetailsV1.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChoiceOption.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChoiceVariableSpecification.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChoiceVariableValue.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ColorVariableValue.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonError.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonLineItemPagedListResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonLineItemResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonProblem.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonWarning.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/CreateBalanceRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202110ListResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202210.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202210ListResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202210Response.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/CreativeCreateModel202207.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/CreativeUpdateModel202207.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/DailyLineItemBudgetOverride.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/EditableCampaignAttributesV202301.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAccount.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAddFundsToBalance.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAddToBasketIdsUpdateModel202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAddToBasketTarget202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAuctionLineItem.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAuctionLineItemCreateModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAuctionLineItemUpdateModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAudienceIdsUpdateModel202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAudienceTarget202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalBalanceResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalBrand.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCatalogRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCatalogStatus.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalChangeDatesOfBalance.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCommonLineItem.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCreateBalance.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalKeywordTarget202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalLineItemCapping202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalLineItemPage202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalLineItemPageCategory202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPreferredLineItem202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPreferredLineItemCreateModel202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPreferredLineItemUpdateModel202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPromotedProduct202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalRetailer.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalRetailerPages202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalStoreIdsUpdateModel202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalStoreTarget202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalUpdateBalanceModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/FilesVariableValue.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/FilesVariablesSpecification.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/HyperlinkVariableValue.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/InputKeywordsModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/InputResourceOfAuctionLineItemCreateModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/InputResourceOfPreferredLineItemCreateModel202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndAccountAndAccount.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndBrandAndBrand.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfAccount.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfBrand.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfCampaignV202301.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfRetailer.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiRequestOfCatalogRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiSingleResponseOfCampaignV202301.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiSingleResponseOfCatalogStatus.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiSingleResponseOfLineItemBidMultipliers.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordDataModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordTarget202110Request.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordTarget202110Response.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordsModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordsModelResource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordsModelResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBidMultipliers.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBidMultipliersRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBidMultipliersResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBudgetOverrides.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/MatchTypeModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/Metadata.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/MonthlyLineItemBudegetOverride.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/NegotiationStateModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/PageMetadata.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/PageOfBalanceHistoryChangeDataCaptureV1.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/PageTypeEnvironment.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/PostCampaignV202301.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItem202110PagedListResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItem202110Response.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItemCreateModel202110Request.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItemUpdateModel202110Request.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProblemDetails.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/PromotedProduct202110ListRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/PromotedProduct202110PagedListResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProposalStatusModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProposalStatusModelResource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProposalStatusModelResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/PutCampaignV202301.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ReportOutcome.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfAddFundsToBalance.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfAuctionLineItem.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfAuctionLineItemUpdateModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfBalanceCampaign202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfBalanceResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCategory202204.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfChangeDatesOfBalance.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCommonLineItem.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCreateBalance.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCreative202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCreative202210.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfLineItemBidMultipliers.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfPreferredLineItem202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfPreferredLineItemUpdateModel202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfPromotedProduct202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfRetailMediaAccount.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfTemplate.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfUpdateBalanceModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOutcome.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOutcomeOfRetailMediaAccount.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaAccount.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaBrandAccountCreation.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaBrands.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaSeller.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaSellerAccountCreation.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ReviewStateModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV1.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV1Resource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV1Response.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV2.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV2Resource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV2Response.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateInputEntityV1.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateInputEntityV2.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV1.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV1ListResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV1Resource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV2.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV2ListResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV2Resource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceUserBehaviorCreateV2.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceUserBehaviorDetailsV2.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentCustomerList.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentUserBehaviorCreateV2.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentUserBehaviorV1.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentUserBehaviorV2.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmcaCommonProblem.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/Section.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidsModel.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidsModelRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidsModelResource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/StatusResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/StatusResponseResource.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/StoreIdsUpdateModel202110Request.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/StoreTarget202110Request.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/StoreTarget202110Response.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/Template.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateListResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateResponse.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateVariable.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateVariableValue.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/TextVariableSpecification.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/TextVariableValue.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/UpdateBalanceModelRequest.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceCollectionInputOfRetailMediaSeller.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceCollectionOutcomeOfRetailMediaSeller.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfCampaignBudgetOverrides.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfLineItemBudgetOverrides.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfRetailMediaBrandAccountCreation.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfRetailMediaBrands.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfRetailMediaSellerAccountCreation.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfCampaignBudgetOverrides.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfLineItemBudgetOverrides.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaBrandAccountCreation.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaBrands.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaSeller.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaSellerAccountCreation.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOutcomeOfCampaignBudgetOverrides.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOutcomeOfLineItemBudgetOverrides.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAddToBasketTarget202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAudienceIdsUpdateModel202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAudienceTarget202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfKeywordTarget202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfStoreIdsUpdateModel202110.java +src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfStoreTarget202110.java +src/test/java/com/criteo/api/retailmedia/v2024_07/ExampleApplication.java +src/test/java/com/criteo/api/retailmedia/v2024_07/GatewayApiTest.java diff --git a/sdks/retailmedia_2023-04/.openapi-generator/VERSION b/sdks/retailmedia_2024-07/.openapi-generator/VERSION similarity index 100% rename from sdks/retailmedia_2023-04/.openapi-generator/VERSION rename to sdks/retailmedia_2024-07/.openapi-generator/VERSION diff --git a/sdks/retailmedia_2023-04/README.md b/sdks/retailmedia_2024-07/README.md similarity index 67% rename from sdks/retailmedia_2023-04/README.md rename to sdks/retailmedia_2024-07/README.md index 9c08c1cc..3f94daa5 100644 --- a/sdks/retailmedia_2023-04/README.md +++ b/sdks/retailmedia_2024-07/README.md @@ -1,4 +1,4 @@ -# JAVA SDK for Criteo API retailmedia for 2023_04 version +# JAVA SDK for Criteo API retailmedia for 2024_07 version ## Introduction API Client Libraries can facilitate your use of the Criteo API allowing you to build unique and customized solutions to serve your businesses and clients. @@ -8,7 +8,7 @@ More information: [https://developers.criteo.com/](https://developers.criteo.com Criteo API -- Package version: 2023.04.0.240626 +- Package version: 2024.07.0.240731 *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -38,7 +38,7 @@ Add this dependency to your project's POM: com.criteo criteo-api-retailmedia-sdk - 2023.04.0.240626 + 2024.07.0.240731 compile ``` @@ -48,7 +48,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.criteo:criteo-api-retailmedia-sdk:2023.04.0.240626" +compile "com.criteo:criteo-api-retailmedia-sdk:2024.07.0.240731" ``` ### Others @@ -61,11 +61,11 @@ At first generate the JAR by executing: Then manually install the following JARs: -* `build/libs/criteo-api-retailmedia-sdk-2023.04.0.240626.jar` +* `build/libs/criteo-api-retailmedia-sdk-2024.07.0.240731.jar` ## Example -Please see [src/test/java/com/criteo/api/retailmedia/v2023_04/ExampleApplication.java](src/test/java/com/criteo/api/retailmedia/v2023_04/ExampleApplication.java) for an example on how to perform a simple call. +Please see [src/test/java/com/criteo/api/retailmedia/v2024_07/ExampleApplication.java](src/test/java/com/criteo/api/retailmedia/v2024_07/ExampleApplication.java) for an example on how to perform a simple call. ## Documentation for API Endpoints @@ -73,81 +73,98 @@ All URIs are relative to *https://api.criteo.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AnalyticsApi* | [**generateAsyncCampaignsReport**](docs/AnalyticsApi.md#generateAsyncCampaignsReport) | **POST** /2023-04/retail-media/reports/campaigns | -*AnalyticsApi* | [**generateAsyncLineItemsReport**](docs/AnalyticsApi.md#generateAsyncLineItemsReport) | **POST** /2023-04/retail-media/reports/line-items | -*AnalyticsApi* | [**getAsyncExportOutput**](docs/AnalyticsApi.md#getAsyncExportOutput) | **GET** /2023-04/retail-media/reports/{reportId}/output | -*AnalyticsApi* | [**getAsyncExportStatus**](docs/AnalyticsApi.md#getAsyncExportStatus) | **GET** /2023-04/retail-media/reports/{reportId}/status | -*AudienceApi* | [**legacyCreateAudienceV1**](docs/AudienceApi.md#legacyCreateAudienceV1) | **POST** /2023-04/retail-media/accounts/{accountId}/audiences | -*AudienceApi* | [**legacyGetAudienceV1**](docs/AudienceApi.md#legacyGetAudienceV1) | **GET** /2023-04/retail-media/accounts/{accountId}/audiences | -*AudienceApi* | [**legacyGetAudienceV2**](docs/AudienceApi.md#legacyGetAudienceV2) | **GET** /2023-04/retail-media/v2/accounts/{accountId}/audiences | -*AudienceApi* | [**legacyUpdateAudienceV2**](docs/AudienceApi.md#legacyUpdateAudienceV2) | **POST** /2023-04/retail-media/v2/accounts/{accountId}/audiences | -*CampaignApi* | [**addRemoveKeywords**](docs/CampaignApi.md#addRemoveKeywords) | **POST** /2023-04/retail-media/line-items/{id}/keywords/add-remove | -*CampaignApi* | [**createAsset**](docs/CampaignApi.md#createAsset) | **POST** /2023-04/retail-media/assets | -*CampaignApi* | [**fetchKeywords**](docs/CampaignApi.md#fetchKeywords) | **GET** /2023-04/retail-media/line-items/{id}/keywords | -*CampaignApi* | [**fetchProposal**](docs/CampaignApi.md#fetchProposal) | **GET** /2023-04/retail-media/preferred-deal-line-items/{id}/proposal | -*CampaignApi* | [**getApi202110ExternalAccountBalancesByAccountId**](docs/CampaignApi.md#getApi202110ExternalAccountBalancesByAccountId) | **GET** /2023-04/retail-media/accounts/{account-id}/balances | -*CampaignApi* | [**getApi202110ExternalAccountCreativesByAccountId**](docs/CampaignApi.md#getApi202110ExternalAccountCreativesByAccountId) | **GET** /2023-04/retail-media/accounts/{account-id}/creatives | -*CampaignApi* | [**getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId**](docs/CampaignApi.md#getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId) | **GET** /2023-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords | -*CampaignApi* | [**getApi202110ExternalBalanceCampaignsByBalanceId**](docs/CampaignApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2023-04/retail-media/balances/{balance-id}/campaigns | -*CampaignApi* | [**getApi202110ExternalCampaignPreferredLineItemsByCampaignId**](docs/CampaignApi.md#getApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **GET** /2023-04/retail-media/campaigns/{campaign-id}/preferred-line-items | -*CampaignApi* | [**getApi202110ExternalLineItemProductsByLineItemId**](docs/CampaignApi.md#getApi202110ExternalLineItemProductsByLineItemId) | **GET** /2023-04/retail-media/line-items/{line-item-id}/products | -*CampaignApi* | [**getApi202110ExternalPreferredLineItemByLineItemId**](docs/CampaignApi.md#getApi202110ExternalPreferredLineItemByLineItemId) | **GET** /2023-04/retail-media/preferred-line-items/{line-item-id} | -*CampaignApi* | [**getApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](docs/CampaignApi.md#getApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **GET** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | -*CampaignApi* | [**getApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId**](docs/CampaignApi.md#getApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId) | **GET** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences | -*CampaignApi* | [**getApi202110ExternalPreferredLineItemTargetingStoresByLineItemId**](docs/CampaignApi.md#getApi202110ExternalPreferredLineItemTargetingStoresByLineItemId) | **GET** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores | -*CampaignApi* | [**getApi202110ExternalRetailerPagesByRetailerId**](docs/CampaignApi.md#getApi202110ExternalRetailerPagesByRetailerId) | **GET** /2023-04/retail-media/retailers/{retailerId}/pages | -*CampaignApi* | [**getApi202204ExternalCategorieByCategoryId**](docs/CampaignApi.md#getApi202204ExternalCategorieByCategoryId) | **GET** /2023-04/retail-media/categories/{categoryId} | -*CampaignApi* | [**getApi202204ExternalCategories**](docs/CampaignApi.md#getApi202204ExternalCategories) | **GET** /2023-04/retail-media/categories | -*CampaignApi* | [**getApi202207ExternalRetailerByRetailerIdTemplatestemplateId**](docs/CampaignApi.md#getApi202207ExternalRetailerByRetailerIdTemplatestemplateId) | **GET** /2023-04/retail-media/retailers/{retailer-id}/templates/{template-id} | -*CampaignApi* | [**getApi202207ExternalRetailerTemplatesByRetailerId**](docs/CampaignApi.md#getApi202207ExternalRetailerTemplatesByRetailerId) | **GET** /2023-04/retail-media/retailers/{retailer-id}/templates | -*CampaignApi* | [**getApi202210ExternalAccountByAccountIdCreativescreativeId**](docs/CampaignApi.md#getApi202210ExternalAccountByAccountIdCreativescreativeId) | **GET** /2023-04/retail-media/accounts/{account-id}/creatives/{creative-id} | -*CampaignApi* | [**getApi202301ExternalAccountCampaignsByAccountId**](docs/CampaignApi.md#getApi202301ExternalAccountCampaignsByAccountId) | **GET** /2023-04/retail-media/accounts/{account-id}/campaigns | -*CampaignApi* | [**getApi202301ExternalCampaignByCampaignId**](docs/CampaignApi.md#getApi202301ExternalCampaignByCampaignId) | **GET** /2023-04/retail-media/campaigns/{campaignId} | -*CampaignApi* | [**getApi202301ExternalLineItemBidMultipliersByLineItemId**](docs/CampaignApi.md#getApi202301ExternalLineItemBidMultipliersByLineItemId) | **GET** /2023-04/retail-media/line-items/{line-item-id}/bid-multipliers | -*CampaignApi* | [**getApiV1ExternalAccountBrandsByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /2023-04/retail-media/accounts/{accountId}/brands | -*CampaignApi* | [**getApiV1ExternalAccountRetailersByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /2023-04/retail-media/accounts/{accountId}/retailers | -*CampaignApi* | [**getApiV1ExternalAccounts**](docs/CampaignApi.md#getApiV1ExternalAccounts) | **GET** /2023-04/retail-media/accounts | -*CampaignApi* | [**getApiV1ExternalCatalogOutputByCatalogId**](docs/CampaignApi.md#getApiV1ExternalCatalogOutputByCatalogId) | **GET** /2023-04/retail-media/catalogs/{catalogId}/output | -*CampaignApi* | [**getApiV1ExternalCatalogStatusByCatalogId**](docs/CampaignApi.md#getApiV1ExternalCatalogStatusByCatalogId) | **GET** /2023-04/retail-media/catalogs/{catalogId}/status | -*CampaignApi* | [**getApiV2ExternalAccountLineItemsByAccountId**](docs/CampaignApi.md#getApiV2ExternalAccountLineItemsByAccountId) | **GET** /2023-04/retail-media/accounts/{account-id}/line-items | -*CampaignApi* | [**getApiV2ExternalAuctionLineItemByLineItemId**](docs/CampaignApi.md#getApiV2ExternalAuctionLineItemByLineItemId) | **GET** /2023-04/retail-media/auction-line-items/{line-item-id} | -*CampaignApi* | [**getApiV2ExternalCampaignAuctionLineItemsByCampaignId**](docs/CampaignApi.md#getApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **GET** /2023-04/retail-media/campaigns/{campaign-id}/auction-line-items | -*CampaignApi* | [**getApiV2ExternalLineItemByLineItemId**](docs/CampaignApi.md#getApiV2ExternalLineItemByLineItemId) | **GET** /2023-04/retail-media/line-items/{line-item-id} | -*CampaignApi* | [**postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId**](docs/CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId) | **POST** /2023-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append | -*CampaignApi* | [**postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId**](docs/CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId) | **POST** /2023-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete | -*CampaignApi* | [**postApi202110ExternalBalanceCampaignsAppendByBalanceId**](docs/CampaignApi.md#postApi202110ExternalBalanceCampaignsAppendByBalanceId) | **POST** /2023-04/retail-media/balances/{balance-id}/campaigns/append | -*CampaignApi* | [**postApi202110ExternalBalanceCampaignsDeleteByBalanceId**](docs/CampaignApi.md#postApi202110ExternalBalanceCampaignsDeleteByBalanceId) | **POST** /2023-04/retail-media/balances/{balance-id}/campaigns/delete | -*CampaignApi* | [**postApi202110ExternalCampaignPreferredLineItemsByCampaignId**](docs/CampaignApi.md#postApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **POST** /2023-04/retail-media/campaigns/{campaign-id}/preferred-line-items | -*CampaignApi* | [**postApi202110ExternalLineItemProductsAppendByLineItemId**](docs/CampaignApi.md#postApi202110ExternalLineItemProductsAppendByLineItemId) | **POST** /2023-04/retail-media/line-items/{line-item-id}/products/append | -*CampaignApi* | [**postApi202110ExternalLineItemProductsDeleteByLineItemId**](docs/CampaignApi.md#postApi202110ExternalLineItemProductsDeleteByLineItemId) | **POST** /2023-04/retail-media/line-items/{line-item-id}/products/delete | -*CampaignApi* | [**postApi202110ExternalLineItemProductsPauseByLineItemId**](docs/CampaignApi.md#postApi202110ExternalLineItemProductsPauseByLineItemId) | **POST** /2023-04/retail-media/line-items/{line-item-id}/products/pause | -*CampaignApi* | [**postApi202110ExternalLineItemProductsUnpauseByLineItemId**](docs/CampaignApi.md#postApi202110ExternalLineItemProductsUnpauseByLineItemId) | **POST** /2023-04/retail-media/line-items/{line-item-id}/products/unpause | -*CampaignApi* | [**postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId**](docs/CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId) | **POST** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append | -*CampaignApi* | [**postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId**](docs/CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId) | **POST** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete | -*CampaignApi* | [**postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId**](docs/CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId) | **POST** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append | -*CampaignApi* | [**postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId**](docs/CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId) | **POST** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete | -*CampaignApi* | [**postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId**](docs/CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId) | **POST** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append | -*CampaignApi* | [**postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId**](docs/CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId) | **POST** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete | -*CampaignApi* | [**postApi202210ExternalAccountCreativesByAccountId**](docs/CampaignApi.md#postApi202210ExternalAccountCreativesByAccountId) | **POST** /2023-04/retail-media/accounts/{account-id}/creatives | -*CampaignApi* | [**postApi202210ExternalAccountCreativesSearchByAccountId**](docs/CampaignApi.md#postApi202210ExternalAccountCreativesSearchByAccountId) | **POST** /2023-04/retail-media/accounts/{account-id}/creatives/search | -*CampaignApi* | [**postApi202301ExternalAccountCampaignsByAccountId**](docs/CampaignApi.md#postApi202301ExternalAccountCampaignsByAccountId) | **POST** /2023-04/retail-media/accounts/{account-id}/campaigns | -*CampaignApi* | [**postApiV1ExternalAccountCatalogsByAccountId**](docs/CampaignApi.md#postApiV1ExternalAccountCatalogsByAccountId) | **POST** /2023-04/retail-media/accounts/{accountId}/catalogs | -*CampaignApi* | [**postApiV2ExternalCampaignAuctionLineItemsByCampaignId**](docs/CampaignApi.md#postApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **POST** /2023-04/retail-media/campaigns/{campaign-id}/auction-line-items | -*CampaignApi* | [**putApi202110ExternalPreferredLineItemByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemByLineItemId) | **PUT** /2023-04/retail-media/preferred-line-items/{line-item-id} | -*CampaignApi* | [**putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **PUT** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | -*CampaignApi* | [**putApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId) | **PUT** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences | -*CampaignApi* | [**putApi202110ExternalPreferredLineItemTargetingStoresByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingStoresByLineItemId) | **PUT** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores | -*CampaignApi* | [**putApi202210ExternalAccountByAccountIdCreativescreativeId**](docs/CampaignApi.md#putApi202210ExternalAccountByAccountIdCreativescreativeId) | **PUT** /2023-04/retail-media/accounts/{account-id}/creatives/{creative-id} | -*CampaignApi* | [**putApi202301ExternalCampaignByCampaignId**](docs/CampaignApi.md#putApi202301ExternalCampaignByCampaignId) | **PUT** /2023-04/retail-media/campaigns/{campaignId} | -*CampaignApi* | [**putApi202301ExternalLineItemBidMultipliersByLineItemId**](docs/CampaignApi.md#putApi202301ExternalLineItemBidMultipliersByLineItemId) | **PUT** /2023-04/retail-media/line-items/{line-item-id}/bid-multipliers | -*CampaignApi* | [**putApiV2ExternalAuctionLineItemByLineItemId**](docs/CampaignApi.md#putApiV2ExternalAuctionLineItemByLineItemId) | **PUT** /2023-04/retail-media/auction-line-items/{line-item-id} | -*CampaignApi* | [**setKeywordBids**](docs/CampaignApi.md#setKeywordBids) | **POST** /2023-04/retail-media/line-items/{id}/keywords/set-bid | -*CampaignApi* | [**submitProposal**](docs/CampaignApi.md#submitProposal) | **POST** /2023-04/retail-media/preferred-deal-line-items/{id}/proposal/submit | -*GatewayApi* | [**getCurrentApplication**](docs/GatewayApi.md#getCurrentApplication) | **GET** /2023-04/retail-media/me | +*AccountsApi* | [**addBrands**](docs/AccountsApi.md#addBrands) | **POST** /2024-07/retail-media/account-management/accounts/{accountId}/brands/add | +*AccountsApi* | [**createPrivateMarketDemandBrandAccount**](docs/AccountsApi.md#createPrivateMarketDemandBrandAccount) | **POST** /2024-07/retail-media/account-management/accounts/{accountId}/create-brand-account | +*AccountsApi* | [**createPrivateMarketDemandSellerAccount**](docs/AccountsApi.md#createPrivateMarketDemandSellerAccount) | **POST** /2024-07/retail-media/account-management/accounts/{accountId}/create-seller-account | +*AccountsApi* | [**getApiV1ExternalAccounts**](docs/AccountsApi.md#getApiV1ExternalAccounts) | **GET** /2024-07/retail-media/accounts | +*AccountsApi* | [**removeBrands**](docs/AccountsApi.md#removeBrands) | **POST** /2024-07/retail-media/account-management/accounts/{accountId}/brands/remove | +*AccountsApi* | [**updateSellers**](docs/AccountsApi.md#updateSellers) | **PUT** /2024-07/retail-media/account-management/accounts/{accountId}/sellers | +*AnalyticsApi* | [**generateAsyncCampaignsReport**](docs/AnalyticsApi.md#generateAsyncCampaignsReport) | **POST** /2024-07/retail-media/reports/campaigns | +*AnalyticsApi* | [**generateAsyncLineItemsReport**](docs/AnalyticsApi.md#generateAsyncLineItemsReport) | **POST** /2024-07/retail-media/reports/line-items | +*AnalyticsApi* | [**generateAsyncRevenueReport**](docs/AnalyticsApi.md#generateAsyncRevenueReport) | **POST** /2024-07/retail-media/reports/revenue | +*AnalyticsApi* | [**getAsyncExportOutput**](docs/AnalyticsApi.md#getAsyncExportOutput) | **GET** /2024-07/retail-media/reports/{reportId}/output | +*AnalyticsApi* | [**getAsyncExportStatus**](docs/AnalyticsApi.md#getAsyncExportStatus) | **GET** /2024-07/retail-media/reports/{reportId}/status | +*AudienceApi* | [**legacyCreateAudienceV1**](docs/AudienceApi.md#legacyCreateAudienceV1) | **POST** /2024-07/retail-media/accounts/{accountId}/audiences | +*AudienceApi* | [**legacyGetAudienceV1**](docs/AudienceApi.md#legacyGetAudienceV1) | **GET** /2024-07/retail-media/accounts/{accountId}/audiences | +*AudienceApi* | [**legacyGetAudienceV2**](docs/AudienceApi.md#legacyGetAudienceV2) | **GET** /2024-07/retail-media/v2/accounts/{accountId}/audiences | +*AudienceApi* | [**legacyUpdateAudienceV2**](docs/AudienceApi.md#legacyUpdateAudienceV2) | **POST** /2024-07/retail-media/v2/accounts/{accountId}/audiences | +*BalanceApi* | [**getApi202110ExternalBalanceCampaignsByBalanceId**](docs/BalanceApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2024-07/retail-media/balances/{balance-id}/campaigns | +*BalanceApi* | [**getApiV1ExternalAccountBalancesByAccountId**](docs/BalanceApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2024-07/retail-media/accounts/{account-id}/balances | +*BalanceApi* | [**getApiV1ExternalAccountByAccountIdAndBalanceId**](docs/BalanceApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2024-07/retail-media/accounts/{account-id}/balances/{balanceId} | +*BalanceApi* | [**getBalanceHistory**](docs/BalanceApi.md#getBalanceHistory) | **GET** /2024-07/retail-media/balances/{balanceId}/history | +*BalanceApi* | [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](docs/BalanceApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2024-07/retail-media/accounts/{account-id}/balances/{balanceId} | +*BalanceApi* | [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](docs/BalanceApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2024-07/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | +*BalanceApi* | [**postApiV1ExternalAccountBalancesByAccountId**](docs/BalanceApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2024-07/retail-media/accounts/{account-id}/balances | +*BalanceApi* | [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](docs/BalanceApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2024-07/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | +*CampaignApi* | [**addRemoveKeywords**](docs/CampaignApi.md#addRemoveKeywords) | **POST** /2024-07/retail-media/line-items/{id}/keywords/add-remove | +*CampaignApi* | [**createAsset**](docs/CampaignApi.md#createAsset) | **POST** /2024-07/retail-media/assets | +*CampaignApi* | [**fetchKeywords**](docs/CampaignApi.md#fetchKeywords) | **GET** /2024-07/retail-media/line-items/{id}/keywords | +*CampaignApi* | [**fetchProposal**](docs/CampaignApi.md#fetchProposal) | **GET** /2024-07/retail-media/preferred-deal-line-items/{id}/proposal | +*CampaignApi* | [**getApi202110ExternalAccountCreativesByAccountId**](docs/CampaignApi.md#getApi202110ExternalAccountCreativesByAccountId) | **GET** /2024-07/retail-media/accounts/{account-id}/creatives | +*CampaignApi* | [**getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId**](docs/CampaignApi.md#getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId) | **GET** /2024-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords | +*CampaignApi* | [**getApi202110ExternalCampaignPreferredLineItemsByCampaignId**](docs/CampaignApi.md#getApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **GET** /2024-07/retail-media/campaigns/{campaign-id}/preferred-line-items | +*CampaignApi* | [**getApi202110ExternalLineItemProductsByLineItemId**](docs/CampaignApi.md#getApi202110ExternalLineItemProductsByLineItemId) | **GET** /2024-07/retail-media/line-items/{line-item-id}/products | +*CampaignApi* | [**getApi202110ExternalPreferredLineItemByLineItemId**](docs/CampaignApi.md#getApi202110ExternalPreferredLineItemByLineItemId) | **GET** /2024-07/retail-media/preferred-line-items/{line-item-id} | +*CampaignApi* | [**getApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](docs/CampaignApi.md#getApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **GET** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | +*CampaignApi* | [**getApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId**](docs/CampaignApi.md#getApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId) | **GET** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences | +*CampaignApi* | [**getApi202110ExternalPreferredLineItemTargetingStoresByLineItemId**](docs/CampaignApi.md#getApi202110ExternalPreferredLineItemTargetingStoresByLineItemId) | **GET** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores | +*CampaignApi* | [**getApi202110ExternalRetailerPagesByRetailerId**](docs/CampaignApi.md#getApi202110ExternalRetailerPagesByRetailerId) | **GET** /2024-07/retail-media/retailers/{retailerId}/pages | +*CampaignApi* | [**getApi202204ExternalCategorieByCategoryId**](docs/CampaignApi.md#getApi202204ExternalCategorieByCategoryId) | **GET** /2024-07/retail-media/categories/{categoryId} | +*CampaignApi* | [**getApi202204ExternalCategories**](docs/CampaignApi.md#getApi202204ExternalCategories) | **GET** /2024-07/retail-media/categories | +*CampaignApi* | [**getApi202207ExternalRetailerByRetailerIdTemplatestemplateId**](docs/CampaignApi.md#getApi202207ExternalRetailerByRetailerIdTemplatestemplateId) | **GET** /2024-07/retail-media/retailers/{retailer-id}/templates/{template-id} | +*CampaignApi* | [**getApi202207ExternalRetailerTemplatesByRetailerId**](docs/CampaignApi.md#getApi202207ExternalRetailerTemplatesByRetailerId) | **GET** /2024-07/retail-media/retailers/{retailer-id}/templates | +*CampaignApi* | [**getApi202210ExternalAccountByAccountIdCreativescreativeId**](docs/CampaignApi.md#getApi202210ExternalAccountByAccountIdCreativescreativeId) | **GET** /2024-07/retail-media/accounts/{account-id}/creatives/{creative-id} | +*CampaignApi* | [**getApi202301ExternalAccountCampaignsByAccountId**](docs/CampaignApi.md#getApi202301ExternalAccountCampaignsByAccountId) | **GET** /2024-07/retail-media/accounts/{account-id}/campaigns | +*CampaignApi* | [**getApi202301ExternalCampaignByCampaignId**](docs/CampaignApi.md#getApi202301ExternalCampaignByCampaignId) | **GET** /2024-07/retail-media/campaigns/{campaignId} | +*CampaignApi* | [**getApi202301ExternalLineItemBidMultipliersByLineItemId**](docs/CampaignApi.md#getApi202301ExternalLineItemBidMultipliersByLineItemId) | **GET** /2024-07/retail-media/line-items/{line-item-id}/bid-multipliers | +*CampaignApi* | [**getApiV1ExternalAccountBrandsByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /2024-07/retail-media/accounts/{accountId}/brands | +*CampaignApi* | [**getApiV1ExternalAccountRetailersByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /2024-07/retail-media/accounts/{accountId}/retailers | +*CampaignApi* | [**getApiV1ExternalCatalogOutputByCatalogId**](docs/CampaignApi.md#getApiV1ExternalCatalogOutputByCatalogId) | **GET** /2024-07/retail-media/catalogs/{catalogId}/output | +*CampaignApi* | [**getApiV1ExternalCatalogStatusByCatalogId**](docs/CampaignApi.md#getApiV1ExternalCatalogStatusByCatalogId) | **GET** /2024-07/retail-media/catalogs/{catalogId}/status | +*CampaignApi* | [**getApiV2ExternalAccountLineItemsByAccountId**](docs/CampaignApi.md#getApiV2ExternalAccountLineItemsByAccountId) | **GET** /2024-07/retail-media/accounts/{account-id}/line-items | +*CampaignApi* | [**getApiV2ExternalAuctionLineItemByLineItemId**](docs/CampaignApi.md#getApiV2ExternalAuctionLineItemByLineItemId) | **GET** /2024-07/retail-media/auction-line-items/{line-item-id} | +*CampaignApi* | [**getApiV2ExternalCampaignAuctionLineItemsByCampaignId**](docs/CampaignApi.md#getApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **GET** /2024-07/retail-media/campaigns/{campaign-id}/auction-line-items | +*CampaignApi* | [**getApiV2ExternalLineItemByLineItemId**](docs/CampaignApi.md#getApiV2ExternalLineItemByLineItemId) | **GET** /2024-07/retail-media/line-items/{line-item-id} | +*CampaignApi* | [**getCampaignBudgetOverrides**](docs/CampaignApi.md#getCampaignBudgetOverrides) | **GET** /2024-07/retail-media/campaigns/{campaignId}/campaign-budget-overrides | +*CampaignApi* | [**getLineItemBudgetOverrides**](docs/CampaignApi.md#getLineItemBudgetOverrides) | **GET** /2024-07/retail-media/line-items/{lineItemId}/line-item-budget-overrides | +*CampaignApi* | [**postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId**](docs/CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId) | **POST** /2024-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append | +*CampaignApi* | [**postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId**](docs/CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId) | **POST** /2024-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete | +*CampaignApi* | [**postApi202110ExternalBalanceCampaignsAppendByBalanceId**](docs/CampaignApi.md#postApi202110ExternalBalanceCampaignsAppendByBalanceId) | **POST** /2024-07/retail-media/balances/{balance-id}/campaigns/append | +*CampaignApi* | [**postApi202110ExternalBalanceCampaignsDeleteByBalanceId**](docs/CampaignApi.md#postApi202110ExternalBalanceCampaignsDeleteByBalanceId) | **POST** /2024-07/retail-media/balances/{balance-id}/campaigns/delete | +*CampaignApi* | [**postApi202110ExternalCampaignPreferredLineItemsByCampaignId**](docs/CampaignApi.md#postApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **POST** /2024-07/retail-media/campaigns/{campaign-id}/preferred-line-items | +*CampaignApi* | [**postApi202110ExternalLineItemProductsAppendByLineItemId**](docs/CampaignApi.md#postApi202110ExternalLineItemProductsAppendByLineItemId) | **POST** /2024-07/retail-media/line-items/{line-item-id}/products/append | +*CampaignApi* | [**postApi202110ExternalLineItemProductsDeleteByLineItemId**](docs/CampaignApi.md#postApi202110ExternalLineItemProductsDeleteByLineItemId) | **POST** /2024-07/retail-media/line-items/{line-item-id}/products/delete | +*CampaignApi* | [**postApi202110ExternalLineItemProductsPauseByLineItemId**](docs/CampaignApi.md#postApi202110ExternalLineItemProductsPauseByLineItemId) | **POST** /2024-07/retail-media/line-items/{line-item-id}/products/pause | +*CampaignApi* | [**postApi202110ExternalLineItemProductsUnpauseByLineItemId**](docs/CampaignApi.md#postApi202110ExternalLineItemProductsUnpauseByLineItemId) | **POST** /2024-07/retail-media/line-items/{line-item-id}/products/unpause | +*CampaignApi* | [**postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId**](docs/CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId) | **POST** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append | +*CampaignApi* | [**postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId**](docs/CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId) | **POST** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete | +*CampaignApi* | [**postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId**](docs/CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId) | **POST** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append | +*CampaignApi* | [**postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId**](docs/CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId) | **POST** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete | +*CampaignApi* | [**postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId**](docs/CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId) | **POST** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append | +*CampaignApi* | [**postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId**](docs/CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId) | **POST** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete | +*CampaignApi* | [**postApi202210ExternalAccountCreativesByAccountId**](docs/CampaignApi.md#postApi202210ExternalAccountCreativesByAccountId) | **POST** /2024-07/retail-media/accounts/{account-id}/creatives | +*CampaignApi* | [**postApi202210ExternalAccountCreativesSearchByAccountId**](docs/CampaignApi.md#postApi202210ExternalAccountCreativesSearchByAccountId) | **POST** /2024-07/retail-media/accounts/{account-id}/creatives/search | +*CampaignApi* | [**postApi202301ExternalAccountCampaignsByAccountId**](docs/CampaignApi.md#postApi202301ExternalAccountCampaignsByAccountId) | **POST** /2024-07/retail-media/accounts/{account-id}/campaigns | +*CampaignApi* | [**postApiV1ExternalAccountCatalogsByAccountId**](docs/CampaignApi.md#postApiV1ExternalAccountCatalogsByAccountId) | **POST** /2024-07/retail-media/accounts/{accountId}/catalogs | +*CampaignApi* | [**postApiV2ExternalCampaignAuctionLineItemsByCampaignId**](docs/CampaignApi.md#postApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **POST** /2024-07/retail-media/campaigns/{campaign-id}/auction-line-items | +*CampaignApi* | [**putApi202110ExternalPreferredLineItemByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemByLineItemId) | **PUT** /2024-07/retail-media/preferred-line-items/{line-item-id} | +*CampaignApi* | [**putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **PUT** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | +*CampaignApi* | [**putApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId) | **PUT** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences | +*CampaignApi* | [**putApi202110ExternalPreferredLineItemTargetingStoresByLineItemId**](docs/CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingStoresByLineItemId) | **PUT** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores | +*CampaignApi* | [**putApi202210ExternalAccountByAccountIdCreativescreativeId**](docs/CampaignApi.md#putApi202210ExternalAccountByAccountIdCreativescreativeId) | **PUT** /2024-07/retail-media/accounts/{account-id}/creatives/{creative-id} | +*CampaignApi* | [**putApi202301ExternalCampaignByCampaignId**](docs/CampaignApi.md#putApi202301ExternalCampaignByCampaignId) | **PUT** /2024-07/retail-media/campaigns/{campaignId} | +*CampaignApi* | [**putApi202301ExternalLineItemBidMultipliersByLineItemId**](docs/CampaignApi.md#putApi202301ExternalLineItemBidMultipliersByLineItemId) | **PUT** /2024-07/retail-media/line-items/{line-item-id}/bid-multipliers | +*CampaignApi* | [**putApiV2ExternalAuctionLineItemByLineItemId**](docs/CampaignApi.md#putApiV2ExternalAuctionLineItemByLineItemId) | **PUT** /2024-07/retail-media/auction-line-items/{line-item-id} | +*CampaignApi* | [**setKeywordBids**](docs/CampaignApi.md#setKeywordBids) | **POST** /2024-07/retail-media/line-items/{id}/keywords/set-bid | +*CampaignApi* | [**submitProposal**](docs/CampaignApi.md#submitProposal) | **POST** /2024-07/retail-media/preferred-deal-line-items/{id}/proposal/submit | +*CampaignApi* | [**updateCampaignBudgetOverrides**](docs/CampaignApi.md#updateCampaignBudgetOverrides) | **PUT** /2024-07/retail-media/campaigns/{campaignId}/campaign-budget-overrides | +*CampaignApi* | [**updateLineItemBudgetOverrides**](docs/CampaignApi.md#updateLineItemBudgetOverrides) | **PUT** /2024-07/retail-media/line-items/{lineItemId}/line-item-budget-overrides | +*GatewayApi* | [**getCurrentApplication**](docs/GatewayApi.md#getCurrentApplication) | **GET** /2024-07/retail-media/me | ## Documentation for Models + - [AddFundsToBalanceRequest](docs/AddFundsToBalanceRequest.md) - [AddRemoveKeywordModel](docs/AddRemoveKeywordModel.md) - [AddRemoveKeywordsModel](docs/AddRemoveKeywordsModel.md) - [AddRemoveKeywordsModelRequest](docs/AddRemoveKeywordsModelRequest.md) @@ -169,6 +186,9 @@ Class | Method | HTTP request | Description - [AsyncLineItemsReportRequest](docs/AsyncLineItemsReportRequest.md) - [AsyncLineItemsReportResource](docs/AsyncLineItemsReportResource.md) - [AsyncReportResponse](docs/AsyncReportResponse.md) + - [AsyncRevenueReport](docs/AsyncRevenueReport.md) + - [AsyncRevenueReportRequest](docs/AsyncRevenueReportRequest.md) + - [AsyncRevenueReportResource](docs/AsyncRevenueReportResource.md) - [AuctionLineItemCreateModelRequest](docs/AuctionLineItemCreateModelRequest.md) - [AuctionLineItemPagedListResponse](docs/AuctionLineItemPagedListResponse.md) - [AuctionLineItemResponse](docs/AuctionLineItemResponse.md) @@ -176,13 +196,20 @@ Class | Method | HTTP request | Description - [AudienceIdsUpdateModel202110Request](docs/AudienceIdsUpdateModel202110Request.md) - [AudienceTarget202110Request](docs/AudienceTarget202110Request.md) - [AudienceTarget202110Response](docs/AudienceTarget202110Response.md) - - [Balance202110PagedListResponse](docs/Balance202110PagedListResponse.md) - [BalanceCampaign202110ListRequest](docs/BalanceCampaign202110ListRequest.md) - [BalanceCampaign202110PagedListResponse](docs/BalanceCampaign202110PagedListResponse.md) + - [BalanceHistoryChangeDataCaptureV1](docs/BalanceHistoryChangeDataCaptureV1.md) + - [BalanceResponse](docs/BalanceResponse.md) + - [BalanceResponsePagedListResponse](docs/BalanceResponsePagedListResponse.md) - [CampaignAttributesV202301](docs/CampaignAttributesV202301.md) + - [CampaignBudgetOverrides](docs/CampaignBudgetOverrides.md) + - [CampaignDailyBudgetOverride](docs/CampaignDailyBudgetOverride.md) + - [CampaignMonthlyBudgetOverride](docs/CampaignMonthlyBudgetOverride.md) - [CampaignV202301](docs/CampaignV202301.md) - [Category202204](docs/Category202204.md) - [Category202204ListResponse](docs/Category202204ListResponse.md) + - [ChangeDatesOfBalanceRequest](docs/ChangeDatesOfBalanceRequest.md) + - [ChangeDetailsV1](docs/ChangeDetailsV1.md) - [ChoiceOption](docs/ChoiceOption.md) - [ChoiceVariableSpecification](docs/ChoiceVariableSpecification.md) - [ChoiceVariableValue](docs/ChoiceVariableValue.md) @@ -192,6 +219,7 @@ Class | Method | HTTP request | Description - [CommonLineItemResponse](docs/CommonLineItemResponse.md) - [CommonProblem](docs/CommonProblem.md) - [CommonWarning](docs/CommonWarning.md) + - [CreateBalanceRequest](docs/CreateBalanceRequest.md) - [Creative202110](docs/Creative202110.md) - [Creative202110ListResponse](docs/Creative202110ListResponse.md) - [Creative202210](docs/Creative202210.md) @@ -199,8 +227,10 @@ Class | Method | HTTP request | Description - [Creative202210Response](docs/Creative202210Response.md) - [CreativeCreateModel202207](docs/CreativeCreateModel202207.md) - [CreativeUpdateModel202207](docs/CreativeUpdateModel202207.md) + - [DailyLineItemBudgetOverride](docs/DailyLineItemBudgetOverride.md) - [EditableCampaignAttributesV202301](docs/EditableCampaignAttributesV202301.md) - [ExternalAccount](docs/ExternalAccount.md) + - [ExternalAddFundsToBalance](docs/ExternalAddFundsToBalance.md) - [ExternalAddToBasketIdsUpdateModel202110](docs/ExternalAddToBasketIdsUpdateModel202110.md) - [ExternalAddToBasketTarget202110](docs/ExternalAddToBasketTarget202110.md) - [ExternalAuctionLineItem](docs/ExternalAuctionLineItem.md) @@ -208,11 +238,13 @@ Class | Method | HTTP request | Description - [ExternalAuctionLineItemUpdateModel](docs/ExternalAuctionLineItemUpdateModel.md) - [ExternalAudienceIdsUpdateModel202110](docs/ExternalAudienceIdsUpdateModel202110.md) - [ExternalAudienceTarget202110](docs/ExternalAudienceTarget202110.md) - - [ExternalBalance202110](docs/ExternalBalance202110.md) + - [ExternalBalanceResponse](docs/ExternalBalanceResponse.md) - [ExternalBrand](docs/ExternalBrand.md) - [ExternalCatalogRequest](docs/ExternalCatalogRequest.md) - [ExternalCatalogStatus](docs/ExternalCatalogStatus.md) + - [ExternalChangeDatesOfBalance](docs/ExternalChangeDatesOfBalance.md) - [ExternalCommonLineItem](docs/ExternalCommonLineItem.md) + - [ExternalCreateBalance](docs/ExternalCreateBalance.md) - [ExternalKeywordTarget202110](docs/ExternalKeywordTarget202110.md) - [ExternalLineItemCapping202110](docs/ExternalLineItemCapping202110.md) - [ExternalLineItemPage202110](docs/ExternalLineItemPage202110.md) @@ -225,6 +257,7 @@ Class | Method | HTTP request | Description - [ExternalRetailerPages202110](docs/ExternalRetailerPages202110.md) - [ExternalStoreIdsUpdateModel202110](docs/ExternalStoreIdsUpdateModel202110.md) - [ExternalStoreTarget202110](docs/ExternalStoreTarget202110.md) + - [ExternalUpdateBalanceModel](docs/ExternalUpdateBalanceModel.md) - [FilesVariableValue](docs/FilesVariableValue.md) - [FilesVariablesSpecification](docs/FilesVariablesSpecification.md) - [HyperlinkVariableValue](docs/HyperlinkVariableValue.md) @@ -257,9 +290,13 @@ Class | Method | HTTP request | Description - [LineItemBidMultipliers](docs/LineItemBidMultipliers.md) - [LineItemBidMultipliersRequest](docs/LineItemBidMultipliersRequest.md) - [LineItemBidMultipliersResponse](docs/LineItemBidMultipliersResponse.md) + - [LineItemBudgetOverrides](docs/LineItemBudgetOverrides.md) - [MatchTypeModel](docs/MatchTypeModel.md) + - [Metadata](docs/Metadata.md) + - [MonthlyLineItemBudegetOverride](docs/MonthlyLineItemBudegetOverride.md) - [NegotiationStateModel](docs/NegotiationStateModel.md) - [PageMetadata](docs/PageMetadata.md) + - [PageOfBalanceHistoryChangeDataCaptureV1](docs/PageOfBalanceHistoryChangeDataCaptureV1.md) - [PageTypeEnvironment](docs/PageTypeEnvironment.md) - [PostCampaignV202301](docs/PostCampaignV202301.md) - [PreferredLineItem202110PagedListResponse](docs/PreferredLineItem202110PagedListResponse.md) @@ -274,20 +311,31 @@ Class | Method | HTTP request | Description - [ProposalStatusModelResponse](docs/ProposalStatusModelResponse.md) - [PutCampaignV202301](docs/PutCampaignV202301.md) - [ReportOutcome](docs/ReportOutcome.md) + - [ResourceOfAddFundsToBalance](docs/ResourceOfAddFundsToBalance.md) - [ResourceOfAuctionLineItem](docs/ResourceOfAuctionLineItem.md) - [ResourceOfAuctionLineItemUpdateModel](docs/ResourceOfAuctionLineItemUpdateModel.md) - - [ResourceOfBalance202110](docs/ResourceOfBalance202110.md) - [ResourceOfBalanceCampaign202110](docs/ResourceOfBalanceCampaign202110.md) + - [ResourceOfBalanceResponse](docs/ResourceOfBalanceResponse.md) - [ResourceOfCategory202204](docs/ResourceOfCategory202204.md) + - [ResourceOfChangeDatesOfBalance](docs/ResourceOfChangeDatesOfBalance.md) - [ResourceOfCommonLineItem](docs/ResourceOfCommonLineItem.md) + - [ResourceOfCreateBalance](docs/ResourceOfCreateBalance.md) - [ResourceOfCreative202110](docs/ResourceOfCreative202110.md) - [ResourceOfCreative202210](docs/ResourceOfCreative202210.md) - [ResourceOfLineItemBidMultipliers](docs/ResourceOfLineItemBidMultipliers.md) - [ResourceOfPreferredLineItem202110](docs/ResourceOfPreferredLineItem202110.md) - [ResourceOfPreferredLineItemUpdateModel202110](docs/ResourceOfPreferredLineItemUpdateModel202110.md) - [ResourceOfPromotedProduct202110](docs/ResourceOfPromotedProduct202110.md) + - [ResourceOfRetailMediaAccount](docs/ResourceOfRetailMediaAccount.md) - [ResourceOfTemplate](docs/ResourceOfTemplate.md) + - [ResourceOfUpdateBalanceModel](docs/ResourceOfUpdateBalanceModel.md) - [ResourceOutcome](docs/ResourceOutcome.md) + - [ResourceOutcomeOfRetailMediaAccount](docs/ResourceOutcomeOfRetailMediaAccount.md) + - [RetailMediaAccount](docs/RetailMediaAccount.md) + - [RetailMediaBrandAccountCreation](docs/RetailMediaBrandAccountCreation.md) + - [RetailMediaBrands](docs/RetailMediaBrands.md) + - [RetailMediaSeller](docs/RetailMediaSeller.md) + - [RetailMediaSellerAccountCreation](docs/RetailMediaSellerAccountCreation.md) - [ReviewStateModel](docs/ReviewStateModel.md) - [RmLegacyAudienceCreateEntityV1](docs/RmLegacyAudienceCreateEntityV1.md) - [RmLegacyAudienceCreateEntityV1Resource](docs/RmLegacyAudienceCreateEntityV1Resource.md) @@ -327,6 +375,22 @@ Class | Method | HTTP request | Description - [TemplateVariableValue](docs/TemplateVariableValue.md) - [TextVariableSpecification](docs/TextVariableSpecification.md) - [TextVariableValue](docs/TextVariableValue.md) + - [UpdateBalanceModelRequest](docs/UpdateBalanceModelRequest.md) + - [ValueResourceCollectionInputOfRetailMediaSeller](docs/ValueResourceCollectionInputOfRetailMediaSeller.md) + - [ValueResourceCollectionOutcomeOfRetailMediaSeller](docs/ValueResourceCollectionOutcomeOfRetailMediaSeller.md) + - [ValueResourceInputOfCampaignBudgetOverrides](docs/ValueResourceInputOfCampaignBudgetOverrides.md) + - [ValueResourceInputOfLineItemBudgetOverrides](docs/ValueResourceInputOfLineItemBudgetOverrides.md) + - [ValueResourceInputOfRetailMediaBrandAccountCreation](docs/ValueResourceInputOfRetailMediaBrandAccountCreation.md) + - [ValueResourceInputOfRetailMediaBrands](docs/ValueResourceInputOfRetailMediaBrands.md) + - [ValueResourceInputOfRetailMediaSellerAccountCreation](docs/ValueResourceInputOfRetailMediaSellerAccountCreation.md) + - [ValueResourceOfCampaignBudgetOverrides](docs/ValueResourceOfCampaignBudgetOverrides.md) + - [ValueResourceOfLineItemBudgetOverrides](docs/ValueResourceOfLineItemBudgetOverrides.md) + - [ValueResourceOfRetailMediaBrandAccountCreation](docs/ValueResourceOfRetailMediaBrandAccountCreation.md) + - [ValueResourceOfRetailMediaBrands](docs/ValueResourceOfRetailMediaBrands.md) + - [ValueResourceOfRetailMediaSeller](docs/ValueResourceOfRetailMediaSeller.md) + - [ValueResourceOfRetailMediaSellerAccountCreation](docs/ValueResourceOfRetailMediaSellerAccountCreation.md) + - [ValueResourceOutcomeOfCampaignBudgetOverrides](docs/ValueResourceOutcomeOfCampaignBudgetOverrides.md) + - [ValueResourceOutcomeOfLineItemBudgetOverrides](docs/ValueResourceOutcomeOfLineItemBudgetOverrides.md) - [ValueTypeResourceOfAddToBasketIdsUpdateModel202110](docs/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.md) - [ValueTypeResourceOfAddToBasketTarget202110](docs/ValueTypeResourceOfAddToBasketTarget202110.md) - [ValueTypeResourceOfAudienceIdsUpdateModel202110](docs/ValueTypeResourceOfAudienceIdsUpdateModel202110.md) diff --git a/sdks/retailmedia_2023-04/api/openapi.yaml b/sdks/retailmedia_2024-07/api/openapi.yaml similarity index 80% rename from sdks/retailmedia_2023-04/api/openapi.yaml rename to sdks/retailmedia_2024-07/api/openapi.yaml index b9fa835f..621754f1 100644 --- a/sdks/retailmedia_2023-04/api/openapi.yaml +++ b/sdks/retailmedia_2024-07/api/openapi.yaml @@ -2,13 +2,13 @@ openapi: 3.0.1 info: description: Criteo API - RetailMedia title: Criteo API - version: 2023-04 + version: 2024-07 servers: - url: https://api.criteo.com security: - oauth: [] paths: - /2023-04/retail-media/me: + /2024-07/retail-media/me: get: description: Get information about the currently logged application operationId: GetCurrentApplication @@ -26,7 +26,7 @@ paths: tags: - Gateway x-accepts: application/json - /2023-04/retail-media/accounts: + /2024-07/retail-media/accounts: get: description: Gets page of account objects that the current user can access operationId: AccountsApi_GetApiV1ExternalAccounts @@ -49,6 +49,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -60,6 +61,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -67,14 +69,20 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfAccount' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfAccount' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfAccount' description: Success tags: - - Campaign + - Accounts x-accepts: application/json - /2023-04/retail-media/accounts/{accountId}/brands: + /2024-07/retail-media/accounts/{accountId}/brands: get: description: Gets page of retailer objects that are associated with the given account @@ -107,6 +115,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -118,6 +127,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -125,14 +135,20 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfBrand' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfBrand' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfBrand' description: Success tags: - Campaign x-accepts: application/json - /2023-04/retail-media/accounts/{accountId}/retailers: + /2024-07/retail-media/accounts/{accountId}/retailers: get: description: Gets page of retailer objects that are associated with the given account @@ -165,6 +181,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -176,6 +193,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -183,14 +201,20 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' description: Success tags: - Campaign x-accepts: application/json - /2023-04/retail-media/assets: + /2024-07/retail-media/assets: post: description: Creates an asset operationId: CreateAsset @@ -216,7 +240,7 @@ paths: - Campaign x-content-type: multipart/form-data x-accepts: application/json - /2023-04/retail-media/accounts/{accountId}/audiences: + /2024-07/retail-media/accounts/{accountId}/audiences: get: description: Get a page of Audiences. (deprecated Public API) operationId: LegacyGetAudienceV1 @@ -369,7 +393,7 @@ paths: - Audience x-content-type: application/json-patch+json x-accepts: application/json - /2023-04/retail-media/v2/accounts/{accountId}/audiences: + /2024-07/retail-media/v2/accounts/{accountId}/audiences: get: description: Get a page of Audiences. (deprecated Public API) operationId: LegacyGetAudienceV2 @@ -522,7 +546,7 @@ paths: - Audience x-content-type: application/json-patch+json x-accepts: application/json - /2023-04/retail-media/line-items/{id}/keywords: + /2024-07/retail-media/line-items/{id}/keywords: get: description: Fetch keywords associated with the specified line item operationId: FetchKeywords @@ -551,7 +575,7 @@ paths: tags: - Campaign x-accepts: application/json - /2023-04/retail-media/line-items/{id}/keywords/add-remove: + /2024-07/retail-media/line-items/{id}/keywords/add-remove: post: description: Add or Remove keywords from the line item in bulk operationId: AddRemoveKeywords @@ -586,7 +610,7 @@ paths: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/line-items/{id}/keywords/set-bid: + /2024-07/retail-media/line-items/{id}/keywords/set-bid: post: description: Set bid overrides for associated keywords to the given line item in bulk @@ -622,7 +646,7 @@ paths: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/preferred-deal-line-items/{id}/proposal: + /2024-07/retail-media/preferred-deal-line-items/{id}/proposal: get: description: "Includes the state of the proposal, the status of the booking\ \ and approval, as well as any comments explaining why it might have been\ @@ -659,7 +683,7 @@ paths: tags: - Campaign x-accepts: application/json - /2023-04/retail-media/preferred-deal-line-items/{id}/proposal/submit: + /2024-07/retail-media/preferred-deal-line-items/{id}/proposal/submit: post: description: Only the components of the Line Item that are in a valid state will be reviewed. @@ -695,7 +719,7 @@ paths: tags: - Campaign x-accepts: application/json - /2023-04/retail-media/accounts/{account-id}/creatives: + /2024-07/retail-media/accounts/{account-id}/creatives: get: description: Get account creatives operationId: CreativesApi_GetApi202110ExternalAccountCreativesByAccountId @@ -751,7 +775,7 @@ paths: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/accounts/{account-id}/creatives/search: + /2024-07/retail-media/accounts/{account-id}/creatives/search: post: description: Get account creatives operationId: CreativesApi_PostApi202210ExternalAccountCreativesSearchByAccountId @@ -786,7 +810,7 @@ paths: tags: - Campaign x-accepts: application/json - /2023-04/retail-media/accounts/{account-id}/creatives/{creative-id}: + /2024-07/retail-media/accounts/{account-id}/creatives/{creative-id}: get: description: Get the specified creative operationId: "CreativesApi_GetApi202210ExternalAccountByAccountId}Creatives{creativeId" @@ -864,7 +888,7 @@ paths: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/accounts/{accountId}/catalogs: + /2024-07/retail-media/accounts/{accountId}/catalogs: post: description: Create a request for a Catalog available to the indicated account. operationId: CatalogApi_PostApiV1ExternalAccountCatalogsByAccountId @@ -896,7 +920,7 @@ paths: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/catalogs/{catalogId}/output: + /2024-07/retail-media/catalogs/{catalogId}/output: get: description: "Output the indicated catalog. Catalogs are only available for\ \ retrieval when their associated status request\r\nis at a Success status.\r\ @@ -923,14 +947,17 @@ paths: description: Catalog download initiated. "400": content: - application/x-json-stream: {} + application/x-json-stream: + schema: + format: binary + type: string application/json: {} description: "The indicated catalog is not available for retrieval, wait\ \ for a success status." tags: - Campaign x-accepts: application/json - /2023-04/retail-media/catalogs/{catalogId}/status: + /2024-07/retail-media/catalogs/{catalogId}/status: get: description: Check the status of a catalog request. operationId: CatalogApi_GetApiV1ExternalCatalogStatusByCatalogId @@ -954,7 +981,7 @@ paths: tags: - Campaign x-accepts: application/json - /2023-04/retail-media/categories: + /2024-07/retail-media/categories: get: description: Endpoint to search categories by text and retailer. operationId: CategorySearchApi_GetApi202204ExternalCategories @@ -1016,7 +1043,7 @@ paths: tags: - Campaign x-accepts: application/json - /2023-04/retail-media/categories/{categoryId}: + /2024-07/retail-media/categories/{categoryId}: get: description: Endpoint to search for a specific category by categoryId. operationId: CategorySearchApi_GetApi202204ExternalCategorieByCategoryId @@ -1049,7 +1076,7 @@ paths: tags: - Campaign x-accepts: application/json - /2023-04/retail-media/retailers/{retailer-id}/templates: + /2024-07/retail-media/retailers/{retailer-id}/templates: get: description: Get retailer creative templates operationId: CreativesApi_GetApi202207ExternalRetailerTemplatesByRetailerId @@ -1074,7 +1101,7 @@ paths: tags: - Campaign x-accepts: application/json - /2023-04/retail-media/retailers/{retailer-id}/templates/{template-id}: + /2024-07/retail-media/retailers/{retailer-id}/templates/{template-id}: get: description: Gets the template for the specified retailer id and template id operationId: "CreativesApi_GetApi202207ExternalRetailerByRetailerId}Templates{templateId" @@ -1109,7 +1136,7 @@ paths: tags: - Campaign x-accepts: application/json - /2023-04/retail-media/retailers/{retailerId}/pages: + /2024-07/retail-media/retailers/{retailerId}/pages: get: description: Get the page types available for the given retailer operationId: RetailerApi_GetApi202110ExternalRetailerPagesByRetailerId @@ -1134,7 +1161,7 @@ paths: tags: - Campaign x-accepts: application/json - /2023-04/retail-media/reports/campaigns: + /2024-07/retail-media/reports/campaigns: post: description: Return an asynchronous Campaigns Report operationId: GenerateAsyncCampaignsReport @@ -1195,7 +1222,7 @@ paths: - Analytics x-content-type: application/json-patch+json x-accepts: application/json - /2023-04/retail-media/reports/line-items: + /2024-07/retail-media/reports/line-items: post: description: Returns an asynchronous Line Items Report operationId: GenerateAsyncLineItemsReport @@ -1256,7 +1283,68 @@ paths: - Analytics x-content-type: application/json-patch+json x-accepts: application/json - /2023-04/retail-media/reports/{reportId}/output: + /2024-07/retail-media/reports/revenue: + post: + description: Returns an asynchronous Revenue Report + operationId: GenerateAsyncRevenueReport + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/AsyncRevenueReportRequest' + application/json: + schema: + $ref: '#/components/schemas/AsyncRevenueReportRequest' + text/json: + schema: + $ref: '#/components/schemas/AsyncRevenueReportRequest' + application/*+json: + schema: + $ref: '#/components/schemas/AsyncRevenueReportRequest' + required: true + x-bodyName: request + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/AsyncReportResponse' + application/json: + schema: + $ref: '#/components/schemas/AsyncReportResponse' + text/json: + schema: + $ref: '#/components/schemas/AsyncReportResponse' + description: Success + "400": + content: + text/plain: + schema: + $ref: '#/components/schemas/ReportOutcome' + application/json: + schema: + $ref: '#/components/schemas/ReportOutcome' + text/json: + schema: + $ref: '#/components/schemas/ReportOutcome' + description: Bad Request + "403": + content: + text/plain: + schema: + $ref: '#/components/schemas/ReportOutcome' + application/json: + schema: + $ref: '#/components/schemas/ReportOutcome' + text/json: + schema: + $ref: '#/components/schemas/ReportOutcome' + description: Forbidden + tags: + - Analytics + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/retail-media/reports/{reportId}/output: get: description: Returns the output of an async report operationId: GetAsyncExportOutput @@ -1309,7 +1397,7 @@ paths: tags: - Analytics x-accepts: application/json - /2023-04/retail-media/reports/{reportId}/status: + /2024-07/retail-media/reports/{reportId}/status: get: description: Returns the status of an async report operationId: GetAsyncExportStatus @@ -1362,430 +1450,402 @@ paths: tags: - Analytics x-accepts: application/json - /2023-04/retail-media/accounts/{account-id}/balances: - get: - description: Gets page of balance objects for the given account id - operationId: BalancesApi_GetApi202110ExternalAccountBalancesByAccountId + /2024-07/retail-media/account-management/accounts/{accountId}/brands/add: + post: + description: Add brands to an account + operationId: AddBrands parameters: - - description: The account to get balances for + - description: the account id to update explode: false in: path - name: account-id + name: accountId required: true schema: type: string style: simple - x-nullable: false - - description: The ids that you would like to limit your result set to - explode: true - in: query - name: limitToId - required: false - schema: - items: - type: string - type: array - style: form - x-nullable: false - - description: The 0 indexed page index you would like to receive given the - page size - explode: true - in: query - name: pageIndex - required: false - schema: - format: int32 - type: integer - style: form - x-nullable: false - - description: The maximum number of items you would like to receive in this - request - explode: true - in: query - name: pageSize - required: false - schema: - format: int32 - type: integer - style: form - x-nullable: false + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' + application/json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' + text/json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' + application/*+json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' + description: brands to associate to account + x-bodyName: brands responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Balance202110PagedListResponse' + $ref: '#/components/schemas/ValueResourceOfRetailMediaBrands' description: Success tags: - - Campaign + - Accounts + x-content-type: application/json-patch+json x-accepts: application/json - /2023-04/retail-media/accounts/{account-id}/campaigns: - get: - description: "Get all the editable and creatable campaign attributes including\ - \ all types of budgets for each campaigns in relation to the account id, limited\ - \ by the campaign ids." - operationId: Campaigns_GetApi202301ExternalAccountCampaignsByAccountId + /2024-07/retail-media/account-management/accounts/{accountId}/brands/remove: + post: + description: Remove a brand from an account + operationId: RemoveBrands parameters: - - description: The account to request the campaign for. + - description: The account id to update explode: false in: path - name: account-id + name: accountId required: true schema: type: string style: simple - x-nullable: false - - description: The ids that you would like to limit your result set to - explode: true - in: query - name: limitToId - required: false - schema: - items: - type: string - type: array - style: form - x-nullable: false - - description: The 0 indexed page index you would like to receive given the - page size - explode: true - in: query - name: pageIndex - required: false - schema: - default: 0 - format: int32 - type: integer - style: form - x-nullable: false - - description: The maximum number of items you would like to receive in this - request - explode: true - in: query - name: pageSize - required: false - schema: - default: 25 - format: int32 - type: integer - style: form - x-nullable: false + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' + application/json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' + text/json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' + application/*+json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' + description: Brands to remove from account + x-bodyName: brands responses: "200": content: application/json: schema: - $ref: '#/components/schemas/JsonApiPageResponseOfCampaignV202301' + $ref: '#/components/schemas/ValueResourceOfRetailMediaBrands' description: Success tags: - - Campaign + - Accounts + x-content-type: application/json-patch+json x-accepts: application/json + /2024-07/retail-media/account-management/accounts/{accountId}/create-brand-account: post: - description: Create a campaign and assign budgets for the given account id with - creatable campaign attributes given in request body constrained by business - validation. The validation error includes details and source of errors. Pacing - can be adjusted and affected by the status of the campaign and the days left - on the campaign if auto daily pacing is enabled. - operationId: Campaigns_PostApi202301ExternalAccountCampaignsByAccountId + description: Creates a new child Demand Brand Account for the provided parent + private market account + operationId: CreatePrivateMarketDemandBrandAccount parameters: - - description: The account to request the campaign for. + - description: Account Id for the parent private market account explode: false in: path - name: account-id + name: accountId required: true schema: type: string style: simple - x-nullable: false requestBody: content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrandAccountCreation' application/json: schema: - $ref: '#/components/schemas/PostCampaignV202301' - description: Creatable campaign attributes - x-nullable: false - x-bodyName: campaign + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrandAccountCreation' + text/json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrandAccountCreation' + application/*+json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrandAccountCreation' + description: Initial creation and configuration options for the new account + x-bodyName: accountDetails responses: "201": content: application/json: schema: - $ref: '#/components/schemas/JsonApiSingleResponseOfCampaignV202301' + $ref: '#/components/schemas/ResourceOutcomeOfRetailMediaAccount' description: Success tags: - - Campaign - x-content-type: application/json + - Accounts + x-content-type: application/json-patch+json x-accepts: application/json - /2023-04/retail-media/accounts/{account-id}/line-items: - get: - description: Gets page of line item objects for the given account id - operationId: GetApiV2ExternalAccountLineItemsByAccountId + /2024-07/retail-media/account-management/accounts/{accountId}/create-seller-account: + post: + description: Creates a new child Demand Seller Account for the provided parent + private market account + operationId: CreatePrivateMarketDemandSellerAccount parameters: - - description: The given account id + - description: Account Id for the parent private market account explode: false in: path - name: account-id + name: accountId required: true schema: type: string style: simple - x-nullable: false - - description: The campaign ids that you would like to limit your result set - to - explode: true - in: query - name: limitToCampaignId - required: false + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaSellerAccountCreation' + application/json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaSellerAccountCreation' + text/json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaSellerAccountCreation' + application/*+json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfRetailMediaSellerAccountCreation' + description: Initial creation and configuration options for the new account + x-bodyName: accountDetails + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOutcomeOfRetailMediaAccount' + description: Success + tags: + - Accounts + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/retail-media/account-management/accounts/{accountId}/sellers: + put: + description: replace the sellers assoiated with an account + operationId: UpdateSellers + parameters: + - description: the account id to update + explode: false + in: path + name: accountId + required: true schema: - items: - type: string - type: array - style: form - x-nullable: false - - description: The campaign types that you would like to limit your result set - to - explode: true - in: query - name: limitToType - required: false + type: string + style: simple + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/ValueResourceCollectionInputOfRetailMediaSeller' + application/json: + schema: + $ref: '#/components/schemas/ValueResourceCollectionInputOfRetailMediaSeller' + text/json: + schema: + $ref: '#/components/schemas/ValueResourceCollectionInputOfRetailMediaSeller' + application/*+json: + schema: + $ref: '#/components/schemas/ValueResourceCollectionInputOfRetailMediaSeller' + description: sellers to associate + x-bodyName: sellers + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ValueResourceCollectionOutcomeOfRetailMediaSeller' + description: Success + tags: + - Accounts + x-content-type: application/json-patch+json + x-accepts: application/json + /2024-07/retail-media/balances/{balanceId}/history: + get: + description: Gets the balance's historical change data. + operationId: GetBalanceHistory + parameters: + - description: Balance id. + explode: false + in: path + name: balanceId + required: true schema: - enum: - - Unknown - - Auction - - Preferred type: string - style: form - x-nullable: true - - description: The ids that you would like to limit your result set to + style: simple + - description: The (zero-based) starting offset in the collection. explode: true in: query - name: limitToId + name: offset required: false schema: - items: - type: string - type: array + default: 0 + format: int32 + maximum: 2147483647 + minimum: 0 + type: integer style: form - x-nullable: false - - description: The 0 indexed page index you would like to receive given the - page size + - description: The number of elements to be returned. explode: true in: query - name: pageIndex + name: limit required: false schema: + default: 25 format: int32 + maximum: 100 + minimum: 1 type: integer style: form - x-nullable: false - - description: The maximum number of items you would like to receive in this - request + - description: Comma separated change types string that will be queried. explode: true in: query - name: pageSize + name: limitToChangeTypes required: false schema: - format: int32 - type: integer + type: string style: form - x-nullable: false responses: "200": content: application/json: schema: - $ref: '#/components/schemas/CommonLineItemPagedListResponse' + $ref: '#/components/schemas/PageOfBalanceHistoryChangeDataCaptureV1' description: Success tags: - - Campaign + - Balance x-accepts: application/json - /2023-04/retail-media/auction-line-items/{line-item-id}: + /2024-07/retail-media/campaigns/{campaignId}/campaign-budget-overrides: get: - description: Gets the auction line item for the given line item id - operationId: GetApiV2ExternalAuctionLineItemByLineItemId + description: Get current campaign budget overrides by given external campaign + id. + operationId: GetCampaignBudgetOverrides parameters: - - description: The given line item id + - description: External campaign id. explode: false in: path - name: line-item-id + name: campaignId required: true schema: - type: string + format: int64 + type: integer style: simple - x-nullable: false responses: "200": content: application/json: schema: - $ref: '#/components/schemas/AuctionLineItemResponse' + $ref: '#/components/schemas/ValueResourceOutcomeOfCampaignBudgetOverrides' description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/AuctionLineItemResponse' - description: Bad Request tags: - Campaign x-accepts: application/json put: - description: Updates the auction line item for the given line item id - operationId: PutApiV2ExternalAuctionLineItemByLineItemId + description: Update campaign budget overrides by given external campaign id + and new campaign budget overrides settings. + operationId: UpdateCampaignBudgetOverrides parameters: - - description: The given line item id + - description: External campaign id. explode: false in: path - name: line-item-id + name: campaignId required: true schema: - type: string + format: int64 + type: integer style: simple - x-nullable: false requestBody: content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfCampaignBudgetOverrides' application/json: schema: - $ref: '#/components/schemas/AuctionLineItemUpdateModelRequest' - description: The line item settings to create a line item with - x-nullable: false - x-bodyName: lineItem + $ref: '#/components/schemas/ValueResourceInputOfCampaignBudgetOverrides' + text/json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfCampaignBudgetOverrides' + application/*+json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfCampaignBudgetOverrides' + description: New campaign budget overrides settings value resource input. + x-bodyName: campaignBudgetOverridesInput responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/AuctionLineItemResponse' + $ref: '#/components/schemas/ValueResourceOutcomeOfCampaignBudgetOverrides' description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/AuctionLineItemResponse' - description: Bad Request tags: - Campaign - x-content-type: application/json + x-content-type: application/json-patch+json x-accepts: application/json - /2023-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords: + /2024-07/retail-media/line-items/{lineItemId}/line-item-budget-overrides: get: - description: This endpoint gets the keyword target on the specified line item. - operationId: TargetingApi_GetApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId + description: Gets a collection of monthly and daily budget overrides for the + provided line item. + operationId: GetLineItemBudgetOverrides parameters: - - description: The line item to interact with + - description: The line item id to get budget overrides for. explode: false in: path - name: line-item-id + name: lineItemId required: true schema: type: string style: simple - x-nullable: false responses: "200": content: application/json: schema: - $ref: '#/components/schemas/KeywordTarget202110Response' + $ref: '#/components/schemas/ValueResourceOutcomeOfLineItemBudgetOverrides' description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/KeywordTarget202110Response' - description: Bad Request tags: - Campaign x-accepts: application/json - /2023-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append: - post: - description: This endpoint appends one or more keywords to targeting on the - specified line item. The resulting state of the keyword target is returned. - operationId: TargetingApi_PostApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId + put: + description: Update line item budget overrides by given external line item id + and new line item budget overrides settings. + operationId: UpdateLineItemBudgetOverrides parameters: - - description: The line item to interact with + - description: Line item external id. explode: false in: path - name: line-item-id + name: lineItemId required: true schema: type: string style: simple - x-nullable: false requestBody: content: - application/json: + application/json-patch+json: schema: - $ref: '#/components/schemas/KeywordTarget202110Request' - description: "" - x-nullable: false - x-bodyName: keywordsToAppend - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/KeywordTarget202110Response' - description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/KeywordTarget202110Response' - description: Bad Request - tags: - - Campaign - x-content-type: application/json - x-accepts: application/json - /2023-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete: - post: - description: This endpoint removes one or more keywords from targeting on the - specified line item. The resulting state of the keyword target is returned. - operationId: TargetingApi_PostApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId - parameters: - - description: The line item to interact with - explode: false - in: path - name: line-item-id - required: true - schema: - type: string - style: simple - x-nullable: false - requestBody: - content: + $ref: '#/components/schemas/ValueResourceInputOfLineItemBudgetOverrides' application/json: schema: - $ref: '#/components/schemas/KeywordTarget202110Request' - description: "" - x-nullable: false - x-bodyName: keywordsToRemove + $ref: '#/components/schemas/ValueResourceInputOfLineItemBudgetOverrides' + text/json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfLineItemBudgetOverrides' + application/*+json: + schema: + $ref: '#/components/schemas/ValueResourceInputOfLineItemBudgetOverrides' + description: New line item budget overrides settings value resource input. + x-bodyName: lineItemBudgetOverridesInput responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/KeywordTarget202110Response' + $ref: '#/components/schemas/ValueResourceOutcomeOfLineItemBudgetOverrides' description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/KeywordTarget202110Response' - description: Bad Request tags: - Campaign - x-content-type: application/json + x-content-type: application/json-patch+json x-accepts: application/json - /2023-04/retail-media/balances/{balance-id}/campaigns: + /2024-07/retail-media/accounts/{account-id}/balances: get: - description: Gets page of campaigns for the given balanceId - operationId: BalancesApi_GetApi202110ExternalBalanceCampaignsByBalanceId + description: Get page of balances for the given accountId. + operationId: Balances_GetApiV1ExternalAccountBalancesByAccountId parameters: - - description: The balance to get campaigns from + - description: The account to get page of balances for explode: false in: path - name: balance-id + name: account-id required: true schema: type: string @@ -1809,6 +1869,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -1820,6 +1881,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -1829,20 +1891,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BalanceCampaign202110PagedListResponse' + $ref: '#/components/schemas/BalanceResponsePagedListResponse' description: Success tags: - - Campaign + - Balance x-accepts: application/json - /2023-04/retail-media/balances/{balance-id}/campaigns/append: post: - description: appends one or more campaigns to the specified balance - operationId: BalancesApi_PostApi202110ExternalBalanceCampaignsAppendByBalanceId + description: Create balance for the given account id + operationId: Balances_PostApiV1ExternalAccountBalancesByAccountId parameters: - - description: The balance to add campaigns from + - description: The account to create balances for explode: false in: path - name: balance-id + name: account-id required: true schema: type: string @@ -1852,125 +1913,111 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/BalanceCampaign202110ListRequest' - description: The campaigns to append + $ref: '#/components/schemas/CreateBalanceRequest' x-nullable: false - x-bodyName: campaigns + x-bodyName: createBalance responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/BalanceCampaign202110PagedListResponse' + $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/balances/{balance-id}/campaigns/delete: - post: - description: Removes one or more campaigns on the specified balance - operationId: BalancesApi_PostApi202110ExternalBalanceCampaignsDeleteByBalanceId + /2024-07/retail-media/accounts/{account-id}/balances/{balanceId}: + get: + description: Get a balance for the given account id and balance id + operationId: Balances_GetApiV1ExternalAccountByAccountIdAndBalanceId parameters: - - description: The balance to remove campaigns from + - description: The account of the balance explode: false in: path - name: balance-id + name: account-id required: true schema: type: string style: simple x-nullable: false - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BalanceCampaign202110ListRequest' - description: The campaigns to append + - description: The balance id + explode: false + in: path + name: balanceId + required: true + schema: + type: string + style: simple x-nullable: false - x-bodyName: campaigns responses: "200": content: application/json: schema: - $ref: '#/components/schemas/BalanceCampaign202110PagedListResponse' + $ref: '#/components/schemas/BalanceResponse' description: Success tags: - - Campaign - x-content-type: application/json + - Balance x-accepts: application/json - /2023-04/retail-media/campaigns/{campaign-id}/auction-line-items: - get: - description: Gets page of auction line item objects for the given campaign id - operationId: GetApiV2ExternalCampaignAuctionLineItemsByCampaignId + patch: + description: Modify a balance for the given account id + operationId: Balances_PatchApiV1ExternalAccountByAccountIdAndBalanceId parameters: - - description: The given campaign id + - description: The account of the balance explode: false in: path - name: campaign-id + name: account-id required: true schema: type: string style: simple x-nullable: false - - description: The ids that you would like to limit your result set to - explode: true - in: query - name: limitToId - required: false + - description: The balance to change the dates + explode: false + in: path + name: balanceId + required: true schema: - items: - type: string - type: array - style: form + type: string + style: simple x-nullable: false - - description: The 0 indexed page index you would like to receive given the - page size - explode: true - in: query - name: pageIndex - required: false - schema: - format: int32 - type: integer - style: form - x-nullable: false - - description: The maximum number of items you would like to receive in this - request - explode: true - in: query - name: pageSize - required: false - schema: - format: int32 - type: integer - style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateBalanceModelRequest' x-nullable: false + x-bodyName: updateBalanceModel responses: "200": content: application/json: schema: - $ref: '#/components/schemas/AuctionLineItemPagedListResponse' + $ref: '#/components/schemas/BalanceResponse' description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/AuctionLineItemPagedListResponse' - description: Bad Request tags: - - Campaign + - Balance + x-content-type: application/json x-accepts: application/json + /2024-07/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds: post: - description: Creates new auction line item with the specified settings - operationId: PostApiV2ExternalCampaignAuctionLineItemsByCampaignId + description: Add funds to a balance for the given account id + operationId: Balances_PostApiV1ExternalAccountAddFundsByAccountIdAndBalanceId parameters: - - description: The given campaign id + - description: The account of the balance explode: false in: path - name: campaign-id + name: account-id + required: true + schema: + type: string + style: simple + x-nullable: false + - description: The balance to add funds to + explode: false + in: path + name: balanceId required: true schema: type: string @@ -1980,37 +2027,72 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AuctionLineItemCreateModelRequest' - description: The line item settings to create a line item with + $ref: '#/components/schemas/AddFundsToBalanceRequest' x-nullable: false - x-bodyName: lineItem + x-bodyName: addFundsToBalance responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/AuctionLineItemResponse' + $ref: '#/components/schemas/BalanceResponse' description: Success - "400": + tags: + - Balance + x-content-type: application/json + x-accepts: application/json + /2024-07/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates: + post: + description: Change dates of a balance for the given account id + operationId: Balances_PostApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId + parameters: + - description: The account of the balance + explode: false + in: path + name: account-id + required: true + schema: + type: string + style: simple + x-nullable: false + - description: The balance to change the dates + explode: false + in: path + name: balanceId + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChangeDatesOfBalanceRequest' + x-nullable: false + x-bodyName: changeDatesOfBalance + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/AuctionLineItemResponse' - description: Bad Request + $ref: '#/components/schemas/BalanceResponse' + description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/campaigns/{campaign-id}/preferred-line-items: + /2024-07/retail-media/accounts/{account-id}/campaigns: get: - description: Gets page of preferred line item objects for the given campaign - id - operationId: LineItemsApi_GetApi202110ExternalCampaignPreferredLineItemsByCampaignId + description: "Get all the editable and creatable campaign attributes including\ + \ all types of budgets for each campaigns in relation to the account id, limited\ + \ by the campaign ids." + operationId: Campaigns_GetApi202301ExternalAccountCampaignsByAccountId parameters: - - description: The given campaign id + - description: The account to request the campaign for. explode: false in: path - name: campaign-id + name: account-id required: true schema: type: string @@ -2034,6 +2116,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -2045,6 +2128,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -2054,25 +2138,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PreferredLineItem202110PagedListResponse' + $ref: '#/components/schemas/JsonApiPageResponseOfCampaignV202301' description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/PreferredLineItem202110PagedListResponse' - description: Bad Request tags: - Campaign x-accepts: application/json post: - description: Creates a new preferred line item with the specified settings - operationId: LineItemsApi_PostApi202110ExternalCampaignPreferredLineItemsByCampaignId + description: Create a campaign and assign budgets for the given account id with + creatable campaign attributes given in request body constrained by business + validation. The validation error includes details and source of errors. Pacing + can be adjusted and affected by the status of the campaign and the days left + on the campaign if auto daily pacing is enabled. + operationId: Campaigns_PostApi202301ExternalAccountCampaignsByAccountId parameters: - - description: The given campaign id + - description: The account to request the campaign for. explode: false in: path - name: campaign-id + name: account-id required: true schema: type: string @@ -2082,37 +2164,113 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PreferredLineItemCreateModel202110Request' - description: The line item settings to create a line item with + $ref: '#/components/schemas/PostCampaignV202301' + description: Creatable campaign attributes x-nullable: false - x-bodyName: lineItem + x-bodyName: campaign responses: "201": content: application/json: schema: - $ref: '#/components/schemas/PreferredLineItem202110Response' + $ref: '#/components/schemas/JsonApiSingleResponseOfCampaignV202301' description: Success - "400": + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /2024-07/retail-media/accounts/{account-id}/line-items: + get: + description: Gets page of line item objects for the given account id + operationId: GetApiV2ExternalAccountLineItemsByAccountId + parameters: + - description: The given account id + explode: false + in: path + name: account-id + required: true + schema: + type: string + style: simple + x-nullable: false + - description: The campaign ids that you would like to limit your result set + to + explode: true + in: query + name: limitToCampaignId + required: false + schema: + items: + type: string + type: array + style: form + x-nullable: false + - description: The campaign types that you would like to limit your result set + to + explode: true + in: query + name: limitToType + required: false + schema: + enum: + - Unknown + - Auction + - Preferred + type: string + style: form + x-nullable: true + - description: The ids that you would like to limit your result set to + explode: true + in: query + name: limitToId + required: false + schema: + items: + type: string + type: array + style: form + x-nullable: false + - description: The 0 indexed page index you would like to receive given the + page size + explode: true + in: query + name: pageIndex + required: false + schema: + format: int32 + type: integer + style: form + x-nullable: false + - description: The maximum number of items you would like to receive in this + request + explode: true + in: query + name: pageSize + required: false + schema: + format: int32 + type: integer + style: form + x-nullable: false + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/PreferredLineItem202110Response' - description: Bad Request + $ref: '#/components/schemas/CommonLineItemPagedListResponse' + description: Success tags: - Campaign - x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/campaigns/{campaignId}: + /2024-07/retail-media/auction-line-items/{line-item-id}: get: - description: Get all the editable and creatable campaign attributes including - all types of budgets given the campaign id - operationId: Campaigns_GetApi202301ExternalCampaignByCampaignId + description: Gets the auction line item for the given line item id + operationId: GetApiV2ExternalAuctionLineItemByLineItemId parameters: - - description: Campaign Id of the campaign detail + - description: The given line item id explode: false in: path - name: campaignId + name: line-item-id required: true schema: type: string @@ -2123,23 +2281,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/JsonApiSingleResponseOfCampaignV202301' + $ref: '#/components/schemas/AuctionLineItemResponse' description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AuctionLineItemResponse' + description: Bad Request tags: - Campaign x-accepts: application/json put: - description: Edit a campaign for the given campaign id with a given editable - attributes. This will return updated creatable and editable attributes of - the campaign as the result of the operation. Pacing can be adjusted and affected - by the status of the campaign and the days left on the campaign if auto daily - pacing is enabled. - operationId: Campaigns_PutApi202301ExternalCampaignByCampaignId + description: Updates the auction line item for the given line item id + operationId: PutApiV2ExternalAuctionLineItemByLineItemId parameters: - - description: Campaign Id of the updating campaign + - description: The given line item id explode: false in: path - name: campaignId + name: line-item-id required: true schema: type: string @@ -2149,27 +2309,33 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PutCampaignV202301' - description: Editable campaign attributes + $ref: '#/components/schemas/AuctionLineItemUpdateModelRequest' + description: The line item settings to create a line item with x-nullable: false - x-bodyName: campaign + x-bodyName: lineItem responses: "200": content: application/json: schema: - $ref: '#/components/schemas/JsonApiSingleResponseOfCampaignV202301' + $ref: '#/components/schemas/AuctionLineItemResponse' description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AuctionLineItemResponse' + description: Bad Request tags: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/line-items/{line-item-id}: + /2024-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords: get: - description: Gets the line item for the given line item id - operationId: GetApiV2ExternalLineItemByLineItemId + description: This endpoint gets the keyword target on the specified line item. + operationId: TargetingApi_GetApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId parameters: - - description: The given line item id + - description: The line item to interact with explode: false in: path name: line-item-id @@ -2183,17 +2349,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CommonLineItemResponse' + $ref: '#/components/schemas/KeywordTarget202110Response' description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/KeywordTarget202110Response' + description: Bad Request tags: - Campaign x-accepts: application/json - /2023-04/retail-media/line-items/{line-item-id}/bid-multipliers: - get: - description: Get bid multipliers by line item - operationId: LineItems_GetApi202301ExternalLineItemBidMultipliersByLineItemId + /2024-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append: + post: + description: This endpoint appends one or more keywords to targeting on the + specified line item. The resulting state of the keyword target is returned. + operationId: TargetingApi_PostApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId parameters: - - description: Long external id of the associated line item + - description: The line item to interact with explode: false in: path name: line-item-id @@ -2201,27 +2374,39 @@ paths: schema: type: string style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/KeywordTarget202110Request' + description: "" + x-nullable: false + x-bodyName: keywordsToAppend responses: "200": content: - text/plain: - schema: - $ref: '#/components/schemas/JsonApiSingleResponseOfLineItemBidMultipliers' application/json: schema: - $ref: '#/components/schemas/JsonApiSingleResponseOfLineItemBidMultipliers' - text/json: - schema: - $ref: '#/components/schemas/JsonApiSingleResponseOfLineItemBidMultipliers' + $ref: '#/components/schemas/KeywordTarget202110Response' description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/KeywordTarget202110Response' + description: Bad Request tags: - Campaign + x-content-type: application/json x-accepts: application/json - put: - description: Replace bid multipliers on a line item - operationId: LineItems_PutApi202301ExternalLineItemBidMultipliersByLineItemId + /2024-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete: + post: + description: This endpoint removes one or more keywords from targeting on the + specified line item. The resulting state of the keyword target is returned. + operationId: TargetingApi_PostApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId parameters: - - description: Long external id of the associated line item + - description: The line item to interact with explode: false in: path name: line-item-id @@ -2229,40 +2414,41 @@ paths: schema: type: string style: simple + x-nullable: false requestBody: content: application/json: schema: - $ref: '#/components/schemas/LineItemBidMultipliersRequest' + $ref: '#/components/schemas/KeywordTarget202110Request' + description: "" x-nullable: false - x-bodyName: request + x-bodyName: keywordsToRemove responses: "200": content: - text/plain: - schema: - $ref: '#/components/schemas/LineItemBidMultipliersResponse' application/json: schema: - $ref: '#/components/schemas/LineItemBidMultipliersResponse' - text/json: - schema: - $ref: '#/components/schemas/LineItemBidMultipliersResponse' + $ref: '#/components/schemas/KeywordTarget202110Response' description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/KeywordTarget202110Response' + description: Bad Request tags: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/line-items/{line-item-id}/products: + /2024-07/retail-media/balances/{balance-id}/campaigns: get: - description: This endpoint gets the promoted products on the specified line - item. - operationId: PromotedProductsApi_GetApi202110ExternalLineItemProductsByLineItemId + description: Gets page of campaigns for the given balanceId + operationId: BalancesApi_GetApi202110ExternalBalanceCampaignsByBalanceId parameters: - - description: The line item to interact with + - description: The balance to get campaigns from explode: false in: path - name: line-item-id + name: balance-id required: true schema: type: string @@ -2306,21 +2492,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PromotedProduct202110PagedListResponse' + $ref: '#/components/schemas/BalanceCampaign202110PagedListResponse' description: Success tags: - - Campaign + - Balance x-accepts: application/json - /2023-04/retail-media/line-items/{line-item-id}/products/append: + /2024-07/retail-media/balances/{balance-id}/campaigns/append: post: - description: This endpoint appends one or more products to promote on the specified - line item. The resulting state of the line item is returned. - operationId: PromotedProductsApi_PostApi202110ExternalLineItemProductsAppendByLineItemId + description: appends one or more campaigns to the specified balance + operationId: BalancesApi_PostApi202110ExternalBalanceCampaignsAppendByBalanceId parameters: - - description: The line item to interact with + - description: The balance to add campaigns from explode: false in: path - name: line-item-id + name: balance-id required: true schema: type: string @@ -2330,31 +2515,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PromotedProduct202110ListRequest' - description: the products to append to this line item + $ref: '#/components/schemas/BalanceCampaign202110ListRequest' + description: The campaigns to append x-nullable: false - x-bodyName: promotedProductsToAppend + x-bodyName: campaigns responses: "200": content: application/json: schema: - $ref: '#/components/schemas/PromotedProduct202110PagedListResponse' + $ref: '#/components/schemas/BalanceCampaign202110PagedListResponse' description: Success tags: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/line-items/{line-item-id}/products/delete: + /2024-07/retail-media/balances/{balance-id}/campaigns/delete: post: - description: This endpoint removes one or more products from promotion on the - specified line item. The resulting state of the line item is returned. - operationId: PromotedProductsApi_PostApi202110ExternalLineItemProductsDeleteByLineItemId + description: Removes one or more campaigns on the specified balance + operationId: BalancesApi_PostApi202110ExternalBalanceCampaignsDeleteByBalanceId parameters: - - description: The line item to interact with + - description: The balance to remove campaigns from explode: false in: path - name: line-item-id + name: balance-id required: true schema: type: string @@ -2364,119 +2548,92 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PromotedProduct202110ListRequest' - description: "" + $ref: '#/components/schemas/BalanceCampaign202110ListRequest' + description: The campaigns to append x-nullable: false - x-bodyName: promotedProductsToRemove + x-bodyName: campaigns responses: "200": content: application/json: schema: - $ref: '#/components/schemas/PromotedProduct202110PagedListResponse' + $ref: '#/components/schemas/BalanceCampaign202110PagedListResponse' description: Success tags: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/line-items/{line-item-id}/products/pause: - post: - description: This endpoint pauses one or more promoted products on a specified - line item. - operationId: PromotedProducts_PostApi202110ExternalLineItemProductsPauseByLineItemId + /2024-07/retail-media/campaigns/{campaign-id}/auction-line-items: + get: + description: Gets page of auction line item objects for the given campaign id + operationId: GetApiV2ExternalCampaignAuctionLineItemsByCampaignId parameters: - - description: The line item to interact with. + - description: The given campaign id explode: false in: path - name: line-item-id + name: campaign-id required: true schema: type: string style: simple x-nullable: false - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PromotedProduct202110ListRequest' - description: The products from which their IDs will be used to pause. - x-nullable: false - x-bodyName: promotedProductsToPause - responses: - "200": - description: Success - tags: - - Campaign - x-content-type: application/json - x-accepts: application/json - /2023-04/retail-media/line-items/{line-item-id}/products/unpause: - post: - description: This endpoint unpauses one or more promoted products on a specified - line item. - operationId: PromotedProducts_PostApi202110ExternalLineItemProductsUnpauseByLineItemId - parameters: - - description: The line item to interact with. - explode: false - in: path - name: line-item-id - required: true + - description: The ids that you would like to limit your result set to + explode: true + in: query + name: limitToId + required: false schema: - type: string - style: simple + items: + type: string + type: array + style: form x-nullable: false - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PromotedProduct202110ListRequest' - description: The products from which their IDs will be used to unpause. + - description: The 0 indexed page index you would like to receive given the + page size + explode: true + in: query + name: pageIndex + required: false + schema: + format: int32 + type: integer + style: form x-nullable: false - x-bodyName: promotedProductsToUnpause - responses: - "200": - description: Success - tags: - - Campaign - x-content-type: application/json - x-accepts: application/json - /2023-04/retail-media/preferred-line-items/{line-item-id}: - get: - description: Gets the preferred line item for the given line item id - operationId: LineItemsApi_GetApi202110ExternalPreferredLineItemByLineItemId - parameters: - - description: The given line item id - explode: false - in: path - name: line-item-id - required: true + - description: The maximum number of items you would like to receive in this + request + explode: true + in: query + name: pageSize + required: false schema: - type: string - style: simple + format: int32 + type: integer + style: form x-nullable: false responses: "200": content: application/json: schema: - $ref: '#/components/schemas/PreferredLineItem202110Response' + $ref: '#/components/schemas/AuctionLineItemPagedListResponse' description: Success "400": content: application/json: schema: - $ref: '#/components/schemas/PreferredLineItem202110Response' + $ref: '#/components/schemas/AuctionLineItemPagedListResponse' description: Bad Request tags: - Campaign x-accepts: application/json - put: - description: Updates the preferred line item for the given line item id - operationId: LineItemsApi_PutApi202110ExternalPreferredLineItemByLineItemId + post: + description: Creates new auction line item with the specified settings + operationId: PostApiV2ExternalCampaignAuctionLineItemsByCampaignId parameters: - - description: The given line item id + - description: The given campaign id explode: false in: path - name: line-item-id + name: campaign-id required: true schema: type: string @@ -2486,149 +2643,99 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PreferredLineItemUpdateModel202110Request' + $ref: '#/components/schemas/AuctionLineItemCreateModelRequest' description: The line item settings to create a line item with x-nullable: false x-bodyName: lineItem responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/PreferredLineItem202110Response' + $ref: '#/components/schemas/AuctionLineItemResponse' description: Success "400": content: application/json: schema: - $ref: '#/components/schemas/PreferredLineItem202110Response' + $ref: '#/components/schemas/AuctionLineItemResponse' description: Bad Request tags: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket: + /2024-07/retail-media/campaigns/{campaign-id}/preferred-line-items: get: - description: This endpoint gets the add to basket target on the specified line - item. - operationId: TargetingApi_GetApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId + description: Gets page of preferred line item objects for the given campaign + id + operationId: LineItemsApi_GetApi202110ExternalCampaignPreferredLineItemsByCampaignId parameters: - - description: The line item to interact with + - description: The given campaign id explode: false in: path - name: line-item-id + name: campaign-id required: true schema: type: string style: simple x-nullable: false - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/AddToBasketTarget202110Response' - description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/AddToBasketTarget202110Response' - description: Bad Request - tags: - - Campaign - x-accepts: application/json - put: - description: This endpoint sets the scope of the add to basket target on the - specified line item. - operationId: TargetingApi_PutApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId - parameters: - - description: The line item to interact with - explode: false - in: path - name: line-item-id - required: true + - description: The ids that you would like to limit your result set to + explode: true + in: query + name: limitToId + required: false schema: - type: string - style: simple - x-nullable: false - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AddToBasketTarget202110Request' - description: The add to basket target to set the scope for + items: + type: string + type: array + style: form x-nullable: false - x-bodyName: addToBasketTarget - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/AddToBasketTarget202110Response' - description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/AddToBasketTarget202110Response' - description: Bad Request - tags: - - Campaign - x-content-type: application/json - x-accepts: application/json - /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append: - post: - description: This endpoint appends one or more add to basket ids to targeting - on the specified line item. The resulting state of the add to basket target - is returned. - operationId: TargetingApi_PostApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId - parameters: - - description: The line item to interact with - explode: false - in: path - name: line-item-id - required: true + - description: The 0 indexed page index you would like to receive given the + page size + explode: true + in: query + name: pageIndex + required: false schema: - type: string - style: simple + format: int32 + type: integer + style: form x-nullable: false - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AddToBasketIdsUpdateModel202110Request' - description: Ids to append to the target + - description: The maximum number of items you would like to receive in this + request + explode: true + in: query + name: pageSize + required: false + schema: + format: int32 + type: integer + style: form x-nullable: false - x-bodyName: idsToAppend responses: "200": content: application/json: schema: - $ref: '#/components/schemas/AddToBasketTarget202110Response' + $ref: '#/components/schemas/PreferredLineItem202110PagedListResponse' description: Success "400": content: application/json: schema: - $ref: '#/components/schemas/AddToBasketTarget202110Response' + $ref: '#/components/schemas/PreferredLineItem202110PagedListResponse' description: Bad Request tags: - Campaign - x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete: post: - description: This endpoint removes one or more add to basket ids from targeting - on the specified line item. The resulting state of the add to basket target - is returned. - operationId: TargetingApi_PostApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId + description: Creates a new preferred line item with the specified settings + operationId: LineItemsApi_PostApi202110ExternalCampaignPreferredLineItemsByCampaignId parameters: - - description: The line item to interact with + - description: The given campaign id explode: false in: path - name: line-item-id + name: campaign-id required: true schema: type: string @@ -2638,36 +2745,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AddToBasketIdsUpdateModel202110Request' - description: Ids to remove from the target + $ref: '#/components/schemas/PreferredLineItemCreateModel202110Request' + description: The line item settings to create a line item with x-nullable: false - x-bodyName: idsToRemove + x-bodyName: lineItem responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/AddToBasketTarget202110Response' + $ref: '#/components/schemas/PreferredLineItem202110Response' description: Success "400": content: application/json: schema: - $ref: '#/components/schemas/AddToBasketTarget202110Response' + $ref: '#/components/schemas/PreferredLineItem202110Response' description: Bad Request tags: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences: + /2024-07/retail-media/campaigns/{campaignId}: get: - description: This endpoint gets the audience target on the specified line item. - operationId: TargetingApi_GetApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId + description: Get all the editable and creatable campaign attributes including + all types of budgets given the campaign id + operationId: Campaigns_GetApi202301ExternalCampaignByCampaignId parameters: - - description: The line item to interact with + - description: Campaign Id of the campaign detail explode: false in: path - name: line-item-id + name: campaignId required: true schema: type: string @@ -2678,26 +2786,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AudienceTarget202110Response' + $ref: '#/components/schemas/JsonApiSingleResponseOfCampaignV202301' description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/AudienceTarget202110Response' - description: Bad Request tags: - Campaign x-accepts: application/json put: - description: This endpoint sets the scope of the audience target on the specified - line item. - operationId: TargetingApi_PutApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId + description: Edit a campaign for the given campaign id with a given editable + attributes. This will return updated creatable and editable attributes of + the campaign as the result of the operation. Pacing can be adjusted and affected + by the status of the campaign and the days left on the campaign if auto daily + pacing is enabled. + operationId: Campaigns_PutApi202301ExternalCampaignByCampaignId parameters: - - description: The line item to interact with + - description: Campaign Id of the updating campaign explode: false in: path - name: line-item-id + name: campaignId required: true schema: type: string @@ -2707,34 +2812,27 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AudienceTarget202110Request' - description: The audience target to set the scope for + $ref: '#/components/schemas/PutCampaignV202301' + description: Editable campaign attributes x-nullable: false - x-bodyName: audienceTarget + x-bodyName: campaign responses: "200": content: application/json: schema: - $ref: '#/components/schemas/AudienceTarget202110Response' + $ref: '#/components/schemas/JsonApiSingleResponseOfCampaignV202301' description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/AudienceTarget202110Response' - description: Bad Request tags: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append: - post: - description: This endpoint appends one or more audiences ids to targeting on - the specified line item. The resulting state of the audience target is returned. - operationId: TargetingApi_PostApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId + /2024-07/retail-media/line-items/{line-item-id}: + get: + description: Gets the line item for the given line item id + operationId: GetApiV2ExternalLineItemByLineItemId parameters: - - description: The line item to interact with + - description: The given line item id explode: false in: path name: line-item-id @@ -2743,39 +2841,22 @@ paths: type: string style: simple x-nullable: false - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AudienceIdsUpdateModel202110Request' - description: Audience ids to append to the target - x-nullable: false - x-bodyName: idsToAppend responses: "200": content: application/json: schema: - $ref: '#/components/schemas/AudienceTarget202110Response' + $ref: '#/components/schemas/CommonLineItemResponse' description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/AudienceTarget202110Response' - description: Bad Request tags: - Campaign - x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete: - post: - description: This endpoint removes one or more audiences ids from targeting - on the specified line item. The resulting state of the audience target is - returned. - operationId: TargetingApi_PostApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId + /2024-07/retail-media/line-items/{line-item-id}/bid-multipliers: + get: + description: Get bid multipliers by line item + operationId: LineItems_GetApi202301ExternalLineItemBidMultipliersByLineItemId parameters: - - description: The line item to interact with + - description: Long external id of the associated line item explode: false in: path name: line-item-id @@ -2783,38 +2864,27 @@ paths: schema: type: string style: simple - x-nullable: false - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AudienceIdsUpdateModel202110Request' - description: Audience ids to remove from the target - x-nullable: false - x-bodyName: idsToRemove responses: "200": content: - application/json: + text/plain: schema: - $ref: '#/components/schemas/AudienceTarget202110Response' - description: Success - "400": - content: + $ref: '#/components/schemas/JsonApiSingleResponseOfLineItemBidMultipliers' application/json: schema: - $ref: '#/components/schemas/AudienceTarget202110Response' - description: Bad Request + $ref: '#/components/schemas/JsonApiSingleResponseOfLineItemBidMultipliers' + text/json: + schema: + $ref: '#/components/schemas/JsonApiSingleResponseOfLineItemBidMultipliers' + description: Success tags: - Campaign - x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores: - get: - description: This endpoint gets the store target on the specified line item. - operationId: TargetingApi_GetApi202110ExternalPreferredLineItemTargetingStoresByLineItemId + put: + description: Replace bid multipliers on a line item + operationId: LineItems_PutApi202301ExternalLineItemBidMultipliersByLineItemId parameters: - - description: The line item to interact with + - description: Long external id of the associated line item explode: false in: path name: line-item-id @@ -2822,27 +2892,35 @@ paths: schema: type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LineItemBidMultipliersRequest' x-nullable: false + x-bodyName: request responses: "200": content: - application/json: + text/plain: schema: - $ref: '#/components/schemas/StoreTarget202110Response' - description: Success - "400": - content: + $ref: '#/components/schemas/LineItemBidMultipliersResponse' application/json: schema: - $ref: '#/components/schemas/StoreTarget202110Response' - description: Bad Request + $ref: '#/components/schemas/LineItemBidMultipliersResponse' + text/json: + schema: + $ref: '#/components/schemas/LineItemBidMultipliersResponse' + description: Success tags: - Campaign + x-content-type: application/json x-accepts: application/json - put: - description: This endpoint sets the scope of the store target on the specified - line item. - operationId: TargetingApi_PutApi202110ExternalPreferredLineItemTargetingStoresByLineItemId + /2024-07/retail-media/line-items/{line-item-id}/products: + get: + description: This endpoint gets the promoted products on the specified line + item. + operationId: PromotedProductsApi_GetApi202110ExternalLineItemProductsByLineItemId parameters: - description: The line item to interact with explode: false @@ -2853,36 +2931,88 @@ paths: type: string style: simple x-nullable: false - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StoreTarget202110Request' - description: The store target to set the scope for + - description: The ids that you would like to limit your result set to + explode: true + in: query + name: limitToId + required: false + schema: + items: + type: string + type: array + style: form + x-nullable: false + - description: The 0 indexed page index you would like to receive given the + page size + explode: true + in: query + name: pageIndex + required: false + schema: + format: int32 + type: integer + style: form + x-nullable: false + - description: The maximum number of items you would like to receive in this + request + explode: true + in: query + name: pageSize + required: false + schema: + format: int32 + type: integer + style: form x-nullable: false - x-bodyName: storeTarget responses: "200": content: application/json: schema: - $ref: '#/components/schemas/StoreTarget202110Response' + $ref: '#/components/schemas/PromotedProduct202110PagedListResponse' description: Success - "400": + tags: + - Campaign + x-accepts: application/json + /2024-07/retail-media/line-items/{line-item-id}/products/append: + post: + description: This endpoint appends one or more products to promote on the specified + line item. The resulting state of the line item is returned. + operationId: PromotedProductsApi_PostApi202110ExternalLineItemProductsAppendByLineItemId + parameters: + - description: The line item to interact with + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromotedProduct202110ListRequest' + description: the products to append to this line item + x-nullable: false + x-bodyName: promotedProductsToAppend + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/StoreTarget202110Response' - description: Bad Request + $ref: '#/components/schemas/PromotedProduct202110PagedListResponse' + description: Success tags: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append: + /2024-07/retail-media/line-items/{line-item-id}/products/delete: post: - description: This endpoint appends one or more store ids to targeting on the - specified line item. The resulting state of the store target is returned. - operationId: TargetingApi_PostApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId + description: This endpoint removes one or more products from promotion on the + specified line item. The resulting state of the line item is returned. + operationId: PromotedProductsApi_PostApi202110ExternalLineItemProductsDeleteByLineItemId parameters: - description: The line item to interact with explode: false @@ -2897,32 +3027,184 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StoreIdsUpdateModel202110Request' - description: Store ids to append to the target + $ref: '#/components/schemas/PromotedProduct202110ListRequest' + description: "" x-nullable: false - x-bodyName: idsToAppend + x-bodyName: promotedProductsToRemove responses: "200": content: application/json: schema: - $ref: '#/components/schemas/StoreTarget202110Response' + $ref: '#/components/schemas/PromotedProduct202110PagedListResponse' + description: Success + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /2024-07/retail-media/line-items/{line-item-id}/products/pause: + post: + description: This endpoint pauses one or more promoted products on a specified + line item. + operationId: PromotedProducts_PostApi202110ExternalLineItemProductsPauseByLineItemId + parameters: + - description: The line item to interact with. + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromotedProduct202110ListRequest' + description: The products from which their IDs will be used to pause. + x-nullable: false + x-bodyName: promotedProductsToPause + responses: + "200": + description: Success + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /2024-07/retail-media/line-items/{line-item-id}/products/unpause: + post: + description: This endpoint unpauses one or more promoted products on a specified + line item. + operationId: PromotedProducts_PostApi202110ExternalLineItemProductsUnpauseByLineItemId + parameters: + - description: The line item to interact with. + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromotedProduct202110ListRequest' + description: The products from which their IDs will be used to unpause. + x-nullable: false + x-bodyName: promotedProductsToUnpause + responses: + "200": + description: Success + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /2024-07/retail-media/preferred-line-items/{line-item-id}: + get: + description: Gets the preferred line item for the given line item id + operationId: LineItemsApi_GetApi202110ExternalPreferredLineItemByLineItemId + parameters: + - description: The given line item id + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PreferredLineItem202110Response' description: Success "400": content: application/json: schema: - $ref: '#/components/schemas/StoreTarget202110Response' + $ref: '#/components/schemas/PreferredLineItem202110Response' + description: Bad Request + tags: + - Campaign + x-accepts: application/json + put: + description: Updates the preferred line item for the given line item id + operationId: LineItemsApi_PutApi202110ExternalPreferredLineItemByLineItemId + parameters: + - description: The given line item id + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PreferredLineItemUpdateModel202110Request' + description: The line item settings to create a line item with + x-nullable: false + x-bodyName: lineItem + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PreferredLineItem202110Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/PreferredLineItem202110Response' description: Bad Request tags: - Campaign x-content-type: application/json x-accepts: application/json - /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete: - post: - description: This endpoint removes one or more store ids from targeting on the - specified line item. The resulting state of the store target is returned. - operationId: TargetingApi_PostApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId + /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket: + get: + description: This endpoint gets the add to basket target on the specified line + item. + operationId: TargetingApi_GetApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId + parameters: + - description: The line item to interact with + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AddToBasketTarget202110Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AddToBasketTarget202110Response' + description: Bad Request + tags: + - Campaign + x-accepts: application/json + put: + description: This endpoint sets the scope of the add to basket target on the + specified line item. + operationId: TargetingApi_PutApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId parameters: - description: The line item to interact with explode: false @@ -2937,39 +3219,1211 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StoreIdsUpdateModel202110Request' - description: Store ids to remove from the target + $ref: '#/components/schemas/AddToBasketTarget202110Request' + description: The add to basket target to set the scope for x-nullable: false - x-bodyName: idsToRemove + x-bodyName: addToBasketTarget responses: "200": content: application/json: schema: - $ref: '#/components/schemas/StoreTarget202110Response' + $ref: '#/components/schemas/AddToBasketTarget202110Response' description: Success "400": content: application/json: schema: - $ref: '#/components/schemas/StoreTarget202110Response' + $ref: '#/components/schemas/AddToBasketTarget202110Response' description: Bad Request tags: - Campaign x-content-type: application/json x-accepts: application/json -components: - schemas: - ApplicationSummaryModelResponse: - description: Response of ApplicationSummaryModel - example: - data: + /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append: + post: + description: This endpoint appends one or more add to basket ids to targeting + on the specified line item. The resulting state of the add to basket target + is returned. + operationId: TargetingApi_PostApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId + parameters: + - description: The line item to interact with + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddToBasketIdsUpdateModel202110Request' + description: Ids to append to the target + x-nullable: false + x-bodyName: idsToAppend + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AddToBasketTarget202110Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AddToBasketTarget202110Response' + description: Bad Request + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete: + post: + description: This endpoint removes one or more add to basket ids from targeting + on the specified line item. The resulting state of the add to basket target + is returned. + operationId: TargetingApi_PostApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId + parameters: + - description: The line item to interact with + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddToBasketIdsUpdateModel202110Request' + description: Ids to remove from the target + x-nullable: false + x-bodyName: idsToRemove + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AddToBasketTarget202110Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AddToBasketTarget202110Response' + description: Bad Request + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences: + get: + description: This endpoint gets the audience target on the specified line item. + operationId: TargetingApi_GetApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId + parameters: + - description: The line item to interact with + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AudienceTarget202110Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AudienceTarget202110Response' + description: Bad Request + tags: + - Campaign + x-accepts: application/json + put: + description: This endpoint sets the scope of the audience target on the specified + line item. + operationId: TargetingApi_PutApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId + parameters: + - description: The line item to interact with + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AudienceTarget202110Request' + description: The audience target to set the scope for + x-nullable: false + x-bodyName: audienceTarget + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AudienceTarget202110Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AudienceTarget202110Response' + description: Bad Request + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append: + post: + description: This endpoint appends one or more audiences ids to targeting on + the specified line item. The resulting state of the audience target is returned. + operationId: TargetingApi_PostApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId + parameters: + - description: The line item to interact with + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AudienceIdsUpdateModel202110Request' + description: Audience ids to append to the target + x-nullable: false + x-bodyName: idsToAppend + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AudienceTarget202110Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AudienceTarget202110Response' + description: Bad Request + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete: + post: + description: This endpoint removes one or more audiences ids from targeting + on the specified line item. The resulting state of the audience target is + returned. + operationId: TargetingApi_PostApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId + parameters: + - description: The line item to interact with + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AudienceIdsUpdateModel202110Request' + description: Audience ids to remove from the target + x-nullable: false + x-bodyName: idsToRemove + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AudienceTarget202110Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/AudienceTarget202110Response' + description: Bad Request + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores: + get: + description: This endpoint gets the store target on the specified line item. + operationId: TargetingApi_GetApi202110ExternalPreferredLineItemTargetingStoresByLineItemId + parameters: + - description: The line item to interact with + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StoreTarget202110Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/StoreTarget202110Response' + description: Bad Request + tags: + - Campaign + x-accepts: application/json + put: + description: This endpoint sets the scope of the store target on the specified + line item. + operationId: TargetingApi_PutApi202110ExternalPreferredLineItemTargetingStoresByLineItemId + parameters: + - description: The line item to interact with + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StoreTarget202110Request' + description: The store target to set the scope for + x-nullable: false + x-bodyName: storeTarget + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StoreTarget202110Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/StoreTarget202110Response' + description: Bad Request + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append: + post: + description: This endpoint appends one or more store ids to targeting on the + specified line item. The resulting state of the store target is returned. + operationId: TargetingApi_PostApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId + parameters: + - description: The line item to interact with + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StoreIdsUpdateModel202110Request' + description: Store ids to append to the target + x-nullable: false + x-bodyName: idsToAppend + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StoreTarget202110Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/StoreTarget202110Response' + description: Bad Request + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete: + post: + description: This endpoint removes one or more store ids from targeting on the + specified line item. The resulting state of the store target is returned. + operationId: TargetingApi_PostApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId + parameters: + - description: The line item to interact with + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StoreIdsUpdateModel202110Request' + description: Store ids to remove from the target + x-nullable: false + x-bodyName: idsToRemove + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StoreTarget202110Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/StoreTarget202110Response' + description: Bad Request + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json +components: + schemas: + ApplicationSummaryModelResponse: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + data: + attributes: + organizationId: 6 + name: name + description: description + criteoService: criteoService + applicationId: 0 + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/ApplicationSummaryModelResource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + ApplicationSummaryModelResource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + organizationId: 6 + name: name + description: description + criteoService: criteoService + applicationId: 0 + type: type + properties: + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/ApplicationSummaryModel' + type: object + CommonProblem: + description: Common problem object. + example: + traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + traceId: + description: The request correlation ID this problem comes from. + nullable: true + type: string + traceIdentifier: + description: "The request correlation ID this problem comes from. (deprecated,\ + \ use traceId instead)" + nullable: true + type: string + type: + description: The problem's category. + enum: + - unknown + - access-control + - authentication + - authorization + - availability + - deprecation + - quota + - validation + nullable: true + type: string + code: + description: "A machine-readable error code, expressed as a string value." + nullable: true + type: string + instance: + description: A URI that identifies the specific occurrence of the problem. + nullable: true + type: string + title: + description: A short human-readable description of the problem type + nullable: true + type: string + detail: + description: A human-readable explanation specific to this occurrence of + the problem + nullable: true + type: string + source: + additionalProperties: + type: string + description: A machine-readable structure to reference to the exact location(s) + causing the error(s) + nullable: true + type: object + stackTrace: + nullable: true + type: string + type: object + ApplicationSummaryModel: + description: Used for the /me endpoint. Contains information about the currently + authenticated application that we accept to give to our clients + example: + organizationId: 6 + name: name + description: description + criteoService: criteoService + applicationId: 0 + properties: + applicationId: + format: int32 + nullable: true + type: integer + name: + nullable: true + type: string + organizationId: + format: int32 + nullable: true + type: integer + description: + nullable: true + type: string + criteoService: + nullable: true + type: string + type: object + JsonApiPageResponseOfAccount: + description: A wrapper class to return a single page of with metadata + example: + metadata: + currentPageSize: 6 + previousPage: previousPage + nextPage: nextPage + totalPages: 5 + totalItemsAcrossAllPages: 0 + currentPageIndex: 1 + data: + - attributes: + subtype: unknown + parentAccountLabel: parentAccountLabel + companyName: companyName + name: name + timeZone: timeZone + currency: currency + countries: + - countries + - countries + type: unknown + id: id + type: type + - attributes: + subtype: unknown + parentAccountLabel: parentAccountLabel + companyName: companyName + name: name + timeZone: timeZone + currency: currency + countries: + - countries + - countries + type: unknown + id: id + type: type + warnings: + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + errors: + items: + $ref: '#/components/schemas/CommonError' + type: array + x-nullable: false + warnings: + items: + $ref: '#/components/schemas/CommonWarning' + type: array + x-nullable: false + metadata: + $ref: '#/components/schemas/PageMetadata' + data: + items: + $ref: '#/components/schemas/JsonApiBodyWithIdOfInt64AndAccountAndAccount' + type: array + x-nullable: false + required: + - data + - metadata + type: object + JsonApiPageResponseOfBrand: + description: A wrapper class to return a single page of with metadata + example: + metadata: + currentPageSize: 6 + previousPage: previousPage + nextPage: nextPage + totalPages: 5 + totalItemsAcrossAllPages: 0 + currentPageIndex: 1 + data: + - attributes: + name: name + id: id + type: type + - attributes: + name: name + id: id + type: type + warnings: + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + errors: + items: + $ref: '#/components/schemas/CommonError' + type: array + x-nullable: false + warnings: + items: + $ref: '#/components/schemas/CommonWarning' + type: array + x-nullable: false + metadata: + $ref: '#/components/schemas/PageMetadata' + data: + items: + $ref: '#/components/schemas/JsonApiBodyWithIdOfInt64AndBrandAndBrand' + type: array + x-nullable: false + required: + - data + - metadata + type: object + JsonApiPageResponseOfRetailer: + description: A wrapper class to return a single page of with metadata + example: + metadata: + currentPageSize: 6 + previousPage: previousPage + nextPage: nextPage + totalPages: 5 + totalItemsAcrossAllPages: 0 + currentPageIndex: 1 + data: + - attributes: + name: name + campaignEligibilities: + - unknown + - unknown + id: id + type: type + - attributes: + name: name + campaignEligibilities: + - unknown + - unknown + id: id + type: type + warnings: + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + errors: + items: + $ref: '#/components/schemas/CommonError' + type: array + x-nullable: false + warnings: + items: + $ref: '#/components/schemas/CommonWarning' + type: array + x-nullable: false + metadata: + $ref: '#/components/schemas/PageMetadata' + data: + items: + $ref: '#/components/schemas/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer' + type: array + x-nullable: false + required: + - data + - metadata + type: object + PageMetadata: + description: Metadata related to the current request + example: + currentPageSize: 6 + previousPage: previousPage + nextPage: nextPage + totalPages: 5 + totalItemsAcrossAllPages: 0 + currentPageIndex: 1 + properties: + totalItemsAcrossAllPages: + format: int64 + nullable: true + type: integer + x-nullable: true + currentPageSize: + format: int32 + type: integer + x-nullable: false + currentPageIndex: + format: int32 + type: integer + x-nullable: false + totalPages: + format: int64 + nullable: true + type: integer + x-nullable: true + nextPage: + type: string + x-nullable: false + previousPage: + type: string + x-nullable: false + required: + - currentPageIndex + - currentPageSize + type: object + CommonError: + description: A JSON:API Common error structure + example: + traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + traceId: + description: (REQUIRED) The Correlation ID provided by the Gateway. It is + also a unique identifier for this particular occurrence of the problem. + type: string + x-nullable: false + type: + description: (REQUIRED) The classification of the error. + enum: + - unknown + - access-control + - authentication + - authorization + - availability + - deprecation + - quota + - validation + type: string + x-nullable: false + code: + description: "(REQUIRED) A machine-readable unique error code, expressed\ + \ as a string value. The format used must be kabab-case." + type: string + x-nullable: false + instance: + description: (REQUIRED) A URI reference that identifies the specific occurrence + of the problem. + type: string + x-nullable: false + title: + description: "(RECOMMENDED) A short, human-readable summary of the problem\ + \ type." + type: string + x-nullable: false + detail: + description: (RECOMMENDED) A human-readable explanation specific to this + occurrence of the problem. + type: string + x-nullable: false + source: + additionalProperties: + type: string + x-nullable: false + description: (OPTIONAL) A machine-readable structure to reference to the + exact location(s) causing the error(s) + type: object + x-nullable: false + stackTrace: + description: (NEVER IN PRODUCTION) A human-readable stacktrace produced + by the implementation technology + type: string + x-nullable: false + type: object + CommonWarning: + description: A JSON:API Base common warning + example: + traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + traceId: + description: (REQUIRED) The Correlation ID provided by the Gateway. It is + also a unique identifier for this particular occurrence of the problem. + type: string + x-nullable: false + type: + description: (REQUIRED) The classification of the error. + enum: + - unknown + - access-control + - authentication + - authorization + - availability + - deprecation + - quota + - validation + type: string + x-nullable: false + code: + description: "(REQUIRED) A machine-readable unique error code, expressed\ + \ as a string value. The format used must be kabab-case." + type: string + x-nullable: false + instance: + description: (REQUIRED) A URI reference that identifies the specific occurrence + of the problem. + type: string + x-nullable: false + title: + description: "(RECOMMENDED) A short, human-readable summary of the problem\ + \ type." + type: string + x-nullable: false + detail: + description: (RECOMMENDED) A human-readable explanation specific to this + occurrence of the problem. + type: string + x-nullable: false + source: + additionalProperties: + type: string + x-nullable: false + description: (OPTIONAL) A machine-readable structure to reference to the + exact location(s) causing the error(s) + type: object + x-nullable: false + stackTrace: + description: (NEVER IN PRODUCTION) A human-readable stacktrace produced + by the implementation technology + type: string + x-nullable: false + type: object + JsonApiBodyWithIdOfInt64AndAccountAndAccount: + description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" + example: + attributes: + subtype: unknown + parentAccountLabel: parentAccountLabel + companyName: companyName + name: name + timeZone: timeZone + currency: currency + countries: + - countries + - countries + type: unknown + id: id + type: type + properties: + id: + format: long-id + type: string + x-nullable: false + type: + type: string + x-nullable: false + attributes: + $ref: '#/components/schemas/ExternalAccount' + required: + - id + - type + type: object + JsonApiBodyWithIdOfInt64AndBrandAndBrand: + description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" + example: + attributes: + name: name + id: id + type: type + properties: + id: + format: long-id + type: string + x-nullable: false + type: + type: string + x-nullable: false + attributes: + $ref: '#/components/schemas/ExternalBrand' + required: + - id + - type + type: object + JsonApiBodyWithIdOfInt64AndRetailerAndRetailer: + description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" + example: + attributes: + name: name + campaignEligibilities: + - unknown + - unknown + id: id + type: type + properties: + id: + format: long-id + type: string + x-nullable: false + type: + type: string + x-nullable: false + attributes: + $ref: '#/components/schemas/ExternalRetailer' + required: + - id + - type + type: object + ExternalAccount: + description: A Retail Media Account used to launch campaigns and line items + example: + subtype: unknown + parentAccountLabel: parentAccountLabel + companyName: companyName + name: name + timeZone: timeZone + currency: currency + countries: + - countries + - countries + type: unknown + properties: + name: + maxLength: 510 + minLength: 0 + type: string + x-nullable: false + type: + enum: + - unknown + - supply + - demand + type: string + x-nullable: false + subtype: + enum: + - unknown + - brand + - seller + nullable: true + type: string + x-nullable: true + countries: + items: + type: string + type: array + x-nullable: false + currency: + type: string + x-nullable: false + parentAccountLabel: + maxLength: 510 + minLength: 0 + type: string + x-nullable: false + timeZone: + type: string + x-nullable: false + companyName: + nullable: true + type: string + x-nullable: true + required: + - countries + - currency + - name + - parentAccountLabel + - timeZone + - type + type: object + ExternalBrand: + description: A Retail Media Brand used to represent a collection of products + sold under the same umbrella name + example: + name: name + properties: + name: + maxLength: 120 + minLength: 0 + type: string + x-nullable: false + required: + - name + type: object + ExternalRetailer: + description: A Retail Media Retailer used to represent a selection of products + from multiple brands + example: + name: name + campaignEligibilities: + - unknown + - unknown + properties: + name: + maxLength: 100 + type: string + x-nullable: false + campaignEligibilities: + items: + enum: + - unknown + - auction + - preferred + type: string + type: array + x-nullable: false + required: + - name + type: object + AssetResponse: + description: A class implementing the response of the Criteo API as described + in API Guild Guidelines with a single entity as body + example: + data: attributes: - organizationId: 6 - name: name - description: description - criteoService: criteoService - applicationId: 0 + fileExtension: fileExtension + fileLocation: fileLocation + id: id + id: id type: type warnings: - traceId: traceId @@ -3015,7 +4469,7 @@ components: title: title properties: data: - $ref: '#/components/schemas/ApplicationSummaryModelResource' + $ref: '#/components/schemas/AssetResource' warnings: items: $ref: '#/components/schemas/CommonProblem' @@ -3031,154 +4485,166 @@ components: type: array uniqueItems: false type: object - ApplicationSummaryModelResource: - description: A class that represents a ValueType in a guild compliant way + AssetResource: + description: A class that represents an entity in a guild compliant way example: attributes: - organizationId: 6 - name: name - description: description - criteoService: criteoService - applicationId: 0 + fileExtension: fileExtension + fileLocation: fileLocation + id: id + id: id type: type properties: - type: - nullable: true - type: string attributes: - $ref: '#/components/schemas/ApplicationSummaryModel' - type: object - CommonProblem: - description: Common problem object. Can be specialized as needed. - example: - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - traceId: - description: The request correlation ID this problem comes from. - nullable: true - type: string - traceIdentifier: - description: "The request correlation ID this problem comes from. (deprecated,\ - \ use traceId instead)" + $ref: '#/components/schemas/Asset' + id: nullable: true type: string type: - description: The problem's category. - enum: - - unknown - - access-control - - authentication - - authorization - - availability - - deprecation - - quota - - validation - nullable: true - type: string - code: - description: "A machine-readable error code, expressed as a string value." - nullable: true - type: string - instance: - description: A URI that identifies the specific occurrence of the problem. nullable: true type: string - title: - description: A short human-readable description of the problem type - nullable: true + type: object + Asset: + description: "Handles pointing towards binary content that advertisers can use\ + \ later on, for example in their creatives." + example: + fileExtension: fileExtension + fileLocation: fileLocation + id: id + properties: + fileExtension: + description: "The file extension that is asset is representing. Example:\ + \ jpg, png, gif or pdf." type: string - detail: - description: A human-readable explanation specific to this occurrence of - the problem + fileLocation: + description: A url pointing towards the static file the asset represents. nullable: true type: string - source: - additionalProperties: - type: string - description: A machine-readable structure to reference to the exact location(s) - causing the error(s) - nullable: true - type: object - stackTrace: + id: nullable: true type: string + required: + - fileExtension type: object - ApplicationSummaryModel: - description: Model of ApplicationSummary + RmLegacyAudienceGetEntityV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities and metadata example: - organizationId: 6 - name: name - description: description - criteoService: criteoService - applicationId: 0 + data: + - attributes: + customerListDetails: + size: size + isShared: true + name: name + retailerId: retailerId + userBehaviorDetails: + targetIds: + - targetIds + - targetIds + targetType: brand + userType: viewer + lookbackWindow: P7D + id: id + audienceType: customerList + type: type + - attributes: + customerListDetails: + size: size + isShared: true + name: name + retailerId: retailerId + userBehaviorDetails: + targetIds: + - targetIds + - targetIds + targetType: brand + userType: viewer + lookbackWindow: P7D + id: id + audienceType: customerList + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title properties: - applicationId: - format: int32 - nullable: true - type: integer - name: - nullable: true - type: string - organizationId: - format: int32 + data: + items: + $ref: '#/components/schemas/RmLegacyAudienceGetEntityV1Resource' nullable: true - type: integer - description: + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' nullable: true - type: string - criteoService: + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' nullable: true - type: string + readOnly: true + type: array type: object - JsonApiPageResponseOfAccount: - description: A wrapper class to return a single page of with metadata + RmLegacyAudienceCreateEntityV1Response: + description: A top-level object that encapsulates a Criteo API response for + a single entity example: - metadata: - currentPageSize: 6 - previousPage: previousPage - nextPage: nextPage - totalPages: 5 - totalItemsAcrossAllPages: 0 - currentPageIndex: 1 data: - - attributes: - subtype: unknown - parentAccountLabel: parentAccountLabel - companyName: companyName - name: name - timeZone: timeZone - currency: currency - countries: - - countries - - countries - type: unknown - id: id - type: type - - attributes: - subtype: unknown - parentAccountLabel: parentAccountLabel - companyName: companyName + attributes: + categoryIds: + - 6 + - 6 name: name - timeZone: timeZone - currency: currency - countries: - - countries - - countries - type: unknown + userType: viewer + retailerId: 1 + brandIds: + - 0 + - 0 + lookbackWindow: P7D id: id type: type warnings: - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -3188,6 +4654,7 @@ components: type: unknown title: title - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -3198,6 +4665,7 @@ components: title: title errors: - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -3207,6 +4675,7 @@ components: type: unknown title: title - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -3216,49 +4685,91 @@ components: type: unknown title: title properties: - errors: - items: - $ref: '#/components/schemas/CommonError' - type: array - x-nullable: false + data: + $ref: '#/components/schemas/RmLegacyAudienceCreateEntityV1Resource' warnings: items: - $ref: '#/components/schemas/CommonWarning' + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true type: array - x-nullable: false - metadata: - $ref: '#/components/schemas/PageMetadata' - data: + errors: items: - $ref: '#/components/schemas/JsonApiBodyWithIdOfInt64AndAccountAndAccount' + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true type: array - x-nullable: false - required: - - data type: object - x-nullable: false - JsonApiPageResponseOfBrand: - description: A wrapper class to return a single page of with metadata + RmLegacyAudienceGetEntityV2ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities example: - metadata: - currentPageSize: 6 - previousPage: previousPage - nextPage: nextPage - totalPages: 5 - totalItemsAcrossAllPages: 0 - currentPageIndex: 1 data: - attributes: + customerListDetails: + size: size + isShared: true name: name + retailerId: retailerId + userBehaviorDetails: + inclusiveSegment: + userAction: buy + categoryIds: + - 0 + - 0 + minPrice: 1.4658129805029452 + maxPrice: 5.962133916683182 + brandIds: + - 6 + - 6 + lookbackWindow: P7D + exclusiveSegment: + userAction: buy + categoryIds: + - 0 + - 0 + minPrice: 1.4658129805029452 + maxPrice: 5.962133916683182 + brandIds: + - 6 + - 6 + lookbackWindow: P7D id: id type: type - attributes: + customerListDetails: + size: size + isShared: true name: name + retailerId: retailerId + userBehaviorDetails: + inclusiveSegment: + userAction: buy + categoryIds: + - 0 + - 0 + minPrice: 1.4658129805029452 + maxPrice: 5.962133916683182 + brandIds: + - 6 + - 6 + lookbackWindow: P7D + exclusiveSegment: + userAction: buy + categoryIds: + - 0 + - 0 + minPrice: 1.4658129805029452 + maxPrice: 5.962133916683182 + brandIds: + - 6 + - 6 + lookbackWindow: P7D id: id type: type warnings: - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -3268,6 +4779,7 @@ components: type: unknown title: title - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -3278,6 +4790,7 @@ components: title: title errors: - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -3287,6 +4800,7 @@ components: type: unknown title: title - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -3296,55 +4810,56 @@ components: type: unknown title: title properties: - errors: + data: items: - $ref: '#/components/schemas/CommonError' + $ref: '#/components/schemas/RmLegacyAudienceGetEntityV2Resource' + nullable: true type: array - x-nullable: false warnings: items: - $ref: '#/components/schemas/CommonWarning' + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true type: array - x-nullable: false - metadata: - $ref: '#/components/schemas/PageMetadata' - data: + errors: items: - $ref: '#/components/schemas/JsonApiBodyWithIdOfInt64AndBrandAndBrand' + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true type: array - x-nullable: false - required: - - data type: object - x-nullable: false - JsonApiPageResponseOfRetailer: - description: A wrapper class to return a single page of with metadata + RmLegacyAudienceCreateEntityV2Response: + description: A top-level object that encapsulates a Criteo API response for + a single entity example: - metadata: - currentPageSize: 6 - previousPage: previousPage - nextPage: nextPage - totalPages: 5 - totalItemsAcrossAllPages: 0 - currentPageIndex: 1 data: - - attributes: - name: name - campaignEligibilities: - - unknown - - unknown - id: id - type: type - - attributes: + attributes: name: name - campaignEligibilities: - - unknown - - unknown + retailerId: 0 + userBehaviorDetails: + inclusiveSegment: + userAction: buy + categoryIds: + - 6 + - 6 + brandIds: + - 1 + - 1 + lookbackWindow: P7D + exclusiveSegment: + userAction: buy + categoryIds: + - 6 + - 6 + brandIds: + - 1 + - 1 + lookbackWindow: P7D id: id type: type warnings: - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -3354,6 +4869,7 @@ components: type: unknown title: title - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -3364,6 +4880,7 @@ components: title: title errors: - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -3373,6 +4890,7 @@ components: type: unknown title: title - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -3382,615 +4900,685 @@ components: type: unknown title: title properties: - errors: - items: - $ref: '#/components/schemas/CommonError' - type: array - x-nullable: false - warnings: - items: - $ref: '#/components/schemas/CommonWarning' - type: array - x-nullable: false - metadata: - $ref: '#/components/schemas/PageMetadata' data: - items: - $ref: '#/components/schemas/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer' - type: array - x-nullable: false - required: - - data + $ref: '#/components/schemas/RmLegacyAudienceCreateEntityV2Resource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + RmLegacyAudienceCreateInputEntityV1: + description: Input to create audience. + example: + data: + attributes: + categoryIds: + - 6 + - 6 + name: name + userType: viewer + retailerId: 1 + brandIds: + - 0 + - 0 + lookbackWindow: P7D + id: id + type: type + properties: + data: + $ref: '#/components/schemas/RmLegacyAudienceCreateEntityV1Resource' type: object - x-nullable: false - PageMetadata: - description: Metadata related to the current request + RmLegacyAudienceCreateInputEntityV2: + description: Input to create audience. example: - currentPageSize: 6 - previousPage: previousPage - nextPage: nextPage - totalPages: 5 - totalItemsAcrossAllPages: 0 - currentPageIndex: 1 + data: + attributes: + name: name + retailerId: 0 + userBehaviorDetails: + inclusiveSegment: + userAction: buy + categoryIds: + - 6 + - 6 + brandIds: + - 1 + - 1 + lookbackWindow: P7D + exclusiveSegment: + userAction: buy + categoryIds: + - 6 + - 6 + brandIds: + - 1 + - 1 + lookbackWindow: P7D + id: id + type: type properties: - totalItemsAcrossAllPages: - format: int64 - nullable: true - type: integer - x-nullable: true - currentPageSize: - format: int32 - type: integer - x-nullable: false - currentPageIndex: - format: int32 - type: integer - x-nullable: false - totalPages: - format: int64 - nullable: true - type: integer - x-nullable: true - nextPage: - type: string - x-nullable: false - previousPage: - type: string - x-nullable: false - required: - - currentPageIndex - - currentPageSize + data: + $ref: '#/components/schemas/RmLegacyAudienceCreateEntityV2Resource' type: object - x-nullable: false - CommonError: - description: A JSON:API Common error structure + RmLegacyAudienceGetEntityV1Resource: + description: A class that represents a domain entity exposed by an API example: - traceId: traceId - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title + attributes: + customerListDetails: + size: size + isShared: true + name: name + retailerId: retailerId + userBehaviorDetails: + targetIds: + - targetIds + - targetIds + targetType: brand + userType: viewer + lookbackWindow: P7D + id: id + audienceType: customerList + type: type properties: - traceId: - description: (REQUIRED) The Correlation ID provided by the Gateway. It is - also a unique identifier for this particular occurrence of the problem. + attributes: + $ref: '#/components/schemas/RmLegacyAudienceGetEntityV1' + id: + nullable: true type: string - x-nullable: false - type: - description: (REQUIRED) The classification of the error. + audienceType: enum: - - unknown - - access-control - - authentication - - authorization - - availability - - deprecation - - quota - - validation - type: string - x-nullable: false - code: - description: "(REQUIRED) A machine-readable unique error code, expressed\ - \ as a string value. The format used must be kabab-case." - type: string - x-nullable: false - instance: - description: (REQUIRED) A URI reference that identifies the specific occurrence - of the problem. - type: string - x-nullable: false - title: - description: "(RECOMMENDED) A short, human-readable summary of the problem\ - \ type." - type: string - x-nullable: false - detail: - description: (RECOMMENDED) A human-readable explanation specific to this - occurrence of the problem. + - customerList + - userBehavior + nullable: true type: string - x-nullable: false - source: - additionalProperties: - type: string - x-nullable: false - description: (OPTIONAL) A machine-readable structure to reference to the - exact location(s) causing the error(s) - type: object - x-nullable: false - stackTrace: - description: (NEVER IN PRODUCTION) A human-readable stacktrace produced - by the implementation technology + type: + nullable: true type: string - x-nullable: false type: object - x-nullable: false - CommonWarning: - description: A JSON:API Base common warning + RmLegacyAudienceCreateEntityV1Resource: + description: A class that represents a domain entity exposed by an API example: - traceId: traceId - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title + attributes: + categoryIds: + - 6 + - 6 + name: name + userType: viewer + retailerId: 1 + brandIds: + - 0 + - 0 + lookbackWindow: P7D + id: id + type: type properties: - traceId: - description: (REQUIRED) The Correlation ID provided by the Gateway. It is - also a unique identifier for this particular occurrence of the problem. + attributes: + $ref: '#/components/schemas/RmLegacyAudienceCreateEntityV1' + id: + description: Id of the entity + nullable: true type: string - x-nullable: false type: - description: (REQUIRED) The classification of the error. - enum: - - unknown - - access-control - - authentication - - authorization - - availability - - deprecation - - quota - - validation - type: string - x-nullable: false - code: - description: "(REQUIRED) A machine-readable unique error code, expressed\ - \ as a string value. The format used must be kabab-case." - type: string - x-nullable: false - instance: - description: (REQUIRED) A URI reference that identifies the specific occurrence - of the problem. - type: string - x-nullable: false - title: - description: "(RECOMMENDED) A short, human-readable summary of the problem\ - \ type." - type: string - x-nullable: false - detail: - description: (RECOMMENDED) A human-readable explanation specific to this - occurrence of the problem. - type: string - x-nullable: false - source: - additionalProperties: - type: string - x-nullable: false - description: (OPTIONAL) A machine-readable structure to reference to the - exact location(s) causing the error(s) - type: object - x-nullable: false - stackTrace: - description: (NEVER IN PRODUCTION) A human-readable stacktrace produced - by the implementation technology + nullable: true type: string - x-nullable: false type: object - x-nullable: false - JsonApiBodyWithIdOfInt64AndAccountAndAccount: - description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" + RmLegacyAudienceGetEntityV2Resource: + description: A class that represents a domain entity exposed by an API example: attributes: - subtype: unknown - parentAccountLabel: parentAccountLabel - companyName: companyName + customerListDetails: + size: size + isShared: true name: name - timeZone: timeZone - currency: currency - countries: - - countries - - countries - type: unknown + retailerId: retailerId + userBehaviorDetails: + inclusiveSegment: + userAction: buy + categoryIds: + - 0 + - 0 + minPrice: 1.4658129805029452 + maxPrice: 5.962133916683182 + brandIds: + - 6 + - 6 + lookbackWindow: P7D + exclusiveSegment: + userAction: buy + categoryIds: + - 0 + - 0 + minPrice: 1.4658129805029452 + maxPrice: 5.962133916683182 + brandIds: + - 6 + - 6 + lookbackWindow: P7D id: id type: type properties: + attributes: + $ref: '#/components/schemas/RmLegacyAudienceGetEntityV2' id: - format: long-id + description: Id of the entity + nullable: true type: string - x-nullable: false type: + nullable: true type: string - x-nullable: false - attributes: - $ref: '#/components/schemas/ExternalAccount' - required: - - id - - type type: object - x-nullable: false - JsonApiBodyWithIdOfInt64AndBrandAndBrand: - description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" + RmLegacyAudienceCreateEntityV2Resource: + description: A class that represents a domain entity exposed by an API example: attributes: name: name + retailerId: 0 + userBehaviorDetails: + inclusiveSegment: + userAction: buy + categoryIds: + - 6 + - 6 + brandIds: + - 1 + - 1 + lookbackWindow: P7D + exclusiveSegment: + userAction: buy + categoryIds: + - 6 + - 6 + brandIds: + - 1 + - 1 + lookbackWindow: P7D id: id type: type properties: + attributes: + $ref: '#/components/schemas/RmLegacyAudienceCreateEntityV2' id: - format: long-id + description: Id of the entity + nullable: true type: string - x-nullable: false type: + nullable: true type: string - x-nullable: false - attributes: - $ref: '#/components/schemas/ExternalBrand' + type: object + RmLegacyAudienceGetEntityV1: + description: Audience definition of people of interest for a marketer. + example: + customerListDetails: + size: size + isShared: true + name: name + retailerId: retailerId + userBehaviorDetails: + targetIds: + - targetIds + - targetIds + targetType: brand + userType: viewer + lookbackWindow: P7D + properties: + name: + description: Name of the audience + type: string + retailerId: + description: ID of the retailer associated with this audience + type: string + userBehaviorDetails: + $ref: '#/components/schemas/RmLegacySegmentUserBehaviorV1' + customerListDetails: + $ref: '#/components/schemas/RmLegacySegmentCustomerList' required: - - id - - type + - name + - retailerId type: object - x-nullable: false - JsonApiBodyWithIdOfInt64AndRetailerAndRetailer: - description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" + x-criteo-canonical: + infoType: entity + name: RetailMediaAudienceSummary + version: v1 + RmLegacyAudienceCreateEntityV1: + description: Audience definition example: - attributes: - name: name - campaignEligibilities: - - unknown - - unknown - id: id - type: type + categoryIds: + - 6 + - 6 + name: name + userType: viewer + retailerId: 1 + brandIds: + - 0 + - 0 + lookbackWindow: P7D + properties: + userType: + description: Type of the user + enum: + - viewer + - buyer + - addToCarter + type: string + lookbackWindow: + description: Length of lookback window + enum: + - P7D + - P14D + - P30D + - P45D + - P60D + - P90D + - P120D + - P150D + - P180D + type: string + brandIds: + description: The brands to target + items: + format: int64 + type: integer + nullable: true + type: array + uniqueItems: true + categoryIds: + description: The categories to target + items: + format: int32 + type: integer + nullable: true + type: array + uniqueItems: true + retailerId: + description: ID of the retailer associated with this audience + format: int64 + type: integer + name: + description: Name of the audience + type: string + required: + - lookbackWindow + - name + - retailerId + - userType + type: object + x-criteo-canonical: + infoType: entity + name: RetailMediaAudience + version: v1 + RmLegacyAudienceGetEntityV2: + description: Audience definition of people of interest for a marketer + example: + customerListDetails: + size: size + isShared: true + name: name + retailerId: retailerId + userBehaviorDetails: + inclusiveSegment: + userAction: buy + categoryIds: + - 0 + - 0 + minPrice: 1.4658129805029452 + maxPrice: 5.962133916683182 + brandIds: + - 6 + - 6 + lookbackWindow: P7D + exclusiveSegment: + userAction: buy + categoryIds: + - 0 + - 0 + minPrice: 1.4658129805029452 + maxPrice: 5.962133916683182 + brandIds: + - 6 + - 6 + lookbackWindow: P7D + properties: + retailerId: + description: ID of the retailer associated with this audience + type: string + userBehaviorDetails: + $ref: '#/components/schemas/RmLegacyAudienceUserBehaviorDetailsV2' + customerListDetails: + $ref: '#/components/schemas/RmLegacySegmentCustomerList' + name: + description: Name of the audience + type: string + required: + - name + - retailerId + type: object + x-criteo-canonical: + infoType: entity + name: RetailMediaAudience + version: v1 + RmLegacyAudienceCreateEntityV2: + description: Audience definition + example: + name: name + retailerId: 0 + userBehaviorDetails: + inclusiveSegment: + userAction: buy + categoryIds: + - 6 + - 6 + brandIds: + - 1 + - 1 + lookbackWindow: P7D + exclusiveSegment: + userAction: buy + categoryIds: + - 6 + - 6 + brandIds: + - 1 + - 1 + lookbackWindow: P7D properties: - id: - format: long-id - type: string - x-nullable: false - type: + retailerId: + description: ID of the retailer associated with this audience + format: int64 + type: integer + userBehaviorDetails: + $ref: '#/components/schemas/RmLegacyAudienceUserBehaviorCreateV2' + name: + description: Name of the audience type: string - x-nullable: false - attributes: - $ref: '#/components/schemas/ExternalRetailer' required: - - id - - type + - name + - retailerId + - userBehaviorDetails type: object - x-nullable: false - ExternalAccount: - description: A Retail Media Account used to launch campaigns and line items + x-criteo-canonical: + infoType: entity + name: RetailMediaAudience + version: v1 + RmLegacySegmentUserBehaviorV1: + description: Audience definition of people based on what they visited example: - subtype: unknown - parentAccountLabel: parentAccountLabel - companyName: companyName - name: name - timeZone: timeZone - currency: currency - countries: - - countries - - countries - type: unknown + targetIds: + - targetIds + - targetIds + targetType: brand + userType: viewer + lookbackWindow: P7D properties: - name: - maxLength: 510 - minLength: 0 + userType: + description: Type of shopper activity used to generate the audience. + enum: + - viewer + - buyer + - addToCarter type: string - x-nullable: false - type: + lookbackWindow: + description: Length of lookback window enum: - - unknown - - supply - - demand + - P7D + - P14D + - P30D + - P45D + - P60D + - P90D + - P120D + - P150D + - P180D type: string - x-nullable: false - subtype: + targetType: + description: Type of target enum: - - unknown - brand - - seller + - category nullable: true type: string - x-nullable: true - countries: + targetIds: + description: The categories to target items: type: string - x-nullable: false - type: array - x-nullable: false - currency: - type: string - x-nullable: false - parentAccountLabel: - maxLength: 510 - minLength: 0 - type: string - x-nullable: false - timeZone: - type: string - x-nullable: false - companyName: nullable: true - type: string + type: array + uniqueItems: true required: - - countries - - currency - - name - - parentAccountLabel - - timeZone - - type + - lookbackWindow + - userType type: object - x-nullable: false - ExternalBrand: - description: A Retail Media Brand used to represent a collection of products - sold under the same umbrella name + RmLegacySegmentCustomerList: + description: Audience definition of people based on a customer list example: - name: name + size: size + isShared: true properties: - name: - maxLength: 120 - minLength: 0 + size: + description: Number of users in the customer list audience. type: string - x-nullable: false + isShared: + description: Indicate if the audience is shared. + type: boolean required: - - name + - isShared + - size type: object - x-nullable: false - ExternalRetailer: - description: A Retail Media Retailer used to represent a selection of products - from multiple brands + RmLegacyAudienceUserBehaviorDetailsV2: + description: User Behavior Details. example: - name: name - campaignEligibilities: - - unknown - - unknown + inclusiveSegment: + userAction: buy + categoryIds: + - 0 + - 0 + minPrice: 1.4658129805029452 + maxPrice: 5.962133916683182 + brandIds: + - 6 + - 6 + lookbackWindow: P7D + exclusiveSegment: + userAction: buy + categoryIds: + - 0 + - 0 + minPrice: 1.4658129805029452 + maxPrice: 5.962133916683182 + brandIds: + - 6 + - 6 + lookbackWindow: P7D properties: - name: - maxLength: 100 - type: string - x-nullable: false - campaignEligibilities: - items: - enum: - - unknown - - auction - - preferred - type: string - x-nullable: false - type: array - x-nullable: false + inclusiveSegment: + $ref: '#/components/schemas/RmLegacySegmentUserBehaviorV2' + exclusiveSegment: + $ref: '#/components/schemas/RmLegacySegmentUserBehaviorV2' required: - - name + - inclusiveSegment type: object - x-nullable: false - AssetResponse: - description: A class implementing the response of the Criteo API as described - in API Guild Guidelines with a single entity as body - example: - data: - attributes: - fileExtension: fileExtension - fileLocation: fileLocation - id: id - id: id - type: type - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title + RmLegacyAudienceUserBehaviorCreateV2: + description: User Behavior to include and optionally exclude. + example: + inclusiveSegment: + userAction: buy + categoryIds: + - 6 + - 6 + brandIds: + - 1 + - 1 + lookbackWindow: P7D + exclusiveSegment: + userAction: buy + categoryIds: + - 6 + - 6 + brandIds: + - 1 + - 1 + lookbackWindow: P7D properties: - data: - $ref: '#/components/schemas/AssetResource' - warnings: + inclusiveSegment: + $ref: '#/components/schemas/RmLegacySegmentUserBehaviorCreateV2' + exclusiveSegment: + $ref: '#/components/schemas/RmLegacySegmentUserBehaviorCreateV2' + required: + - inclusiveSegment + type: object + RmLegacySegmentUserBehaviorV2: + description: Audience definition of people based on what they visited + example: + userAction: buy + categoryIds: + - 0 + - 0 + minPrice: 1.4658129805029452 + maxPrice: 5.962133916683182 + brandIds: + - 6 + - 6 + lookbackWindow: P7D + properties: + userAction: + description: Type of shopper activity used to generate the audience. + enum: + - buy + - view + - addToCart + type: string + lookbackWindow: + description: Length of lookback window + enum: + - P7D + - P14D + - P30D + - P45D + - P60D + - P90D + - P120D + - P150D + - P180D + type: string + categoryIds: + description: The categories to target items: - $ref: '#/components/schemas/CommonProblem' + format: int32 + type: integer nullable: true - readOnly: true type: array - uniqueItems: false - errors: + uniqueItems: true + brandIds: + description: The brands to target items: - $ref: '#/components/schemas/CommonProblem' + format: int64 + type: integer nullable: true - readOnly: true type: array - uniqueItems: false - type: object - AssetResource: - description: A class that represents an entity in a guild compliant way - example: - attributes: - fileExtension: fileExtension - fileLocation: fileLocation - id: id - id: id - type: type - properties: - attributes: - $ref: '#/components/schemas/Asset' - id: + uniqueItems: true + minPrice: + description: The min price of targeted skus. + format: double nullable: true - type: string - type: + type: number + maxPrice: + description: The max price of targeted skus. + format: double nullable: true - type: string + type: number + required: + - lookbackWindow + - userAction type: object - Asset: - description: "Handles pointing towards binary content that advertisers can use\ - \ later on, for example in their creatives." + RmLegacySegmentUserBehaviorCreateV2: + description: User Behavior Details. example: - fileExtension: fileExtension - fileLocation: fileLocation - id: id + userAction: buy + categoryIds: + - 6 + - 6 + brandIds: + - 1 + - 1 + lookbackWindow: P7D properties: - fileExtension: - description: "The file extension that is asset is representing. Example:\ - \ jpg, png, gif or pdf." - type: string - fileLocation: - description: A url pointing towards the static file the asset represents. - nullable: true + userAction: + description: Type of shopper activity used to generate the audience. + enum: + - buy + - view + - addToCart type: string - id: - nullable: true + lookbackWindow: + description: Length of lookback window + enum: + - P7D + - P14D + - P30D + - P45D + - P60D + - P90D + - P120D + - P150D + - P180D type: string - required: - - fileExtension - type: object - RmLegacyAudienceGetEntityV1ListResponse: - description: A top-level object that encapsulates a Criteo API response for - several entities and metadata - example: - data: - - attributes: - customerListDetails: - size: size - isShared: true - name: name - retailerId: retailerId - userBehaviorDetails: - targetIds: - - targetIds - - targetIds - targetType: brand - userType: viewer - lookbackWindow: P7D - id: id - audienceType: customerList - type: type - - attributes: - customerListDetails: - size: size - isShared: true - name: name - retailerId: retailerId - userBehaviorDetails: - targetIds: - - targetIds - - targetIds - targetType: brand - userType: viewer - lookbackWindow: P7D - id: id - audienceType: customerList - type: type - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - data: - items: - $ref: '#/components/schemas/RmLegacyAudienceGetEntityV1Resource' - nullable: true - type: array - warnings: + categoryIds: + description: The categories to target items: - $ref: '#/components/schemas/CommonProblem' + format: int32 + type: integer nullable: true - readOnly: true type: array - errors: + uniqueItems: true + brandIds: + description: The brands to target items: - $ref: '#/components/schemas/CommonProblem' + format: int64 + type: integer nullable: true - readOnly: true type: array + uniqueItems: true + required: + - lookbackWindow + - userAction type: object - RmLegacyAudienceCreateEntityV1Response: - description: A top-level object that encapsulates a Criteo API response for - a single entity + KeywordsModelResponse: + additionalProperties: false + description: Response object containing keywords associated with a line item. example: data: attributes: - categoryIds: - - 6 - - 6 - name: name - userType: viewer - retailerId: 1 - brandIds: - - 0 - - 0 - lookbackWindow: P7D + keywords: + key: + createdAt: 2000-01-23T04:56:07.000+00:00 + matchType: null + inputKeywords: + negativeBroad: + - negativeBroad + - negativeBroad + positiveExact: + - positiveExact + - positiveExact + negativeExact: + - negativeExact + - negativeExact + reviewState: null + bid: 6.027456183070403 + updatedAt: 2000-01-23T04:56:07.000+00:00 + rank: + - rank + - rank id: id type: type warnings: - traceId: traceId - traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -3999,8 +5587,8 @@ components: stackTrace: stackTrace type: unknown title: title + status: 0 - traceId: traceId - traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4009,9 +5597,9 @@ components: stackTrace: stackTrace type: unknown title: title + status: 0 errors: - traceId: traceId - traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4020,8 +5608,8 @@ components: stackTrace: stackTrace type: unknown title: title + status: 0 - traceId: traceId - traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4030,92 +5618,29 @@ components: stackTrace: stackTrace type: unknown title: title + status: 0 properties: - data: - $ref: '#/components/schemas/RmLegacyAudienceCreateEntityV1Resource' - warnings: + errors: items: - $ref: '#/components/schemas/CommonProblem' + $ref: '#/components/schemas/RmcaCommonProblem' nullable: true readOnly: true type: array - errors: + warnings: items: - $ref: '#/components/schemas/CommonProblem' + $ref: '#/components/schemas/RmcaCommonProblem' nullable: true readOnly: true type: array + data: + $ref: '#/components/schemas/KeywordsModelResource' type: object - RmLegacyAudienceGetEntityV2ListResponse: - description: A top-level object that encapsulates a Criteo API response for - several entities + ResourceOutcome: + additionalProperties: false + description: Outcome object containing errors and warnings. example: - data: - - attributes: - customerListDetails: - size: size - isShared: true - name: name - retailerId: retailerId - userBehaviorDetails: - inclusiveSegment: - userAction: buy - categoryIds: - - 0 - - 0 - minPrice: 1.4658129805029452 - maxPrice: 5.962133916683182 - brandIds: - - 6 - - 6 - lookbackWindow: P7D - exclusiveSegment: - userAction: buy - categoryIds: - - 0 - - 0 - minPrice: 1.4658129805029452 - maxPrice: 5.962133916683182 - brandIds: - - 6 - - 6 - lookbackWindow: P7D - id: id - type: type - - attributes: - customerListDetails: - size: size - isShared: true - name: name - retailerId: retailerId - userBehaviorDetails: - inclusiveSegment: - userAction: buy - categoryIds: - - 0 - - 0 - minPrice: 1.4658129805029452 - maxPrice: 5.962133916683182 - brandIds: - - 6 - - 6 - lookbackWindow: P7D - exclusiveSegment: - userAction: buy - categoryIds: - - 0 - - 0 - minPrice: 1.4658129805029452 - maxPrice: 5.962133916683182 - brandIds: - - 6 - - 6 - lookbackWindow: P7D - id: id - type: type warnings: - traceId: traceId - traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4124,8 +5649,8 @@ components: stackTrace: stackTrace type: unknown title: title + status: 0 - traceId: traceId - traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4134,9 +5659,9 @@ components: stackTrace: stackTrace type: unknown title: title + status: 0 errors: - traceId: traceId - traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4145,8 +5670,8 @@ components: stackTrace: stackTrace type: unknown title: title + status: 0 - traceId: traceId - traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4155,57 +5680,38 @@ components: stackTrace: stackTrace type: unknown title: title + status: 0 properties: - data: - items: - $ref: '#/components/schemas/RmLegacyAudienceGetEntityV2Resource' - nullable: true - type: array - warnings: + errors: items: - $ref: '#/components/schemas/CommonProblem' + $ref: '#/components/schemas/RmcaCommonProblem' nullable: true readOnly: true type: array - errors: + warnings: items: - $ref: '#/components/schemas/CommonProblem' + $ref: '#/components/schemas/RmcaCommonProblem' nullable: true readOnly: true type: array type: object - RmLegacyAudienceCreateEntityV2Response: - description: A top-level object that encapsulates a Criteo API response for - a single entity + ProposalStatusModelResponse: + additionalProperties: false + description: Response object containing the state of a proposal in the context + of a line item. example: data: attributes: - name: name - retailerId: 0 - userBehaviorDetails: - inclusiveSegment: - userAction: buy - categoryIds: - - 6 - - 6 - brandIds: - - 1 - - 1 - lookbackWindow: P7D - exclusiveSegment: - userAction: buy - categoryIds: - - 6 - - 6 - brandIds: - - 1 - - 1 - lookbackWindow: P7D + createdAt: 2000-01-23T04:56:07.000+00:00 + runnableStatus: null + negotiationState: null + bookingStatus: null + comment: comment + updatedAt: 2000-01-23T04:56:07.000+00:00 id: id type: type warnings: - traceId: traceId - traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4214,8 +5720,8 @@ components: stackTrace: stackTrace type: unknown title: title + status: 0 - traceId: traceId - traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4224,9 +5730,9 @@ components: stackTrace: stackTrace type: unknown title: title + status: 0 errors: - traceId: traceId - traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4235,8 +5741,8 @@ components: stackTrace: stackTrace type: unknown title: title + status: 0 - traceId: traceId - traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4245,686 +5751,943 @@ components: stackTrace: stackTrace type: unknown title: title + status: 0 properties: - data: - $ref: '#/components/schemas/RmLegacyAudienceCreateEntityV2Resource' - warnings: + errors: items: - $ref: '#/components/schemas/CommonProblem' + $ref: '#/components/schemas/RmcaCommonProblem' nullable: true readOnly: true type: array - errors: + warnings: items: - $ref: '#/components/schemas/CommonProblem' + $ref: '#/components/schemas/RmcaCommonProblem' nullable: true readOnly: true type: array + data: + $ref: '#/components/schemas/ProposalStatusModelResource' type: object - RmLegacyAudienceCreateInputEntityV1: - description: Input to create audience. + AddRemoveKeywordsModelRequest: + additionalProperties: false + description: Request object to add or remove keywords from a line item example: data: attributes: - categoryIds: - - 6 - - 6 - name: name - userType: viewer - retailerId: 1 - brandIds: - - 0 - - 0 - lookbackWindow: P7D + keywords: + - phrase: phrase + isDeleted: true + matchType: null + - phrase: phrase + isDeleted: true + matchType: null id: id type: type properties: data: - $ref: '#/components/schemas/RmLegacyAudienceCreateEntityV1Resource' + $ref: '#/components/schemas/AddRemoveKeywordsModelResource' type: object - RmLegacyAudienceCreateInputEntityV2: - description: Input to create audience. + SetBidsModelRequest: + additionalProperties: false + description: Request object to set bid overrides for keywords associated with + a line item example: data: - attributes: - name: name - retailerId: 0 - userBehaviorDetails: - inclusiveSegment: - userAction: buy - categoryIds: - - 6 - - 6 - brandIds: - - 1 - - 1 - lookbackWindow: P7D - exclusiveSegment: - userAction: buy - categoryIds: - - 6 - - 6 - brandIds: - - 1 - - 1 - lookbackWindow: P7D + attributes: + keywords: + - phrase: phrase + bid: 0.8008281904610115 + - phrase: phrase + bid: 0.8008281904610115 id: id type: type properties: data: - $ref: '#/components/schemas/RmLegacyAudienceCreateEntityV2Resource' + $ref: '#/components/schemas/SetBidsModelResource' type: object - RmLegacyAudienceGetEntityV1Resource: - description: A class that represents a domain entity exposed by an API + KeywordsModelResource: + additionalProperties: false + description: Resource object containing keywords associated with a line item. example: attributes: - customerListDetails: - size: size - isShared: true - name: name - retailerId: retailerId - userBehaviorDetails: - targetIds: - - targetIds - - targetIds - targetType: brand - userType: viewer - lookbackWindow: P7D + keywords: + key: + createdAt: 2000-01-23T04:56:07.000+00:00 + matchType: null + inputKeywords: + negativeBroad: + - negativeBroad + - negativeBroad + positiveExact: + - positiveExact + - positiveExact + negativeExact: + - negativeExact + - negativeExact + reviewState: null + bid: 6.027456183070403 + updatedAt: 2000-01-23T04:56:07.000+00:00 + rank: + - rank + - rank id: id - audienceType: customerList type: type properties: - attributes: - $ref: '#/components/schemas/RmLegacyAudienceGetEntityV1' id: nullable: true type: string - audienceType: - enum: - - customerList - - userBehavior + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/KeywordsModel' + type: object + RmcaCommonProblem: + additionalProperties: {} + description: Common problem object. + example: + traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + status: 0 + properties: + traceId: + description: The request correlation ID this problem comes from. nullable: true type: string type: + description: The problem's category. + enum: + - unknown + - access-control + - authentication + - authorization + - availability + - deprecation + - quota + - validation + nullable: true + type: string + code: + description: "A machine-readable error code, expressed as a string value." + nullable: true + type: string + instance: + description: A URI that identifies the specific occurrence of the problem. + nullable: true + type: string + title: + description: A short human-readable description of the problem type + nullable: true + type: string + detail: + description: A human-readable explanation specific to this occurrence of + the problem + nullable: true + type: string + source: + additionalProperties: + type: string + description: A machine-readable structure to reference to the exact location(s) + causing the error(s) + nullable: true + type: object + stackTrace: nullable: true type: string + status: + description: The problem's HTTP Status code. + format: int32 + nullable: true + type: integer type: object - RmLegacyAudienceCreateEntityV1Resource: - description: A class that represents a domain entity exposed by an API + ProposalStatusModelResource: + additionalProperties: false + description: Resource object containing the state of a proposal in the context + of a line item. example: attributes: - categoryIds: - - 6 - - 6 - name: name - userType: viewer - retailerId: 1 - brandIds: - - 0 - - 0 - lookbackWindow: P7D + createdAt: 2000-01-23T04:56:07.000+00:00 + runnableStatus: null + negotiationState: null + bookingStatus: null + comment: comment + updatedAt: 2000-01-23T04:56:07.000+00:00 id: id type: type properties: - attributes: - $ref: '#/components/schemas/RmLegacyAudienceCreateEntityV1' id: - description: Id of the entity nullable: true type: string type: nullable: true type: string + attributes: + $ref: '#/components/schemas/ProposalStatusModel' type: object - RmLegacyAudienceGetEntityV2Resource: - description: A class that represents a domain entity exposed by an API + AddRemoveKeywordsModelResource: + additionalProperties: false + description: Resource object containing keywords to be added or removed from + a line item example: attributes: - customerListDetails: - size: size - isShared: true - name: name - retailerId: retailerId - userBehaviorDetails: - inclusiveSegment: - userAction: buy - categoryIds: - - 0 - - 0 - minPrice: 1.4658129805029452 - maxPrice: 5.962133916683182 - brandIds: - - 6 - - 6 - lookbackWindow: P7D - exclusiveSegment: - userAction: buy - categoryIds: - - 0 - - 0 - minPrice: 1.4658129805029452 - maxPrice: 5.962133916683182 - brandIds: - - 6 - - 6 - lookbackWindow: P7D + keywords: + - phrase: phrase + isDeleted: true + matchType: null + - phrase: phrase + isDeleted: true + matchType: null id: id type: type properties: - attributes: - $ref: '#/components/schemas/RmLegacyAudienceGetEntityV2' id: - description: Id of the entity nullable: true type: string type: nullable: true type: string + attributes: + $ref: '#/components/schemas/AddRemoveKeywordsModel' type: object - RmLegacyAudienceCreateEntityV2Resource: - description: A class that represents a domain entity exposed by an API + SetBidsModelResource: + additionalProperties: false + description: Resource object containing keywords and their associated bid overrides example: attributes: - name: name - retailerId: 0 - userBehaviorDetails: - inclusiveSegment: - userAction: buy - categoryIds: - - 6 - - 6 - brandIds: - - 1 - - 1 - lookbackWindow: P7D - exclusiveSegment: - userAction: buy - categoryIds: - - 6 - - 6 - brandIds: - - 1 - - 1 - lookbackWindow: P7D + keywords: + - phrase: phrase + bid: 0.8008281904610115 + - phrase: phrase + bid: 0.8008281904610115 id: id type: type properties: - attributes: - $ref: '#/components/schemas/RmLegacyAudienceCreateEntityV2' id: - description: Id of the entity nullable: true - type: string - type: + type: string + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/SetBidsModel' + type: object + KeywordsModel: + additionalProperties: false + description: The keywords associated with a line item. + example: + keywords: + key: + createdAt: 2000-01-23T04:56:07.000+00:00 + matchType: null + inputKeywords: + negativeBroad: + - negativeBroad + - negativeBroad + positiveExact: + - positiveExact + - positiveExact + negativeExact: + - negativeExact + - negativeExact + reviewState: null + bid: 6.027456183070403 + updatedAt: 2000-01-23T04:56:07.000+00:00 + rank: + - rank + - rank + properties: + keywords: + additionalProperties: + $ref: '#/components/schemas/KeywordDataModel' + nullable: true + type: object + rank: + items: + type: string nullable: true - type: string + type: array type: object - RmLegacyAudienceGetEntityV1: - description: Audience definition of people of interest for a marketer. + ProposalStatusModel: + additionalProperties: false + description: The state of a proposal in the context of a line item. example: - customerListDetails: - size: size - isShared: true - name: name - retailerId: retailerId - userBehaviorDetails: - targetIds: - - targetIds - - targetIds - targetType: brand - userType: viewer - lookbackWindow: P7D + createdAt: 2000-01-23T04:56:07.000+00:00 + runnableStatus: null + negotiationState: null + bookingStatus: null + comment: comment + updatedAt: 2000-01-23T04:56:07.000+00:00 properties: - name: - description: Name of the audience + negotiationState: + $ref: '#/components/schemas/NegotiationStateModel' + bookingStatus: + $ref: '#/components/schemas/ApprovalStatusModel' + runnableStatus: + $ref: '#/components/schemas/ApprovalStatusModel' + comment: + nullable: true type: string - retailerId: - description: ID of the retailer associated with this audience + createdAt: + format: date-time + nullable: true + type: string + updatedAt: + format: date-time + nullable: true type: string - userBehaviorDetails: - $ref: '#/components/schemas/RmLegacySegmentUserBehaviorV1' - customerListDetails: - $ref: '#/components/schemas/RmLegacySegmentCustomerList' - required: - - name - - retailerId type: object - x-criteo-canonical: - infoType: entity - name: RetailMediaAudienceSummary - version: v1 - RmLegacyAudienceCreateEntityV1: - description: Audience definition + AddRemoveKeywordsModel: + additionalProperties: false + description: Data model containing keywords to be added or removed from a line + item example: - categoryIds: - - 6 - - 6 - name: name - userType: viewer - retailerId: 1 - brandIds: - - 0 - - 0 - lookbackWindow: P7D + keywords: + - phrase: phrase + isDeleted: true + matchType: null + - phrase: phrase + isDeleted: true + matchType: null properties: - userType: - description: Type of the user - enum: - - viewer - - buyer - - addToCarter - type: string - lookbackWindow: - description: Length of lookback window - enum: - - P7D - - P14D - - P30D - - P45D - - P60D - - P90D - - P120D - - P150D - - P180D - type: string - brandIds: - description: The brands to target + keywords: items: - format: int64 - type: integer + $ref: '#/components/schemas/AddRemoveKeywordModel' nullable: true type: array - uniqueItems: true - categoryIds: - description: The categories to target + type: object + SetBidsModel: + additionalProperties: false + description: Data model containing keywords and their associated bid overrides + example: + keywords: + - phrase: phrase + bid: 0.8008281904610115 + - phrase: phrase + bid: 0.8008281904610115 + properties: + keywords: items: - format: int32 - type: integer + $ref: '#/components/schemas/SetBidModel' nullable: true type: array - uniqueItems: true - retailerId: - description: ID of the retailer associated with this audience - format: int64 - type: integer - name: - description: Name of the audience - type: string - required: - - lookbackWindow - - name - - retailerId - - userType type: object - x-criteo-canonical: - infoType: entity - name: RetailMediaAudience - version: v1 - RmLegacyAudienceGetEntityV2: - description: Audience definition of people of interest for a marketer + KeywordDataModel: + additionalProperties: false + description: A single keyword and associated bid override example: - customerListDetails: - size: size - isShared: true - name: name - retailerId: retailerId - userBehaviorDetails: - inclusiveSegment: - userAction: buy - categoryIds: - - 0 - - 0 - minPrice: 1.4658129805029452 - maxPrice: 5.962133916683182 - brandIds: - - 6 - - 6 - lookbackWindow: P7D - exclusiveSegment: - userAction: buy - categoryIds: - - 0 - - 0 - minPrice: 1.4658129805029452 - maxPrice: 5.962133916683182 - brandIds: - - 6 - - 6 - lookbackWindow: P7D + createdAt: 2000-01-23T04:56:07.000+00:00 + matchType: null + inputKeywords: + negativeBroad: + - negativeBroad + - negativeBroad + positiveExact: + - positiveExact + - positiveExact + negativeExact: + - negativeExact + - negativeExact + reviewState: null + bid: 6.027456183070403 + updatedAt: 2000-01-23T04:56:07.000+00:00 properties: - retailerId: - description: ID of the retailer associated with this audience + reviewState: + $ref: '#/components/schemas/ReviewStateModel' + matchType: + $ref: '#/components/schemas/MatchTypeModel' + bid: + format: double + nullable: true + type: number + inputKeywords: + $ref: '#/components/schemas/InputKeywordsModel' + createdAt: + format: date-time + nullable: true type: string - userBehaviorDetails: - $ref: '#/components/schemas/RmLegacyAudienceUserBehaviorDetailsV2' - customerListDetails: - $ref: '#/components/schemas/RmLegacySegmentCustomerList' - name: - description: Name of the audience + updatedAt: + format: date-time + nullable: true type: string - required: - - name - - retailerId type: object - x-criteo-canonical: - infoType: entity - name: RetailMediaAudience - version: v1 - RmLegacyAudienceCreateEntityV2: - description: Audience definition + NegotiationStateModel: + description: The state of a negotiation in the context of a line item. + enum: + - Invalid + - Modified + - Submitted + - Reviewed + - Approved + type: string + ApprovalStatusModel: + description: The status of a booking or runnable in the context of a line item. + enum: + - NotSubmitted + - Submitted + - Rejected + - Approved + type: string + AddRemoveKeywordModel: + additionalProperties: false + description: A single keyword to be added or removed + example: + phrase: phrase + isDeleted: true + matchType: null + properties: + phrase: + maxLength: 255 + minLength: 0 + nullable: true + type: string + matchType: + $ref: '#/components/schemas/MatchTypeModel' + isDeleted: + nullable: true + type: boolean + type: object + SetBidModel: + additionalProperties: false + description: A single keyword and associated bid override example: - name: name - retailerId: 0 - userBehaviorDetails: - inclusiveSegment: - userAction: buy - categoryIds: - - 6 - - 6 - brandIds: - - 1 - - 1 - lookbackWindow: P7D - exclusiveSegment: - userAction: buy - categoryIds: - - 6 - - 6 - brandIds: - - 1 - - 1 - lookbackWindow: P7D + phrase: phrase + bid: 0.8008281904610115 properties: - retailerId: - description: ID of the retailer associated with this audience - format: int64 - type: integer - userBehaviorDetails: - $ref: '#/components/schemas/RmLegacyAudienceUserBehaviorCreateV2' - name: - description: Name of the audience + phrase: + maxLength: 255 + minLength: 0 + nullable: true type: string - required: - - name - - retailerId - - userBehaviorDetails + bid: + format: double + nullable: true + type: number type: object - x-criteo-canonical: - infoType: entity - name: RetailMediaAudience - version: v1 - RmLegacySegmentUserBehaviorV1: - description: Audience definition of people based on what they visited + ReviewStateModel: + description: The state of a keyword in the context of a line item. + enum: + - InReview + - Recommended + - Approved + - AutoApproved + - Rejected + - AutoRejected + type: string + MatchTypeModel: + description: The match type of a keyword. + enum: + - PositiveExactMatch + - NegativeExactMatch + - NegativeBroadMatch + type: string + InputKeywordsModel: + additionalProperties: false + description: The keywords to be added or removed from a line item. example: - targetIds: - - targetIds - - targetIds - targetType: brand - userType: viewer - lookbackWindow: P7D + negativeBroad: + - negativeBroad + - negativeBroad + positiveExact: + - positiveExact + - positiveExact + negativeExact: + - negativeExact + - negativeExact properties: - userType: - description: Type of shopper activity used to generate the audience. - enum: - - viewer - - buyer - - addToCarter - type: string - lookbackWindow: - description: Length of lookback window - enum: - - P7D - - P14D - - P30D - - P45D - - P60D - - P90D - - P120D - - P150D - - P180D - type: string - targetType: - description: Type of target - enum: - - brand - - category + negativeBroad: + items: + type: string nullable: true - type: string - targetIds: - description: The categories to target + type: array + negativeExact: + items: + type: string + nullable: true + type: array + positiveExact: items: type: string nullable: true type: array - uniqueItems: true - required: - - lookbackWindow - - userType - type: object - RmLegacySegmentCustomerList: - description: Audience definition of people based on a customer list - example: - size: size - isShared: true - properties: - size: - description: Number of users in the customer list audience. - type: string - isShared: - description: Indicate if the audience is shared. - type: boolean - required: - - isShared - - size type: object - RmLegacyAudienceUserBehaviorDetailsV2: - description: User Behavior Details. + Creative202110ListResponse: + description: Data model for a list of response resources example: - inclusiveSegment: - userAction: buy - categoryIds: - - 0 - - 0 - minPrice: 1.4658129805029452 - maxPrice: 5.962133916683182 - brandIds: - - 6 - - 6 - lookbackWindow: P7D - exclusiveSegment: - userAction: buy - categoryIds: - - 0 - - 0 - minPrice: 1.4658129805029452 - maxPrice: 5.962133916683182 - brandIds: - - 6 - - 6 - lookbackWindow: P7D + data: + - attributes: + associatedLineItemIds: + - associatedLineItemIds + - associatedLineItemIds + brandId: 0 + name: name + retailerId: 6 + status: Ready + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + - attributes: + associatedLineItemIds: + - associatedLineItemIds + - associatedLineItemIds + brandId: 0 + name: name + retailerId: 6 + status: Ready + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title properties: - inclusiveSegment: - $ref: '#/components/schemas/RmLegacySegmentUserBehaviorV2' - exclusiveSegment: - $ref: '#/components/schemas/RmLegacySegmentUserBehaviorV2' - required: - - inclusiveSegment + data: + items: + $ref: '#/components/schemas/ResourceOfCreative202110' + type: array + x-nullable: false + warnings: + items: + $ref: '#/components/schemas/ProblemDetails' + readOnly: true + type: array + x-nullable: false + errors: + items: + $ref: '#/components/schemas/ProblemDetails' + readOnly: true + type: array + x-nullable: false type: object - RmLegacyAudienceUserBehaviorCreateV2: - description: User Behavior to include and optionally exclude. + x-nullable: false + Creative202210Response: + description: Data model for response resource example: - inclusiveSegment: - userAction: buy - categoryIds: - - 6 - - 6 - brandIds: - - 1 - - 1 - lookbackWindow: P7D - exclusiveSegment: - userAction: buy - categoryIds: - - 6 - - 6 - brandIds: - - 1 - - 1 - lookbackWindow: P7D + data: + attributes: + formatId: 5 + templateVariableValues: + - colorVariableValue: + color: color + textVariableValue: + text: text + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url + id: id + - colorVariableValue: + color: color + textVariableValue: + text: text + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url + id: id + templateName: templateName + associatedLineItemIds: + - associatedLineItemIds + - associatedLineItemIds + environments: + - pageType: Search + environments: + - Web + - Web + - pageType: Search + environments: + - Web + - Web + brandId: 0 + creativeFormatType: Unknown + name: name + retailerId: 6 + templateId: 1 + status: Ready + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title properties: - inclusiveSegment: - $ref: '#/components/schemas/RmLegacySegmentUserBehaviorCreateV2' - exclusiveSegment: - $ref: '#/components/schemas/RmLegacySegmentUserBehaviorCreateV2' - required: - - inclusiveSegment + data: + $ref: '#/components/schemas/ResourceOfCreative202210' + warnings: + items: + $ref: '#/components/schemas/ProblemDetails' + readOnly: true + type: array + x-nullable: false + errors: + items: + $ref: '#/components/schemas/ProblemDetails' + readOnly: true + type: array + x-nullable: false type: object - RmLegacySegmentUserBehaviorV2: - description: Audience definition of people based on what they visited + x-nullable: false + Creative202210ListResponse: + description: Data model for a list of response resources example: - userAction: buy - categoryIds: - - 0 - - 0 - minPrice: 1.4658129805029452 - maxPrice: 5.962133916683182 - brandIds: - - 6 - - 6 - lookbackWindow: P7D + data: + - attributes: + formatId: 5 + templateVariableValues: + - colorVariableValue: + color: color + textVariableValue: + text: text + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url + id: id + - colorVariableValue: + color: color + textVariableValue: + text: text + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url + id: id + templateName: templateName + associatedLineItemIds: + - associatedLineItemIds + - associatedLineItemIds + environments: + - pageType: Search + environments: + - Web + - Web + - pageType: Search + environments: + - Web + - Web + brandId: 0 + creativeFormatType: Unknown + name: name + retailerId: 6 + templateId: 1 + status: Ready + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + - attributes: + formatId: 5 + templateVariableValues: + - colorVariableValue: + color: color + textVariableValue: + text: text + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url + id: id + - colorVariableValue: + color: color + textVariableValue: + text: text + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url + id: id + templateName: templateName + associatedLineItemIds: + - associatedLineItemIds + - associatedLineItemIds + environments: + - pageType: Search + environments: + - Web + - Web + - pageType: Search + environments: + - Web + - Web + brandId: 0 + creativeFormatType: Unknown + name: name + retailerId: 6 + templateId: 1 + status: Ready + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title properties: - userAction: - description: Type of shopper activity used to generate the audience. - enum: - - buy - - view - - addToCart - type: string - lookbackWindow: - description: Length of lookback window - enum: - - P7D - - P14D - - P30D - - P45D - - P60D - - P90D - - P120D - - P150D - - P180D - type: string - categoryIds: - description: The categories to target + data: items: - format: int32 - type: integer - nullable: true + $ref: '#/components/schemas/ResourceOfCreative202210' type: array - uniqueItems: true - brandIds: - description: The brands to target + x-nullable: false + warnings: items: - format: int64 - type: integer - nullable: true + $ref: '#/components/schemas/ProblemDetails' + readOnly: true type: array - uniqueItems: true - minPrice: - description: The min price of targeted skus. - format: double - nullable: true - type: number - maxPrice: - description: The max price of targeted skus. - format: double - nullable: true - type: number - required: - - lookbackWindow - - userAction + x-nullable: false + errors: + items: + $ref: '#/components/schemas/ProblemDetails' + readOnly: true + type: array + x-nullable: false type: object - RmLegacySegmentUserBehaviorCreateV2: - description: User Behavior Details. + x-nullable: false + JsonApiSingleResponseOfCatalogStatus: + description: A JSON:API wrapper class to add one JSON:API within a data property example: - userAction: buy - categoryIds: - - 6 - - 6 - brandIds: - - 1 - - 1 - lookbackWindow: P7D + data: + attributes: + fileSizeBytes: 6 + md5Checksum: md5Checksum + createdAt: 2000-01-23T04:56:07.000+00:00 + currency: currency + rowCount: 0 + message: message + status: unknown + id: id + type: type + warnings: + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title properties: - userAction: - description: Type of shopper activity used to generate the audience. - enum: - - buy - - view - - addToCart - type: string - lookbackWindow: - description: Length of lookback window - enum: - - P7D - - P14D - - P30D - - P45D - - P60D - - P90D - - P120D - - P150D - - P180D - type: string - categoryIds: - description: The categories to target + data: + $ref: '#/components/schemas/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus' + errors: items: - format: int32 - type: integer - nullable: true + $ref: '#/components/schemas/CommonError' type: array - uniqueItems: true - brandIds: - description: The brands to target + x-nullable: false + warnings: items: - format: int64 - type: integer - nullable: true + $ref: '#/components/schemas/CommonWarning' type: array - uniqueItems: true + x-nullable: false required: - - lookbackWindow - - userAction + - data type: object - KeywordsModelResponse: - additionalProperties: false - description: Response object containing keywords associated with a line item. - example: - data: - attributes: - keywords: - key: - createdAt: 2000-01-23T04:56:07.000+00:00 - matchType: null - inputKeywords: - negativeBroad: - - negativeBroad - - negativeBroad - positiveExact: - - positiveExact - - positiveExact - negativeExact: - - negativeExact - - negativeExact - reviewState: null - bid: 6.027456183070403 - updatedAt: 2000-01-23T04:56:07.000+00:00 - rank: - - rank - - rank + x-nullable: false + Category202204ListResponse: + description: Data model for a list of response resources + example: + data: + - attributes: + name: name + text: text + parentId: parentId + id: id + type: type + - attributes: + name: name + text: text + parentId: parentId id: id type: type warnings: - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4933,8 +6696,8 @@ components: stackTrace: stackTrace type: unknown title: title - status: 0 - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4943,9 +6706,9 @@ components: stackTrace: stackTrace type: unknown title: title - status: 0 errors: - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4954,8 +6717,8 @@ components: stackTrace: stackTrace type: unknown title: title - status: 0 - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4964,29 +6727,289 @@ components: stackTrace: stackTrace type: unknown title: title - status: 0 properties: - errors: + data: items: - $ref: '#/components/schemas/RmcaCommonProblem' - nullable: true - readOnly: true + $ref: '#/components/schemas/ResourceOfCategory202204' type: array + x-nullable: false warnings: items: - $ref: '#/components/schemas/RmcaCommonProblem' - nullable: true + $ref: '#/components/schemas/ProblemDetails' readOnly: true type: array - data: - $ref: '#/components/schemas/KeywordsModelResource' + x-nullable: false + errors: + items: + $ref: '#/components/schemas/ProblemDetails' + readOnly: true + type: array + x-nullable: false type: object - ResourceOutcome: - additionalProperties: false - description: Outcome object containing errors and warnings. + x-nullable: false + Category202204: + description: "List of retailer's categories, including the full hierarchy of\ + \ categories and their parent category ID" + example: + name: name + text: text + parentId: parentId + properties: + text: + description: Category Text + type: string + x-nullable: false + name: + description: Category Name + type: string + x-nullable: false + parentId: + description: Category ParentId + type: string + x-nullable: false + required: + - name + - parentId + - text + type: object + x-nullable: false + TemplateListResponse: + description: Data model for a list of response resources example: + data: + - attributes: + createdAt: 2000-01-23T04:56:07.000+00:00 + skuCollectionMin: 6 + allCollectionsMandatory: true + displayableSkusMax: 2 + name: name + retailerId: 0 + skuCollectionMax: 1 + skuPerCollectionMax: 5 + sections: + - title: title + templateVariables: + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - title: title + templateVariables: + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + creativeFormat: Unknown + skuPerCollectionMin: 5 + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + - attributes: + createdAt: 2000-01-23T04:56:07.000+00:00 + skuCollectionMin: 6 + allCollectionsMandatory: true + displayableSkusMax: 2 + name: name + retailerId: 0 + skuCollectionMax: 1 + skuPerCollectionMax: 5 + sections: + - title: title + templateVariables: + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - title: title + templateVariables: + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + creativeFormat: Unknown + skuPerCollectionMin: 5 + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type warnings: - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -4995,8 +7018,8 @@ components: stackTrace: stackTrace type: unknown title: title - status: 0 - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -5005,9 +7028,9 @@ components: stackTrace: stackTrace type: unknown title: title - status: 0 errors: - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -5016,8 +7039,8 @@ components: stackTrace: stackTrace type: unknown title: title - status: 0 - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -5026,38 +7049,148 @@ components: stackTrace: stackTrace type: unknown title: title - status: 0 properties: - errors: + data: items: - $ref: '#/components/schemas/RmcaCommonProblem' - nullable: true - readOnly: true + $ref: '#/components/schemas/ResourceOfTemplate' type: array + x-nullable: false warnings: items: - $ref: '#/components/schemas/RmcaCommonProblem' - nullable: true + $ref: '#/components/schemas/ProblemDetails' + readOnly: true + type: array + x-nullable: false + errors: + items: + $ref: '#/components/schemas/ProblemDetails' readOnly: true type: array + x-nullable: false type: object - ProposalStatusModelResponse: - additionalProperties: false - description: Response object containing the state of a proposal in the context - of a line item. + x-nullable: false + TemplateResponse: + description: Data model for response resource example: data: attributes: createdAt: 2000-01-23T04:56:07.000+00:00 - runnableStatus: null - negotiationState: null - bookingStatus: null - comment: comment + skuCollectionMin: 6 + allCollectionsMandatory: true + displayableSkusMax: 2 + name: name + retailerId: 0 + skuCollectionMax: 1 + skuPerCollectionMax: 5 + sections: + - title: title + templateVariables: + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - title: title + templateVariables: + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + creativeFormat: Unknown + skuPerCollectionMin: 5 updatedAt: 2000-01-23T04:56:07.000+00:00 id: id type: type warnings: - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -5066,8 +7199,8 @@ components: stackTrace: stackTrace type: unknown title: title - status: 0 - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -5076,9 +7209,9 @@ components: stackTrace: stackTrace type: unknown title: title - status: 0 errors: - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -5087,8 +7220,8 @@ components: stackTrace: stackTrace type: unknown title: title - status: 0 - traceId: traceId + traceIdentifier: traceIdentifier code: code instance: instance detail: detail @@ -5097,2939 +7230,2659 @@ components: stackTrace: stackTrace type: unknown title: title - status: 0 properties: - errors: + data: + $ref: '#/components/schemas/ResourceOfTemplate' + warnings: items: - $ref: '#/components/schemas/RmcaCommonProblem' - nullable: true + $ref: '#/components/schemas/ProblemDetails' readOnly: true type: array - warnings: + x-nullable: false + errors: items: - $ref: '#/components/schemas/RmcaCommonProblem' - nullable: true + $ref: '#/components/schemas/ProblemDetails' readOnly: true - type: array - data: - $ref: '#/components/schemas/ProposalStatusModelResource' - type: object - AddRemoveKeywordsModelRequest: - additionalProperties: false - description: Request object to add or remove keywords from a line item - example: - data: - attributes: - keywords: - - phrase: phrase - isDeleted: true - matchType: null - - phrase: phrase - isDeleted: true - matchType: null - id: id - type: type - properties: - data: - $ref: '#/components/schemas/AddRemoveKeywordsModelResource' - type: object - SetBidsModelRequest: - additionalProperties: false - description: Request object to set bid overrides for keywords associated with - a line item - example: - data: - attributes: - keywords: - - phrase: phrase - bid: 0.8008281904610115 - - phrase: phrase - bid: 0.8008281904610115 - id: id - type: type - properties: - data: - $ref: '#/components/schemas/SetBidsModelResource' + type: array + x-nullable: false type: object - KeywordsModelResource: - additionalProperties: false - description: Resource object containing keywords associated with a line item. + x-nullable: false + ExternalRetailerPages202110: + description: Wraps a list of valid pages for a retailer example: - attributes: - keywords: - key: - createdAt: 2000-01-23T04:56:07.000+00:00 - matchType: null - inputKeywords: - negativeBroad: - - negativeBroad - - negativeBroad - positiveExact: - - positiveExact - - positiveExact - negativeExact: - - negativeExact - - negativeExact - reviewState: null - bid: 6.027456183070403 - updatedAt: 2000-01-23T04:56:07.000+00:00 - rank: - - rank - - rank - id: id - type: type + pageTypes: + - pageTypes + - pageTypes properties: - id: - nullable: true - type: string - type: - nullable: true - type: string - attributes: - $ref: '#/components/schemas/KeywordsModel' + pageTypes: + description: List of valid pages for a retailer + items: + type: string + x-nullable: false + type: array + x-nullable: false type: object - RmcaCommonProblem: - additionalProperties: {} - description: Common problem object. + x-nullable: false + CreativeCreateModel202207: + description: Create model of a creative example: - traceId: traceId - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - status: 0 + templateVariableValues: + - colorVariableValue: + color: color + textVariableValue: + text: text + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url + id: id + - colorVariableValue: + color: color + textVariableValue: + text: text + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url + id: id + brandId: 0 + name: name + retailerId: 6 + templateId: 1 properties: - traceId: - description: The request correlation ID this problem comes from. - nullable: true - type: string - type: - description: The problem's category. - enum: - - unknown - - access-control - - authentication - - authorization - - availability - - deprecation - - quota - - validation - nullable: true - type: string - code: - description: "A machine-readable error code, expressed as a string value." - nullable: true - type: string - instance: - description: A URI that identifies the specific occurrence of the problem. - nullable: true - type: string - title: - description: A short human-readable description of the problem type - nullable: true - type: string - detail: - description: A human-readable explanation specific to this occurrence of - the problem - nullable: true - type: string - source: - additionalProperties: - type: string - description: A machine-readable structure to reference to the exact location(s) - causing the error(s) - nullable: true - type: object - stackTrace: - nullable: true + name: + description: The name of the creative type: string - status: - description: The problem's HTTP Status code. + x-nullable: false + brandId: + description: The brand associated to the creative + format: int64 + type: integer + x-nullable: false + retailerId: + description: The retailer associated to the creative + format: int32 + type: integer + x-nullable: false + templateId: + description: The creative template used for this creative format: int32 - nullable: true type: integer + x-nullable: false + templateVariableValues: + description: The template chosen values + items: + $ref: '#/components/schemas/TemplateVariableValue' + type: array + x-nullable: false + required: + - name + - retailerId + - templateId + - templateVariableValues type: object - ProposalStatusModelResource: - additionalProperties: false - description: Resource object containing the state of a proposal in the context - of a line item. + x-nullable: false + CreativeUpdateModel202207: + description: Update model of a creative example: - attributes: - createdAt: 2000-01-23T04:56:07.000+00:00 - runnableStatus: null - negotiationState: null - bookingStatus: null - comment: comment - updatedAt: 2000-01-23T04:56:07.000+00:00 - id: id - type: type + templateVariableValues: + - colorVariableValue: + color: color + textVariableValue: + text: text + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url + id: id + - colorVariableValue: + color: color + textVariableValue: + text: text + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url + id: id + brandId: 0 + name: name + retailerId: 6 + templateId: 1 properties: - id: - nullable: true - type: string - type: - nullable: true + name: + description: The name of the creative type: string - attributes: - $ref: '#/components/schemas/ProposalStatusModel' + x-nullable: false + brandId: + description: The brand associated to the creative + format: int64 + type: integer + x-nullable: false + retailerId: + description: The retailer associated to the creative + format: int32 + type: integer + x-nullable: false + templateId: + description: The creative template used for this creative + format: int32 + type: integer + x-nullable: false + templateVariableValues: + description: The template chosen values + items: + $ref: '#/components/schemas/TemplateVariableValue' + type: array + x-nullable: false + required: + - name + - retailerId + - templateId + - templateVariableValues type: object - AddRemoveKeywordsModelResource: - additionalProperties: false - description: Resource object containing keywords to be added or removed from - a line item + x-nullable: false + JsonApiRequestOfCatalogRequest: + description: "A JSON:API wrapper class to format a with Type, and Attributes properties" example: - attributes: - keywords: - - phrase: phrase - isDeleted: true - matchType: null - - phrase: phrase - isDeleted: true - matchType: null - id: id - type: type + data: + attributes: + brandIdFilter: + - brandIdFilter + - brandIdFilter + format: json-newline + type: type properties: - id: - nullable: true - type: string - type: - nullable: true - type: string - attributes: - $ref: '#/components/schemas/AddRemoveKeywordsModel' + data: + $ref: '#/components/schemas/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest' type: object - SetBidsModelResource: - additionalProperties: false - description: Resource object containing keywords and their associated bid overrides + x-nullable: false + ResourceOfCreative202110: + description: Data model for a Resource example: attributes: - keywords: - - phrase: phrase - bid: 0.8008281904610115 - - phrase: phrase - bid: 0.8008281904610115 + associatedLineItemIds: + - associatedLineItemIds + - associatedLineItemIds + brandId: 0 + name: name + retailerId: 6 + status: Ready + updatedAt: 2000-01-23T04:56:07.000+00:00 id: id type: type properties: id: + description: Id of the entity nullable: true type: string type: + description: Canonical type name of the entity nullable: true type: string attributes: - $ref: '#/components/schemas/SetBidsModel' - type: object - KeywordsModel: - additionalProperties: false - description: The keywords associated with a line item. - example: - keywords: - key: - createdAt: 2000-01-23T04:56:07.000+00:00 - matchType: null - inputKeywords: - negativeBroad: - - negativeBroad - - negativeBroad - positiveExact: - - positiveExact - - positiveExact - negativeExact: - - negativeExact - - negativeExact - reviewState: null - bid: 6.027456183070403 - updatedAt: 2000-01-23T04:56:07.000+00:00 - rank: - - rank - - rank - properties: - keywords: - additionalProperties: - $ref: '#/components/schemas/KeywordDataModel' - nullable: true - type: object - rank: - items: - type: string - nullable: true - type: array + $ref: '#/components/schemas/Creative202110' type: object - ProposalStatusModel: - additionalProperties: false - description: The state of a proposal in the context of a line item. + x-nullable: false + ProblemDetails: + description: Data model for common error or warning example: - createdAt: 2000-01-23T04:56:07.000+00:00 - runnableStatus: null - negotiationState: null - bookingStatus: null - comment: comment - updatedAt: 2000-01-23T04:56:07.000+00:00 + traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title properties: - negotiationState: - $ref: '#/components/schemas/NegotiationStateModel' - bookingStatus: - $ref: '#/components/schemas/ApprovalStatusModel' - runnableStatus: - $ref: '#/components/schemas/ApprovalStatusModel' - comment: - nullable: true - type: string - createdAt: - format: date-time + traceId: + description: The request correlation ID this problem comes from. nullable: true type: string - updatedAt: - format: date-time + traceIdentifier: + description: "The request correlation ID this problem comes from. (deprecated,\ + \ use traceId instead)" nullable: true type: string - type: object - AddRemoveKeywordsModel: - additionalProperties: false - description: Data model containing keywords to be added or removed from a line - item - example: - keywords: - - phrase: phrase - isDeleted: true - matchType: null - - phrase: phrase - isDeleted: true - matchType: null - properties: - keywords: - items: - $ref: '#/components/schemas/AddRemoveKeywordModel' - nullable: true - type: array - type: object - SetBidsModel: - additionalProperties: false - description: Data model containing keywords and their associated bid overrides - example: - keywords: - - phrase: phrase - bid: 0.8008281904610115 - - phrase: phrase - bid: 0.8008281904610115 - properties: - keywords: - items: - $ref: '#/components/schemas/SetBidModel' - nullable: true - type: array - type: object - KeywordDataModel: - additionalProperties: false - description: A single keyword and associated bid override - example: - createdAt: 2000-01-23T04:56:07.000+00:00 - matchType: null - inputKeywords: - negativeBroad: - - negativeBroad - - negativeBroad - positiveExact: - - positiveExact - - positiveExact - negativeExact: - - negativeExact - - negativeExact - reviewState: null - bid: 6.027456183070403 - updatedAt: 2000-01-23T04:56:07.000+00:00 - properties: - reviewState: - $ref: '#/components/schemas/ReviewStateModel' - matchType: - $ref: '#/components/schemas/MatchTypeModel' - bid: - format: double - nullable: true - type: number - inputKeywords: - $ref: '#/components/schemas/InputKeywordsModel' - createdAt: - format: date-time - nullable: true + type: + description: The problem's category. + enum: + - unknown + - access-control + - authentication + - authorization + - availability + - deprecation + - quota + - validation type: string - updatedAt: - format: date-time - nullable: true + x-nullable: false + code: + description: "A machine-readable error code, expressed as a string value." type: string - type: object - NegotiationStateModel: - description: The state of a negotiation in the context of a line item. - enum: - - Invalid - - Modified - - Submitted - - Reviewed - - Approved - type: string - ApprovalStatusModel: - description: The status of a booking or runnable in the context of a line item. - enum: - - NotSubmitted - - Submitted - - Rejected - - Approved - type: string - AddRemoveKeywordModel: - additionalProperties: false - description: A single keyword to be added or removed - example: - phrase: phrase - isDeleted: true - matchType: null - properties: - phrase: - maxLength: 255 - minLength: 0 - nullable: true + x-nullable: false + instance: + description: A URI that identifies the specific occurrence of the problem. type: string - matchType: - $ref: '#/components/schemas/MatchTypeModel' - isDeleted: - nullable: true - type: boolean - type: object - SetBidModel: - additionalProperties: false - description: A single keyword and associated bid override - example: - phrase: phrase - bid: 0.8008281904610115 - properties: - phrase: - maxLength: 255 - minLength: 0 - nullable: true + x-nullable: false + title: + description: A short human-readable description of the problem type type: string - bid: - format: double - nullable: true - type: number + x-nullable: false + detail: + description: A human-readable explanation specific to this occurrence of + the problem + type: string + x-nullable: false + source: + additionalProperties: + type: string + x-nullable: false + description: A machine-readable structure to reference to the exact location(s) + causing the error(s) + type: object + x-nullable: false + stackTrace: + description: "Technical information, only used in non-prod environments" + type: string + x-nullable: false type: object - ReviewStateModel: - description: The state of a keyword in the context of a line item. - enum: - - InReview - - Recommended - - Approved - - AutoApproved - - Rejected - - AutoRejected - type: string - MatchTypeModel: - description: The match type of a keyword. - enum: - - PositiveExactMatch - - NegativeExactMatch - - NegativeBroadMatch - type: string - InputKeywordsModel: - additionalProperties: false - description: The keywords to be added or removed from a line item. + x-nullable: false + ResourceOfCreative202210: + description: Data model for a Resource example: - negativeBroad: - - negativeBroad - - negativeBroad - positiveExact: - - positiveExact - - positiveExact - negativeExact: - - negativeExact - - negativeExact + attributes: + formatId: 5 + templateVariableValues: + - colorVariableValue: + color: color + textVariableValue: + text: text + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url + id: id + - colorVariableValue: + color: color + textVariableValue: + text: text + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url + id: id + templateName: templateName + associatedLineItemIds: + - associatedLineItemIds + - associatedLineItemIds + environments: + - pageType: Search + environments: + - Web + - Web + - pageType: Search + environments: + - Web + - Web + brandId: 0 + creativeFormatType: Unknown + name: name + retailerId: 6 + templateId: 1 + status: Ready + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type properties: - negativeBroad: - items: - type: string - nullable: true - type: array - negativeExact: - items: - type: string + attributes: + $ref: '#/components/schemas/Creative202210' + id: + description: Id of the entity nullable: true - type: array - positiveExact: - items: - type: string + type: string + type: + description: Canonical type name of the entity nullable: true - type: array + type: string type: object - Creative202110ListResponse: - description: Data model for a list of response resources + x-nullable: false + JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus: + description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" example: - data: - - attributes: - associatedLineItemIds: - - associatedLineItemIds - - associatedLineItemIds - brandId: 0 - name: name - retailerId: 6 - status: Ready - updatedAt: 2000-01-23T04:56:07.000+00:00 - id: id - type: type - - attributes: - associatedLineItemIds: - - associatedLineItemIds - - associatedLineItemIds - brandId: 0 - name: name - retailerId: 6 - status: Ready - updatedAt: 2000-01-23T04:56:07.000+00:00 - id: id - type: type - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title + attributes: + fileSizeBytes: 6 + md5Checksum: md5Checksum + createdAt: 2000-01-23T04:56:07.000+00:00 + currency: currency + rowCount: 0 + message: message + status: unknown + id: id + type: type properties: - data: - items: - $ref: '#/components/schemas/ResourceOfCreative202110' - type: array - x-nullable: false - warnings: - items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true - type: array + id: + format: long-id + type: string x-nullable: false - errors: - items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true - type: array + type: + type: string x-nullable: false + attributes: + $ref: '#/components/schemas/ExternalCatalogStatus' + required: + - id + - type type: object x-nullable: false - Creative202210Response: - description: Data model for response resource + ResourceOfCategory202204: + description: Data model for a Resource example: - data: - attributes: - formatId: 5 - templateVariableValues: - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url - id: id - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url - id: id - templateName: templateName - associatedLineItemIds: - - associatedLineItemIds - - associatedLineItemIds - environments: - - pageType: Search - environments: - - Web - - Web - - pageType: Search - environments: - - Web - - Web - brandId: 0 - creativeFormatType: Unknown - name: name - retailerId: 6 - templateId: 1 - status: Ready - updatedAt: 2000-01-23T04:56:07.000+00:00 - id: id - type: type - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title + attributes: + name: name + text: text + parentId: parentId + id: id + type: type properties: - data: - $ref: '#/components/schemas/ResourceOfCreative202210' - warnings: - items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true - type: array - x-nullable: false - errors: - items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true - type: array - x-nullable: false + attributes: + $ref: '#/components/schemas/Category202204' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + nullable: true + type: string type: object x-nullable: false - Creative202210ListResponse: - description: Data model for a list of response resources + ResourceOfTemplate: + description: Data model for a Resource example: - data: - - attributes: - formatId: 5 - templateVariableValues: - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url - id: id - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url + attributes: + createdAt: 2000-01-23T04:56:07.000+00:00 + skuCollectionMin: 6 + allCollectionsMandatory: true + displayableSkusMax: 2 + name: name + retailerId: 0 + skuCollectionMax: 1 + skuPerCollectionMax: 5 + sections: + - title: title + templateVariables: + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 id: id - templateName: templateName - associatedLineItemIds: - - associatedLineItemIds - - associatedLineItemIds - environments: - - pageType: Search - environments: - - Web - - Web - - pageType: Search - environments: - - Web - - Web - brandId: 0 - creativeFormatType: Unknown - name: name - retailerId: 6 - templateId: 1 - status: Ready - updatedAt: 2000-01-23T04:56:07.000+00:00 - id: id - type: type - - attributes: - formatId: 5 - templateVariableValues: - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 id: id - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - title: title + templateVariables: + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 id: id - templateName: templateName - associatedLineItemIds: - - associatedLineItemIds - - associatedLineItemIds - environments: - - pageType: Search - environments: - - Web - - Web - - pageType: Search - environments: - - Web - - Web - brandId: 0 - creativeFormatType: Unknown - name: name - retailerId: 6 - templateId: 1 - status: Ready - updatedAt: 2000-01-23T04:56:07.000+00:00 - id: id - type: type - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + creativeFormat: Unknown + skuPerCollectionMin: 5 + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type properties: - data: - items: - $ref: '#/components/schemas/ResourceOfCreative202210' - type: array - x-nullable: false - warnings: - items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true - type: array - x-nullable: false - errors: - items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true - type: array - x-nullable: false + attributes: + $ref: '#/components/schemas/Template' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + nullable: true + type: string type: object x-nullable: false - JsonApiSingleResponseOfCatalogStatus: - description: A JSON:API wrapper class to add one JSON:API within a data property + TemplateVariableValue: + description: A value for a variable in a creative template. example: - data: - attributes: - fileSizeBytes: 6 - md5Checksum: md5Checksum - createdAt: 2000-01-23T04:56:07.000+00:00 - currency: currency - rowCount: 0 - message: message - status: unknown - id: id - type: type - warnings: - - traceId: traceId - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title + colorVariableValue: + color: color + textVariableValue: + text: text + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url + id: id + properties: + id: + description: The id of the template variable the value is applied to + type: string + x-nullable: false + textVariableValue: + $ref: '#/components/schemas/TextVariableValue' + choiceVariableValue: + $ref: '#/components/schemas/ChoiceVariableValue' + colorVariableValue: + $ref: '#/components/schemas/ColorVariableValue' + filesVariableValue: + $ref: '#/components/schemas/FilesVariableValue' + hyperlinkVariableValue: + $ref: '#/components/schemas/HyperlinkVariableValue' + required: + - id + type: object + x-nullable: false + JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest: + description: "A JSON:API wrapper class to format a with Type, and\r\nAttributes properties" + example: + attributes: + brandIdFilter: + - brandIdFilter + - brandIdFilter + format: json-newline + type: type properties: - data: - $ref: '#/components/schemas/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus' - errors: - items: - $ref: '#/components/schemas/CommonError' - type: array + type: + type: string x-nullable: false - warnings: + attributes: + $ref: '#/components/schemas/ExternalCatalogRequest' + required: + - type + type: object + x-nullable: false + Creative202110: + description: Metadata and usage info of a preferred deals creative + example: + associatedLineItemIds: + - associatedLineItemIds + - associatedLineItemIds + brandId: 0 + name: name + retailerId: 6 + status: Ready + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + name: + type: string + x-nullable: false + status: + enum: + - Ready + - In_Use + - Archived + - Deleted + type: string + x-nullable: false + brandId: + format: int64 + nullable: true + type: integer + x-nullable: true + retailerId: + format: int32 + type: integer + x-nullable: false + associatedLineItemIds: items: - $ref: '#/components/schemas/CommonWarning' + type: string + x-nullable: false type: array x-nullable: false + updatedAt: + format: date-time + type: string + x-nullable: false required: - - data + - name + - retailerId + - status type: object x-nullable: false - Category202204ListResponse: - description: Data model for a list of response resources + Creative202210: + description: A creative entity example: - data: - - attributes: - name: name + formatId: 5 + templateVariableValues: + - colorVariableValue: + color: color + textVariableValue: text: text - parentId: parentId + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url id: id - type: type - - attributes: - name: name + - colorVariableValue: + color: color + textVariableValue: text: text - parentId: parentId + filesVariableValue: + assetIds: + - assetIds + - assetIds + choiceVariableValue: + chosenOptions: + - chosenOptions + - chosenOptions + hyperlinkVariableValue: + url: url id: id - type: type - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title + templateName: templateName + associatedLineItemIds: + - associatedLineItemIds + - associatedLineItemIds + environments: + - pageType: Search + environments: + - Web + - Web + - pageType: Search + environments: + - Web + - Web + brandId: 0 + creativeFormatType: Unknown + name: name + retailerId: 6 + templateId: 1 + status: Ready + updatedAt: 2000-01-23T04:56:07.000+00:00 properties: - data: + name: + description: Name + type: string + x-nullable: false + status: + description: Creative Status + enum: + - Ready + - In_Use + - Archived + - Deleted + type: string + x-nullable: false + brandId: + description: Brand Id + format: int64 + nullable: true + type: integer + x-nullable: true + retailerId: + description: Retailer Id + format: int32 + type: integer + x-nullable: false + templateId: + description: Template Id + format: int32 + type: integer + x-nullable: false + templateName: + description: Template Name + type: string + x-nullable: false + formatId: + description: Format Id + format: int32 + type: integer + x-nullable: false + associatedLineItemIds: + description: Associated Line Item Ids items: - $ref: '#/components/schemas/ResourceOfCategory202204' + type: string + x-nullable: false type: array x-nullable: false - warnings: + updatedAt: + description: Updated at time + format: date-time + type: string + x-nullable: false + creativeFormatType: + description: Creative format type + enum: + - Unknown + - FlagShip + - Showcase + - SponsoredProducts + - Butterfly + - BundleBoost + - IAB + - CUSTOM + - DisplayPanel + - DigitalShelfTalker + type: string + x-nullable: false + environments: + description: "Environment type (e.g. mobile, web, app)" items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true + $ref: '#/components/schemas/PageTypeEnvironment' type: array x-nullable: false - errors: + templateVariableValues: + description: The template chosen values items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true + $ref: '#/components/schemas/TemplateVariableValue' type: array x-nullable: false + required: + - creativeFormatType + - environments + - formatId + - name + - retailerId + - status + - templateId + - templateName + - templateVariableValues type: object x-nullable: false - Category202204: - description: "List of retailer's categories, including the full hierarchy of\ - \ categories and their parent category ID" + ExternalCatalogStatus: + description: The status of an asynchronous request to generate a catalog example: - name: name - text: text - parentId: parentId + fileSizeBytes: 6 + md5Checksum: md5Checksum + createdAt: 2000-01-23T04:56:07.000+00:00 + currency: currency + rowCount: 0 + message: message + status: unknown properties: - text: - description: Category Text + status: + description: An enumeration of the status of the catalog. + enum: + - unknown + - pending + - success + - failure + - expired type: string x-nullable: false - name: - description: Category Name + currency: + description: An ISO4217 representation of the currency products are listed + under in this catalog. type: string x-nullable: false - parentId: - description: Category ParentId + rowCount: + description: "An indication of the number of products contained in this\ + \ catalog. Available when\r\nthis catalog reaches a success status." + format: int32 + nullable: true + type: integer + x-nullable: true + fileSizeBytes: + description: The size of this catalog in bytes. Available when this catalog + reaches a success status. + format: int32 + nullable: true + type: integer + x-nullable: true + md5Checksum: + description: "An MD5 checksum of the catalog for use in confirming complete\ + \ and uncorrupted retrieval.\r\nAvailable when this catalog reaches a\ + \ success status." + nullable: true + type: string + x-nullable: true + createdAt: + description: The time this catalog was created. Represented as a UTC ISO8601 + string. + format: date-time type: string x-nullable: false + message: + description: An optional information message intended for developer consumption. + nullable: true + type: string + x-nullable: true required: - - name - - parentId - - text + - createdAt + - currency + - fileSizeBytes + - md5Checksum + - message + - rowCount + - status type: object x-nullable: false - TemplateListResponse: - description: Data model for a list of response resources + Template: + description: A template for creating creatives. example: - data: - - attributes: - createdAt: 2000-01-23T04:56:07.000+00:00 - skuCollectionMin: 6 - allCollectionsMandatory: true - displayableSkusMax: 2 - name: name - retailerId: 0 - skuCollectionMax: 1 - skuPerCollectionMax: 5 - sections: - - title: title - templateVariables: - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - title: title - templateVariables: - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 + createdAt: 2000-01-23T04:56:07.000+00:00 + skuCollectionMin: 6 + allCollectionsMandatory: true + displayableSkusMax: 2 + name: name + retailerId: 0 + skuCollectionMax: 1 + skuPerCollectionMax: 5 + sections: + - title: title + templateVariables: + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 + - dependentVariables: + - null + - null id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - creativeFormat: Unknown - skuPerCollectionMin: 5 - updatedAt: 2000-01-23T04:56:07.000+00:00 - id: id - type: type - - attributes: - createdAt: 2000-01-23T04:56:07.000+00:00 - skuCollectionMin: 6 - allCollectionsMandatory: true - displayableSkusMax: 2 - name: name - retailerId: 0 - skuCollectionMax: 1 - skuPerCollectionMax: 5 - sections: - - title: title - templateVariables: - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 + - dependentVariables: + - null + - null id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - title: title - templateVariables: - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - title: title + templateVariables: + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 + - dependentVariables: + - null + - null id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - creativeFormat: Unknown - skuPerCollectionMin: 5 - updatedAt: 2000-01-23T04:56:07.000+00:00 - id: id - type: type - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + creativeFormat: Unknown + skuPerCollectionMin: 5 + updatedAt: 2000-01-23T04:56:07.000+00:00 properties: - data: + creativeFormat: + description: The kind of creative this template can be used to build. + enum: + - Unknown + - FlagShip + - Showcase + - SponsoredProducts + - Butterfly + - BundleBoost + - IAB + - CUSTOM + - DisplayPanel + - DigitalShelfTalker + type: string + x-nullable: false + name: + description: The name of the template + type: string + x-nullable: false + retailerId: + description: The retailer associated to the template + format: int32 + type: integer + x-nullable: false + skuCollectionMin: + description: "TODO: what is it ?" + format: int32 + type: integer + x-nullable: false + skuCollectionMax: + description: "TODO: what is it ?" + format: int32 + nullable: true + type: integer + x-nullable: true + skuPerCollectionMin: + description: "TODO: what is it ?" + format: int32 + type: integer + x-nullable: false + skuPerCollectionMax: + description: "TODO: what is it ?" + format: int32 + nullable: true + type: integer + x-nullable: true + displayableSkusMax: + description: "TODO: what is it ?" + format: int32 + nullable: true + type: integer + x-nullable: true + allCollectionsMandatory: + description: "TODO: what is it ?" + type: boolean + x-nullable: false + createdAt: + description: The time at which the template was created + format: date-time + type: string + x-nullable: false + updatedAt: + description: The time at which the template was updated + format: date-time + type: string + x-nullable: false + sections: + description: The sections holding various template variables items: - $ref: '#/components/schemas/ResourceOfTemplate' + $ref: '#/components/schemas/Section' type: array x-nullable: false - warnings: + required: + - allCollectionsMandatory + - createdAt + - creativeFormat + - name + - sections + - skuCollectionMin + - skuPerCollectionMin + - updatedAt + type: object + x-nullable: false + TextVariableValue: + description: A value of a template text variable + example: + text: text + properties: + text: + description: The displayed text + type: string + x-nullable: false + required: + - text + type: object + x-nullable: false + ChoiceVariableValue: + description: A value of a template choice variable (among different accepted + options) + example: + chosenOptions: + - chosenOptions + - chosenOptions + properties: + chosenOptions: + description: The chosen options items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true + type: string + x-nullable: false type: array x-nullable: false - errors: + required: + - chosenOptions + type: object + x-nullable: false + ColorVariableValue: + description: A value of a template color variable + example: + color: color + properties: + color: + description: The displayed color (HEX format) + pattern: "^#(([0-9a-fA-F]{2}){3}|([0-9a-fA-F]){3})$" + type: string + x-nullable: false + required: + - color + type: object + x-nullable: false + FilesVariableValue: + description: "A value of a template file variable (one or several files), like\ + \ images in a creative" + example: + assetIds: + - assetIds + - assetIds + properties: + assetIds: + description: The assets representing the images to be displayed items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true + type: string + x-nullable: false + minLength: 1 type: array x-nullable: false + required: + - assetIds type: object x-nullable: false - TemplateResponse: - description: Data model for response resource + HyperlinkVariableValue: + description: A value of a template hyperlink variable example: - data: - attributes: - createdAt: 2000-01-23T04:56:07.000+00:00 - skuCollectionMin: 6 - allCollectionsMandatory: true - displayableSkusMax: 2 - name: name - retailerId: 0 - skuCollectionMax: 1 - skuPerCollectionMax: 5 - sections: - - title: title - templateVariables: - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - title: title - templateVariables: - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - creativeFormat: Unknown - skuPerCollectionMin: 5 - updatedAt: 2000-01-23T04:56:07.000+00:00 - id: id - type: type - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title + url: url + properties: + url: + description: The url to redirect to + type: string + x-nullable: false + required: + - url + type: object + x-nullable: false + ExternalCatalogRequest: + description: A request for a catalog under the specified format. Currently "json-newline" + is supported. + example: + brandIdFilter: + - brandIdFilter + - brandIdFilter + format: json-newline properties: - data: - $ref: '#/components/schemas/ResourceOfTemplate' - warnings: - items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true - type: array + format: + default: json-newline + enum: + - json-newline + type: string x-nullable: false - errors: + brandIdFilter: items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true + format: long-id + type: string type: array x-nullable: false type: object x-nullable: false - ExternalRetailerPages202110: - description: Wraps a list of valid pages for a retailer + PageTypeEnvironment: + description: The PageType-Environment Tuples for creatives example: - pageTypes: - - pageTypes - - pageTypes + pageType: Search + environments: + - Web + - Web properties: - pageTypes: - description: List of valid pages for a retailer + pageType: + description: Creative PageType + enum: + - Search + - Home + - Browse + - Checkout + - Category + - ProductDetail + - Confirmation + - Merchandising + - Deals + type: string + x-nullable: false + environments: + description: List of environments per PageType items: + enum: + - Web + - Mobile + - App + - Lockout + - Mixed + - iOS + - Android type: string x-nullable: false type: array x-nullable: false type: object x-nullable: false - CreativeCreateModel202207: - description: Create model of a creative + Section: + description: Section object that hold template variables example: - templateVariableValues: - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url + title: title + templateVariables: + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 id: id - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + - choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 id: id - brandId: 0 - name: name - retailerId: 6 - templateId: 1 + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 properties: - name: - description: The name of the creative + title: type: string x-nullable: false - brandId: - description: The brand associated to the creative - format: int64 - type: integer - x-nullable: false - retailerId: - description: The retailer associated to the creative - format: int32 - type: integer - x-nullable: false - templateId: - description: The creative template used for this creative - format: int32 - type: integer - x-nullable: false - templateVariableValues: - description: The template chosen values + templateVariables: items: - $ref: '#/components/schemas/TemplateVariableValue' + $ref: '#/components/schemas/TemplateVariable' type: array x-nullable: false required: - - name - - retailerId - - templateId - - templateVariableValues + - templateVariables + - title type: object x-nullable: false - CreativeUpdateModel202207: - description: Update model of a creative + TemplateVariable: + description: A variable in a creative template example: - templateVariableValues: - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url + choiceVariableSpecification: + maxSelected: 7 + options: + - dependentVariables: + - null + - null + id: id + - dependentVariables: + - null + - null + id: id + minSelected: 9 + id: id + textVariableSpecification: + maxChars: 3 + type: Text + required: true + filesVariablesSpecification: + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 + properties: + id: + description: The id of the variable + type: string + x-nullable: false + required: + description: Whether the variable is required + type: boolean + x-nullable: false + type: + description: The type of the variable + enum: + - Text + - Choice + - Color + - Files + - Hyperlink + type: string + x-nullable: false + choiceVariableSpecification: + $ref: '#/components/schemas/ChoiceVariableSpecification' + textVariableSpecification: + $ref: '#/components/schemas/TextVariableSpecification' + filesVariablesSpecification: + $ref: '#/components/schemas/FilesVariablesSpecification' + required: + - id + - required + - type + type: object + x-nullable: false + ChoiceVariableSpecification: + description: Specification of choice variable + example: + maxSelected: 7 + options: + - dependentVariables: + - null + - null id: id - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url + - dependentVariables: + - null + - null id: id - brandId: 0 - name: name - retailerId: 6 - templateId: 1 + minSelected: 9 properties: - name: - description: The name of the creative - type: string - x-nullable: false - brandId: - description: The brand associated to the creative - format: int64 - type: integer + options: + description: The available options + items: + $ref: '#/components/schemas/ChoiceOption' + type: array x-nullable: false - retailerId: - description: The retailer associated to the creative + maxSelected: + description: The maximum number of selectable options format: int32 + nullable: true type: integer - x-nullable: false - templateId: - description: The creative template used for this creative + x-nullable: true + minSelected: + description: The minimum number of selectable options format: int32 + nullable: true type: integer - x-nullable: false - templateVariableValues: - description: The template chosen values - items: - $ref: '#/components/schemas/TemplateVariableValue' - type: array - x-nullable: false + x-nullable: true required: - - name - - retailerId - - templateId - - templateVariableValues - type: object - x-nullable: false - JsonApiRequestOfCatalogRequest: - description: "A JSON:API wrapper class to format a with Type, and Attributes properties" - example: - data: - attributes: - brandIdFilter: - - brandIdFilter - - brandIdFilter - format: json-newline - type: type - properties: - data: - $ref: '#/components/schemas/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest' + - options type: object x-nullable: false - ResourceOfCreative202110: - description: Data model for a Resource + TextVariableSpecification: + description: Specification of a text variable example: - attributes: - associatedLineItemIds: - - associatedLineItemIds - - associatedLineItemIds - brandId: 0 - name: name - retailerId: 6 - status: Ready - updatedAt: 2000-01-23T04:56:07.000+00:00 - id: id - type: type + maxChars: 3 properties: - id: - description: Id of the entity - nullable: true - type: string - type: - description: Canonical type name of the entity + maxChars: + description: The maximum amount of characters accepted for the text + format: int32 nullable: true - type: string - attributes: - $ref: '#/components/schemas/Creative202110' + type: integer + x-nullable: true type: object x-nullable: false - ProblemDetails: - description: Data model for common error or warning + FilesVariablesSpecification: + description: Specification of a file variable example: - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title + extensions: + - Unknown + - Unknown + maxFile: 7 + minFiles: 4 + maxBytes: 2 properties: - traceId: - description: The request correlation ID this problem comes from. - nullable: true - type: string - traceIdentifier: - description: "The request correlation ID this problem comes from. (deprecated,\ - \ use traceId instead)" - nullable: true - type: string - type: - description: The problem's category. - enum: - - unknown - - access-control - - authentication - - authorization - - availability - - deprecation - - quota - - validation - type: string - x-nullable: false - code: - description: "A machine-readable error code, expressed as a string value." - type: string - x-nullable: false - instance: - description: A URI that identifies the specific occurrence of the problem. - type: string - x-nullable: false - title: - description: A short human-readable description of the problem type - type: string - x-nullable: false - detail: - description: A human-readable explanation specific to this occurrence of - the problem - type: string - x-nullable: false - source: - additionalProperties: + extensions: + description: The accepted file extensions + items: + enum: + - Unknown + - Jpeg + - Png + - Gif + - Pdf type: string x-nullable: false - description: A machine-readable structure to reference to the exact location(s) - causing the error(s) - type: object - x-nullable: false - stackTrace: - description: "Technical information, only used in non-prod environments" - type: string + type: array x-nullable: false - type: object - x-nullable: false - ResourceOfCreative202210: - description: Data model for a Resource - example: - attributes: - formatId: 5 - templateVariableValues: - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url - id: id - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url - id: id - templateName: templateName - associatedLineItemIds: - - associatedLineItemIds - - associatedLineItemIds - environments: - - pageType: Search - environments: - - Web - - Web - - pageType: Search - environments: - - Web - - Web - brandId: 0 - creativeFormatType: Unknown - name: name - retailerId: 6 - templateId: 1 - status: Ready - updatedAt: 2000-01-23T04:56:07.000+00:00 - id: id - type: type - properties: - attributes: - $ref: '#/components/schemas/Creative202210' - id: - description: Id of the entity + maxBytes: + description: The maximum amount of bytes per file + format: int32 nullable: true - type: string - type: - description: Canonical type name of the entity + type: integer + x-nullable: true + minFiles: + description: The minimum amount of files requires + format: int32 nullable: true - type: string + type: integer + x-nullable: true + maxFile: + description: The maximum amount of files required + format: int32 + nullable: true + type: integer + x-nullable: true + required: + - extensions + - minFiles type: object x-nullable: false - JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus: - description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" + ChoiceOption: + description: An option given in a choice example: - attributes: - fileSizeBytes: 6 - md5Checksum: md5Checksum - createdAt: 2000-01-23T04:56:07.000+00:00 - currency: currency - rowCount: 0 - message: message - status: unknown + dependentVariables: + - null + - null id: id - type: type properties: - id: - format: long-id - type: string + dependentVariables: + description: Template variables unblocked when the option is chosen + items: + $ref: '#/components/schemas/TemplateVariable' + type: array x-nullable: false - type: + id: + description: The id of the option type: string x-nullable: false - attributes: - $ref: '#/components/schemas/ExternalCatalogStatus' required: + - dependentVariables - id - - type type: object x-nullable: false - ResourceOfCategory202204: - description: Data model for a Resource + AsyncReportResponse: + description: Async Report response format example: - attributes: - name: name - text: text - parentId: parentId - id: id - type: type + data: + attributes: + fileSizeBytes: 6 + md5CheckSum: md5CheckSum + createdAt: createdAt + rowCount: 0 + id: id + message: message + expiresAt: expiresAt + status: pending + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title properties: - attributes: - $ref: '#/components/schemas/Category202204' - id: - description: Id of the entity + data: + $ref: '#/components/schemas/StatusResponseResource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' nullable: true - type: string - type: - description: Canonical type name of the entity + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' nullable: true - type: string - type: object - x-nullable: false - ResourceOfTemplate: - description: Data model for a Resource - example: - attributes: - createdAt: 2000-01-23T04:56:07.000+00:00 - skuCollectionMin: 6 - allCollectionsMandatory: true - displayableSkusMax: 2 - name: name - retailerId: 0 - skuCollectionMax: 1 - skuPerCollectionMax: 5 - sections: - - title: title - templateVariables: - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - title: title - templateVariables: - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - creativeFormat: Unknown - skuPerCollectionMin: 5 - updatedAt: 2000-01-23T04:56:07.000+00:00 - id: id - type: type + readOnly: true + type: array + type: object + ReportOutcome: + description: The outcome of an API call. properties: - attributes: - $ref: '#/components/schemas/Template' - id: - description: Id of the entity + warnings: + items: + $ref: '#/components/schemas/CommonProblem' nullable: true - type: string - type: - description: Canonical type name of the entity + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' nullable: true - type: string + readOnly: true + type: array type: object - x-nullable: false - TemplateVariableValue: - description: A value for a variable in a creative template. + AsyncCampaignsReportRequest: + description: A top-level object that encapsulates a Criteo API request for a + single value example: - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url - id: id + data: + attributes: + campaignType: all + clickAttributionWindow: none + endDate: 2000-01-23T04:56:07.000+00:00 + timezone: UTC + format: json-compact + salesChannel: all + reportType: summary + viewAttributionWindow: none + ids: + - ids + - ids + id: id + metrics: + - impressions + - impressions + startDate: 2000-01-23T04:56:07.000+00:00 + dimensions: + - date + - date + type: type properties: - id: - description: The id of the template variable the value is applied to - type: string - x-nullable: false - textVariableValue: - $ref: '#/components/schemas/TextVariableValue' - choiceVariableValue: - $ref: '#/components/schemas/ChoiceVariableValue' - colorVariableValue: - $ref: '#/components/schemas/ColorVariableValue' - filesVariableValue: - $ref: '#/components/schemas/FilesVariableValue' - hyperlinkVariableValue: - $ref: '#/components/schemas/HyperlinkVariableValue' - required: - - id + data: + $ref: '#/components/schemas/AsyncCampaignsReportResource' type: object - x-nullable: false - JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest: - description: "A JSON:API wrapper class to format a with Type, and\r\nAttributes properties" + AsyncLineItemsReportRequest: + description: A top-level object that encapsulates a Criteo API request for a + single value example: - attributes: - brandIdFilter: - - brandIdFilter - - brandIdFilter - format: json-newline - type: type + data: + attributes: + campaignType: all + clickAttributionWindow: none + endDate: 2000-01-23T04:56:07.000+00:00 + timezone: UTC + format: json-compact + salesChannel: all + reportType: summary + viewAttributionWindow: none + ids: + - ids + - ids + id: id + metrics: + - impressions + - impressions + startDate: 2000-01-23T04:56:07.000+00:00 + dimensions: + - date + - date + type: type properties: - type: - type: string - x-nullable: false - attributes: - $ref: '#/components/schemas/ExternalCatalogRequest' - required: - - type + data: + $ref: '#/components/schemas/AsyncLineItemsReportResource' type: object - x-nullable: false - Creative202110: - description: Metadata and usage info of a preferred deals creative + AsyncRevenueReportRequest: + description: A top-level object that encapsulates a Criteo API request for a + single value example: - associatedLineItemIds: - - associatedLineItemIds - - associatedLineItemIds - brandId: 0 - name: name - retailerId: 6 - status: Ready - updatedAt: 2000-01-23T04:56:07.000+00:00 + data: + attributes: + advertiserTypes: + - retailer + - retailer + campaignType: all + clickAttributionWindow: none + endDate: 2000-01-23T04:56:07.000+00:00 + timezone: UTC + soldBy: directSold + revenueType: auction + skuRelations: + - sameSku + - sameSku + format: json + salesChannel: all + reportType: advertiser + viewAttributionWindow: none + ids: + - ids + - ids + buyType: auction + id: id + metrics: + - numberOfCampaigns + - numberOfCampaigns + startDate: 2000-01-23T04:56:07.000+00:00 + dimensions: + - date + - date + type: type properties: - name: - type: string - x-nullable: false - status: - enum: - - Ready - - In_Use - - Archived - - Deleted - type: string - x-nullable: false - brandId: - format: int64 - nullable: true - type: integer - x-nullable: true - retailerId: - format: int32 - type: integer - x-nullable: false - associatedLineItemIds: - items: - type: string - x-nullable: false - type: array - x-nullable: false - updatedAt: - format: date-time - type: string - x-nullable: false - required: - - name - - retailerId - - status + data: + $ref: '#/components/schemas/AsyncRevenueReportResource' type: object - x-nullable: false - Creative202210: - description: A creative entity + StatusResponseResource: + description: A class that represents a domain entity exposed by an API example: - formatId: 5 - templateVariableValues: - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url - id: id - - colorVariableValue: - color: color - textVariableValue: - text: text - filesVariableValue: - assetIds: - - assetIds - - assetIds - choiceVariableValue: - chosenOptions: - - chosenOptions - - chosenOptions - hyperlinkVariableValue: - url: url - id: id - templateName: templateName - associatedLineItemIds: - - associatedLineItemIds - - associatedLineItemIds - environments: - - pageType: Search - environments: - - Web - - Web - - pageType: Search - environments: - - Web - - Web - brandId: 0 - creativeFormatType: Unknown - name: name - retailerId: 6 - templateId: 1 - status: Ready - updatedAt: 2000-01-23T04:56:07.000+00:00 + attributes: + fileSizeBytes: 6 + md5CheckSum: md5CheckSum + createdAt: createdAt + rowCount: 0 + id: id + message: message + expiresAt: expiresAt + status: pending + id: id + type: type properties: - name: - description: Name + attributes: + $ref: '#/components/schemas/StatusResponse' + id: + nullable: true type: string - x-nullable: false - status: - description: Creative Status - enum: - - Ready - - In_Use - - Archived - - Deleted + type: + nullable: true type: string - x-nullable: false - brandId: - description: Brand Id - format: int64 + type: object + AsyncCampaignsReportResource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + campaignType: all + clickAttributionWindow: none + endDate: 2000-01-23T04:56:07.000+00:00 + timezone: UTC + format: json-compact + salesChannel: all + reportType: summary + viewAttributionWindow: none + ids: + - ids + - ids + id: id + metrics: + - impressions + - impressions + startDate: 2000-01-23T04:56:07.000+00:00 + dimensions: + - date + - date + type: type + properties: + type: nullable: true - type: integer - x-nullable: true - retailerId: - description: Retailer Id - format: int32 - type: integer - x-nullable: false - templateId: - description: Template Id - format: int32 - type: integer - x-nullable: false - templateName: - description: Template Name type: string - x-nullable: false - formatId: - description: Format Id - format: int32 - type: integer - x-nullable: false - associatedLineItemIds: - description: Associated Line Item Ids - items: - type: string - x-nullable: false - type: array - x-nullable: false - updatedAt: - description: Updated at time - format: date-time + attributes: + $ref: '#/components/schemas/AsyncCampaignsReport' + type: object + AsyncLineItemsReportResource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + campaignType: all + clickAttributionWindow: none + endDate: 2000-01-23T04:56:07.000+00:00 + timezone: UTC + format: json-compact + salesChannel: all + reportType: summary + viewAttributionWindow: none + ids: + - ids + - ids + id: id + metrics: + - impressions + - impressions + startDate: 2000-01-23T04:56:07.000+00:00 + dimensions: + - date + - date + type: type + properties: + type: + nullable: true type: string - x-nullable: false - creativeFormatType: - description: Creative format type - enum: - - Unknown - - FlagShip - - Showcase - - SponsoredProducts - - Butterfly - - BundleBoost - - IAB - - CUSTOM - - DisplayPanel - - DigitalShelfTalker + attributes: + $ref: '#/components/schemas/AsyncLineItemsReport' + type: object + AsyncRevenueReportResource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + advertiserTypes: + - retailer + - retailer + campaignType: all + clickAttributionWindow: none + endDate: 2000-01-23T04:56:07.000+00:00 + timezone: UTC + soldBy: directSold + revenueType: auction + skuRelations: + - sameSku + - sameSku + format: json + salesChannel: all + reportType: advertiser + viewAttributionWindow: none + ids: + - ids + - ids + buyType: auction + id: id + metrics: + - numberOfCampaigns + - numberOfCampaigns + startDate: 2000-01-23T04:56:07.000+00:00 + dimensions: + - date + - date + type: type + properties: + type: + nullable: true type: string - x-nullable: false - environments: - description: "Environment type (e.g. mobile, web, app)" - items: - $ref: '#/components/schemas/PageTypeEnvironment' - type: array - x-nullable: false - templateVariableValues: - description: The template chosen values - items: - $ref: '#/components/schemas/TemplateVariableValue' - type: array - x-nullable: false - required: - - creativeFormatType - - environments - - formatId - - name - - retailerId - - status - - templateId - - templateName - - templateVariableValues + attributes: + $ref: '#/components/schemas/AsyncRevenueReport' type: object - x-nullable: false - ExternalCatalogStatus: - description: The status of an asynchronous request to generate a catalog + StatusResponse: + description: Status of an async report request example: fileSizeBytes: 6 - md5Checksum: md5Checksum - createdAt: 2000-01-23T04:56:07.000+00:00 - currency: currency + md5CheckSum: md5CheckSum + createdAt: createdAt rowCount: 0 + id: id message: message - status: unknown + expiresAt: expiresAt + status: pending properties: status: - description: An enumeration of the status of the catalog. enum: - - unknown - pending - success - failure - expired + nullable: true type: string - x-nullable: false - currency: - description: An ISO4217 representation of the currency products are listed - under in this catalog. - type: string - x-nullable: false rowCount: - description: "An indication of the number of products contained in this\ - \ catalog. Available when\r\nthis catalog reaches a success status." format: int32 nullable: true type: integer - x-nullable: true fileSizeBytes: - description: The size of this catalog in bytes. Available when this catalog - reaches a success status. format: int32 nullable: true - type: integer - x-nullable: true - md5Checksum: - description: "An MD5 checksum of the catalog for use in confirming complete\ - \ and uncorrupted retrieval.\r\nAvailable when this catalog reaches a\ - \ success status." + type: integer + md5CheckSum: + nullable: true + type: string + createdAt: + nullable: true + type: string + expiresAt: + nullable: true + type: string + message: + nullable: true + type: string + id: + nullable: true + type: string + type: object + x-criteo-canonical: + infoType: entity + AsyncCampaignsReport: + description: Async Campaigns report body request + example: + campaignType: all + clickAttributionWindow: none + endDate: 2000-01-23T04:56:07.000+00:00 + timezone: UTC + format: json-compact + salesChannel: all + reportType: summary + viewAttributionWindow: none + ids: + - ids + - ids + id: id + metrics: + - impressions + - impressions + startDate: 2000-01-23T04:56:07.000+00:00 + dimensions: + - date + - date + properties: + ids: + description: Campaign ids to report on + items: + type: string + nullable: true + type: array + id: + description: Campaign id to report on nullable: true type: string - x-nullable: true - createdAt: - description: The time this catalog was created. Represented as a UTC ISO8601 - string. - format: date-time + campaignType: + default: all + description: "Filter the type of campaigns to report on: sponsoredProducts\ + \ or onSiteDisplays" + enum: + - all + - sponsoredProducts + - onSiteDisplays + nullable: true type: string - x-nullable: false - message: - description: An optional information message intended for developer consumption. + salesChannel: + default: all + description: "Filter on specific sales channel: offline or online" + enum: + - all + - offline + - online nullable: true type: string - x-nullable: true - required: - - createdAt - - currency - - fileSizeBytes - - md5Checksum - - message - - rowCount - - status - type: object - x-nullable: false - Template: - description: A template for creating creatives. - example: - createdAt: 2000-01-23T04:56:07.000+00:00 - skuCollectionMin: 6 - allCollectionsMandatory: true - displayableSkusMax: 2 - name: name - retailerId: 0 - skuCollectionMax: 1 - skuPerCollectionMax: 5 - sections: - - title: title - templateVariables: - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - title: title - templateVariables: - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - creativeFormat: Unknown - skuPerCollectionMin: 5 - updatedAt: 2000-01-23T04:56:07.000+00:00 - properties: - creativeFormat: - description: The kind of creative this template can be used to build. + format: + default: json-compact + description: Format of the output enum: - - Unknown - - FlagShip - - Showcase - - SponsoredProducts - - Butterfly - - BundleBoost - - IAB - - CUSTOM - - DisplayPanel - - DigitalShelfTalker + - json + - json-compact + - json-newline + - csv + nullable: true type: string - x-nullable: false - name: - description: The name of the template + reportType: + default: summary + description: "Type of report, if no dimensions/metrics are provided, falls\ + \ back to summary reportType" + enum: + - summary + - pageType + - keyword + - productCategory + - product + - attributedTransactions + - environment + - servedCategory + nullable: true type: string - x-nullable: false - retailerId: - description: The retailer associated to the template - format: int32 - type: integer - x-nullable: false - skuCollectionMin: - description: "TODO: what is it ?" - format: int32 - type: integer - x-nullable: false - skuCollectionMax: - description: "TODO: what is it ?" - format: int32 + clickAttributionWindow: + default: none + description: Click attribution window + enum: + - none + - 7D + - 14D + - 30D nullable: true - type: integer - x-nullable: true - skuPerCollectionMin: - description: "TODO: what is it ?" - format: int32 - type: integer - x-nullable: false - skuPerCollectionMax: - description: "TODO: what is it ?" - format: int32 + type: string + viewAttributionWindow: + default: none + description: View attribution window + enum: + - none + - 1D + - 7D + - 14D + - 30D + nullable: true + type: string + dimensions: + description: List of dimensions to report on + items: + enum: + - date + - hour + - accountId + - accountName + - campaignId + - campaignName + - campaignTypeName + - lineItemId + - lineItemName + - retailerId + - retailerName + - brandId + - brandName + - advProductCategory + - advProductId + - advProductName + - salesChannel + - environment + - pageTypeName + - pageCategory + - taxonomyBreadcrumb + - keyword + - searchTerm + type: string nullable: true - type: integer - x-nullable: true - displayableSkusMax: - description: "TODO: what is it ?" - format: int32 + type: array + metrics: + description: List of metrics to report on + items: + enum: + - impressions + - clicks + - spend + - attributedSales + - attributedUnits + - attributedOrders + - assistedSales + - assistedUnits + - ctr + - cpc + - cpo + - cpm + - roas + - videoViews + - videosStarted + - videosPlayedTo25 + - videosPlayedTo50 + - videosPlayedTo75 + - videosPlayedTo100 + - videoPlayingRate + - videoCompletionRate + - uniqueVisitors + - frequency + type: string nullable: true - type: integer - x-nullable: true - allCollectionsMandatory: - description: "TODO: what is it ?" - type: boolean - x-nullable: false - createdAt: - description: The time at which the template was created + type: array + startDate: + description: Start date format: date-time type: string - x-nullable: false - updatedAt: - description: The time at which the template was updated + endDate: + description: End date format: date-time type: string - x-nullable: false - sections: - description: The sections holding various template variables - items: - $ref: '#/components/schemas/Section' - type: array - x-nullable: false - required: - - allCollectionsMandatory - - createdAt - - creativeFormat - - name - - sections - - skuCollectionMin - - skuPerCollectionMin - - updatedAt - type: object - x-nullable: false - TextVariableValue: - description: A value of a template text variable - example: - text: text - properties: - text: - description: The displayed text + timezone: + default: UTC + description: "Time zone : see criteo developer portal for supported time\ + \ zones" + nullable: true type: string - x-nullable: false required: - - text + - endDate + - startDate type: object - x-nullable: false - ChoiceVariableValue: - description: A value of a template choice variable (among different accepted - options) + AsyncLineItemsReport: + description: Async Line Items report body request example: - chosenOptions: - - chosenOptions - - chosenOptions + campaignType: all + clickAttributionWindow: none + endDate: 2000-01-23T04:56:07.000+00:00 + timezone: UTC + format: json-compact + salesChannel: all + reportType: summary + viewAttributionWindow: none + ids: + - ids + - ids + id: id + metrics: + - impressions + - impressions + startDate: 2000-01-23T04:56:07.000+00:00 + dimensions: + - date + - date properties: - chosenOptions: - description: The chosen options + ids: + description: Line Item ids to report on items: type: string - x-nullable: false + nullable: true + type: array + id: + description: Line Item id to report on + nullable: true + type: string + campaignType: + default: all + description: "Filter the type of campaigns to report on: sponsoredProducts\ + \ or onSiteDisplays" + enum: + - all + - sponsoredProducts + - onSiteDisplays + nullable: true + type: string + salesChannel: + default: all + description: "Filter on specific sales channel: offline or online" + enum: + - all + - offline + - online + nullable: true + type: string + format: + default: json-compact + description: Format of the output + enum: + - json + - json-compact + - json-newline + - csv + nullable: true + type: string + reportType: + default: summary + description: "Type of report, if no dimensions/metrics are provided, falls\ + \ back to summary reportType" + enum: + - summary + - pageType + - keyword + - productCategory + - product + - attributedTransactions + - environment + - servedCategory + nullable: true + type: string + clickAttributionWindow: + default: none + description: Click attribution window + enum: + - none + - 7D + - 14D + - 30D + nullable: true + type: string + viewAttributionWindow: + default: none + description: View attribution window + enum: + - none + - 1D + - 7D + - 14D + - 30D + nullable: true + type: string + dimensions: + description: List of dimensions to report on + items: + enum: + - date + - hour + - accountId + - accountName + - campaignId + - campaignName + - campaignTypeName + - lineItemId + - lineItemName + - retailerId + - retailerName + - brandId + - brandName + - advProductCategory + - advProductId + - advProductName + - salesChannel + - environment + - pageTypeName + - pageCategory + - taxonomyBreadcrumb + - keyword + - searchTerm + type: string + nullable: true + type: array + metrics: + description: List of metrics to report on + items: + enum: + - impressions + - clicks + - spend + - attributedSales + - attributedUnits + - attributedOrders + - assistedSales + - assistedUnits + - ctr + - cpc + - cpo + - cpm + - roas + - videoViews + - videosStarted + - videosPlayedTo25 + - videosPlayedTo50 + - videosPlayedTo75 + - videosPlayedTo100 + - videoPlayingRate + - videoCompletionRate + - uniqueVisitors + - frequency + type: string + nullable: true type: array - x-nullable: false - required: - - chosenOptions - type: object - x-nullable: false - ColorVariableValue: - description: A value of a template color variable - example: - color: color - properties: - color: - description: The displayed color (HEX format) - pattern: "^#(([0-9a-fA-F]{2}){3}|([0-9a-fA-F]){3})$" + startDate: + description: Start date + format: date-time + type: string + endDate: + description: End date + format: date-time + type: string + timezone: + default: UTC + description: "Time zone : see criteo developer portal for supported time\ + \ zones" + nullable: true type: string - x-nullable: false required: - - color + - endDate + - startDate type: object - x-nullable: false - FilesVariableValue: - description: "A value of a template file variable (one or several files), like\ - \ images in a creative" + AsyncRevenueReport: + description: Async Revenue report body request example: - assetIds: - - assetIds - - assetIds + advertiserTypes: + - retailer + - retailer + campaignType: all + clickAttributionWindow: none + endDate: 2000-01-23T04:56:07.000+00:00 + timezone: UTC + soldBy: directSold + revenueType: auction + skuRelations: + - sameSku + - sameSku + format: json + salesChannel: all + reportType: advertiser + viewAttributionWindow: none + ids: + - ids + - ids + buyType: auction + id: id + metrics: + - numberOfCampaigns + - numberOfCampaigns + startDate: 2000-01-23T04:56:07.000+00:00 + dimensions: + - date + - date properties: - assetIds: - description: The assets representing the images to be displayed + ids: + description: Supply account ids to report on items: type: string - x-nullable: false - minLength: 1 + nullable: true type: array - x-nullable: false - required: - - assetIds - type: object - x-nullable: false - HyperlinkVariableValue: - description: A value of a template hyperlink variable - example: - url: url - properties: - url: - description: The url to redirect to + id: + description: Supply account id to report on + nullable: true type: string - x-nullable: false - required: - - url - type: object - x-nullable: false - ExternalCatalogRequest: - description: A request for a catalog under the specified format. Currently "json-newline" - is supported. - example: - brandIdFilter: - - brandIdFilter - - brandIdFilter - format: json-newline - properties: - format: - default: json-newline + reportType: + description: Type of report enum: - - json-newline + - advertiser + - environment + - pageType + - productCategory + - brand + nullable: true type: string - x-nullable: false - brandIdFilter: + revenueType: + description: Type of revenue + enum: + - auction + - preferred + nullable: true + type: string + soldBy: + description: "Filter on the seller: Indirect Sold, Direct Sold or Private\ + \ Market" + enum: + - directSold + - indirectSold + - privateMarket + nullable: true + type: string + buyType: + description: "Filter on buy type: Auction, Preferred Deals or Sponsorship" + enum: + - auction + - preferredDeals + - sponsorship + nullable: true + type: string + advertiserTypes: + description: "Filter on the type of advertiser: retailer, brand, seller" items: - format: long-id + enum: + - retailer + - brand + - seller type: string + nullable: true type: array - x-nullable: false - type: object - x-nullable: false - PageTypeEnvironment: - description: The PageType-Environment Tuples for creatives - example: - pageType: Search - environments: - - Web - - Web - properties: - pageType: - description: Creative PageType - enum: - - Search - - Home - - Browse - - Checkout - - Category - - ProductDetail - - Confirmation - - Merchandising - - Deals - type: string - x-nullable: false - environments: - description: List of environments per PageType + skuRelations: + description: "Filter on sku relations: Same SKU, Same Parent SKU, Same Category,\ + \ Same Brand or Same Seller" items: enum: - - Web - - Mobile - - App - - Lockout - - Mixed - - iOS - - Android + - sameSku + - sameParentSku + - sameCategory + - sameBrand + - sameSeller type: string - x-nullable: false + nullable: true type: array - x-nullable: false - type: object - x-nullable: false - Section: - description: Section object that hold template variables - example: - title: title - templateVariables: - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - properties: - title: + format: + description: Format of the output + enum: + - json + - json-compact + - json-newline + - csv + nullable: true type: string - x-nullable: false - templateVariables: + campaignType: + default: all + description: "Filter the type of campaigns to report on: sponsoredProducts\ + \ or onSiteDisplays" + enum: + - all + - sponsoredProducts + - onSiteDisplays + nullable: true + type: string + salesChannel: + default: all + description: "Filter on specific sales channel: offline or online" + enum: + - all + - offline + - online + nullable: true + type: string + clickAttributionWindow: + default: none + description: Click attribution window + enum: + - none + - 7D + - 14D + - 30D + nullable: true + type: string + viewAttributionWindow: + default: none + description: View attribution window + enum: + - none + - 1D + - 7D + - 14D + - 30D + nullable: true + type: string + dimensions: + description: List of dimensions to report on items: - $ref: '#/components/schemas/TemplateVariable' + enum: + - date + - hour + - parentAccount + - accountId + - accountName + - accountTypeName + - advertiserType + - campaignId + - campaignName + - campaignTypeName + - campaignStartDate + - campaignEndDate + - lineItemId + - lineItemName + - lineItemStartDate + - lineItemEndDate + - lineItemStatus + - retailerId + - retailerName + - brandId + - brandName + - placementId + - placementName + - pageTypeName + - environment + - pageCategory + - advProductId + - advProductName + - advProductGtin + - advProductMpn + - buyType + - soldBy + - saleChannel + - attributionSettings + - activityType + - keyword + - skuRelation + - retailerCategoryId + - retailerCategoryName + - taxonomyBreadcrumb + - taxonomy1Id + - taxonomy1Name + - taxonomy2Id + - taxonomy2Name + - taxonomy3Id + - taxonomy3Name + - taxonomy4Id + - taxonomy4Name + - taxonomy5Id + - taxonomy5Name + - taxonomy6Id + - taxonomy6Name + - taxonomy7Id + - taxonomy7Name + type: string + nullable: true type: array - x-nullable: false + metrics: + description: List of metrics to report on + items: + enum: + - numberOfCampaigns + - numberOfLineItems + - numberOfSkus + - skuPrice + - pageViews + - impressions + - productClicks + - placementClicks + - clicks + - sales + - units + - transactions + - assistedSales + - assistedUnits + - revenue + - openAuctionRevenue + - preferredDealsRevenue + - ctr + - cr + - cpc + - cpm + - roas + - workingMedia + - netRevenue + - videoViews + - videosStarted + - videosPlayedTo25 + - videosPlayedTo50 + - videosPlayedTo75 + - videosPlayedTo100 + - videoPlayingRate + - videoCompletionRate + - uniqueVisitors + - frequency + type: string + nullable: true + type: array + startDate: + description: Start date + format: date-time + type: string + endDate: + description: End date + format: date-time + type: string + timezone: + default: UTC + description: "Time zone : see criteo developer portal for supported time\ + \ zones" + nullable: true + type: string required: - - templateVariables - - title + - endDate + - startDate type: object - x-nullable: false - TemplateVariable: - description: A variable in a creative template + ValueResourceOfRetailMediaBrands: + additionalProperties: false + description: A top-level object that encapsulates a Criteo API response for + a single value. example: - choiceVariableSpecification: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null - id: id - minSelected: 9 - id: id - textVariableSpecification: - maxChars: 3 - type: Text - required: true - filesVariablesSpecification: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 + attributes: + brandIds: + - 0 + - 0 + type: type properties: - id: - description: The id of the variable - type: string - x-nullable: false - required: - description: Whether the variable is required - type: boolean - x-nullable: false type: - description: The type of the variable - enum: - - Text - - Choice - - Color - - Files - - Hyperlink + nullable: true type: string - x-nullable: false - choiceVariableSpecification: - $ref: '#/components/schemas/ChoiceVariableSpecification' - textVariableSpecification: - $ref: '#/components/schemas/TextVariableSpecification' - filesVariablesSpecification: - $ref: '#/components/schemas/FilesVariablesSpecification' - required: - - id - - required - - type + attributes: + $ref: '#/components/schemas/RetailMediaBrands' type: object - x-nullable: false - ChoiceVariableSpecification: - description: Specification of choice variable + ResourceOutcomeOfRetailMediaAccount: + additionalProperties: false + description: A top-level object that encapsulates a Criteo API response for + a single entity. example: - maxSelected: 7 - options: - - dependentVariables: - - null - - null - id: id - - dependentVariables: - - null - - null + data: + attributes: + companyName: companyName + parentAccountLabel: parentAccountLabel + name: name + countryIds: + - countryIds + - countryIds + timeZone: timeZone + subType: Unknown + type: Unknown + currencyId: currencyId id: id - minSelected: 9 + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/ResourceOfRetailMediaAccount' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + ValueResourceCollectionOutcomeOfRetailMediaSeller: + additionalProperties: false + description: A top-level object that encapsulates a Criteo API response for + several values. + example: + data: + - attributes: + sellerId: sellerId + retailerId: 0 + type: type + - attributes: + sellerId: sellerId + retailerId: 0 + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title properties: - options: - description: The available options + data: items: - $ref: '#/components/schemas/ChoiceOption' - type: array - x-nullable: false - maxSelected: - description: The maximum number of selectable options - format: int32 - nullable: true - type: integer - x-nullable: true - minSelected: - description: The minimum number of selectable options - format: int32 - nullable: true - type: integer - x-nullable: true - required: - - options - type: object - x-nullable: false - TextVariableSpecification: - description: Specification of a text variable - example: - maxChars: 3 - properties: - maxChars: - description: The maximum amount of characters accepted for the text - format: int32 + $ref: '#/components/schemas/ValueResourceOfRetailMediaSeller' nullable: true - type: integer - x-nullable: true - type: object - x-nullable: false - FilesVariablesSpecification: - description: Specification of a file variable - example: - extensions: - - Unknown - - Unknown - maxFile: 7 - minFiles: 4 - maxBytes: 2 - properties: - extensions: - description: The accepted file extensions - items: - enum: - - Unknown - - Jpeg - - Png - - Gif - - Pdf - type: string - x-nullable: false type: array - x-nullable: false - maxBytes: - description: The maximum amount of bytes per file - format: int32 - nullable: true - type: integer - x-nullable: true - minFiles: - description: The minimum amount of files requires - format: int32 + warnings: + items: + $ref: '#/components/schemas/CommonProblem' nullable: true - type: integer - x-nullable: true - maxFile: - description: The maximum amount of files required - format: int32 + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' nullable: true - type: integer - x-nullable: true - required: - - extensions - - minFiles + readOnly: true + type: array type: object - x-nullable: false - ChoiceOption: - description: An option given in a choice + PageOfBalanceHistoryChangeDataCaptureV1: + additionalProperties: false + description: A wrapper class to return a single page of items with metadata. example: - dependentVariables: - - null - - null - id: id + data: + - dateOfModification: 2000-01-23T04:56:07.000+00:00 + modifiedByUser: modifiedByUser + changeType: BalanceCreated + memo: memo + changeDetails: + changeValue: changeValue + previousValue: previousValue + currentValue: currentValue + - dateOfModification: 2000-01-23T04:56:07.000+00:00 + modifiedByUser: modifiedByUser + changeType: BalanceCreated + memo: memo + changeDetails: + changeValue: changeValue + previousValue: previousValue + currentValue: currentValue + meta: + offset: 6 + count: 0 + limit: 1 properties: - dependentVariables: - description: Template variables unblocked when the option is chosen + meta: + $ref: '#/components/schemas/Metadata' + data: items: - $ref: '#/components/schemas/TemplateVariable' + $ref: '#/components/schemas/BalanceHistoryChangeDataCaptureV1' type: array - x-nullable: false - id: - description: The id of the option - type: string - x-nullable: false required: - - dependentVariables - - id + - data + - meta type: object - x-nullable: false - AsyncReportResponse: - description: Async Report response format + ValueResourceOutcomeOfCampaignBudgetOverrides: + additionalProperties: false + description: A top-level object that encapsulates a Criteo API response for + a single value. example: data: attributes: - fileSizeBytes: 6 - md5CheckSum: md5CheckSum - createdAt: createdAt - rowCount: 0 - id: id - message: message - expiresAt: expiresAt - status: pending - id: id + monthlyBudgetOverrides: + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + dailyBudgetOverrides: + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired type: type warnings: - traceId: traceId @@ -8075,7 +9928,7 @@ components: title: title properties: data: - $ref: '#/components/schemas/StatusResponseResource' + $ref: '#/components/schemas/ValueResourceOfCampaignBudgetOverrides' warnings: items: $ref: '#/components/schemas/CommonProblem' @@ -8089,9 +9942,77 @@ components: readOnly: true type: array type: object - ReportOutcome: - description: The outcome of an API call. + ValueResourceOutcomeOfLineItemBudgetOverrides: + additionalProperties: false + description: A top-level object that encapsulates a Criteo API response for + a single value. + example: + data: + attributes: + monthlyLineItemBudgetOverrides: + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + dailyLineItemBudgetOverrides: + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title properties: + data: + $ref: '#/components/schemas/ValueResourceOfLineItemBudgetOverrides' warnings: items: $ref: '#/components/schemas/CommonProblem' @@ -8105,549 +10026,752 @@ components: readOnly: true type: array type: object - AsyncCampaignsReportRequest: + ValueResourceInputOfRetailMediaBrands: + additionalProperties: false description: A top-level object that encapsulates a Criteo API request for a - single value + single value. example: data: attributes: - campaignType: all - clickAttributionWindow: none - endDate: 2000-01-23T04:56:07.000+00:00 - timezone: UTC - format: json-compact - salesChannel: all - reportType: summary - viewAttributionWindow: none - ids: - - ids - - ids - id: id - metrics: - - impressions - - impressions - startDate: 2000-01-23T04:56:07.000+00:00 - dimensions: - - date - - date + brandIds: + - 0 + - 0 type: type properties: data: - $ref: '#/components/schemas/AsyncCampaignsReportResource' + $ref: '#/components/schemas/ValueResourceOfRetailMediaBrands' type: object - AsyncLineItemsReportRequest: + ValueResourceInputOfRetailMediaBrandAccountCreation: + additionalProperties: false + description: A top-level object that encapsulates a Criteo API request for a + single value. + example: + data: + attributes: + brands: + - 0 + - 0 + companyName: companyName + name: name + type: type + properties: + data: + $ref: '#/components/schemas/ValueResourceOfRetailMediaBrandAccountCreation' + type: object + ValueResourceInputOfRetailMediaSellerAccountCreation: + additionalProperties: false + description: A top-level object that encapsulates a Criteo API request for a + single value. + example: + data: + attributes: + companyName: companyName + name: name + sellers: + - sellerId: sellerId + retailerId: 0 + - sellerId: sellerId + retailerId: 0 + type: type + properties: + data: + $ref: '#/components/schemas/ValueResourceOfRetailMediaSellerAccountCreation' + type: object + ValueResourceCollectionInputOfRetailMediaSeller: + additionalProperties: false + description: A top-level object that encapsulates a Criteo API request for several + values. + example: + data: + - attributes: + sellerId: sellerId + retailerId: 0 + type: type + - attributes: + sellerId: sellerId + retailerId: 0 + type: type + properties: + data: + items: + $ref: '#/components/schemas/ValueResourceOfRetailMediaSeller' + nullable: true + type: array + type: object + ValueResourceInputOfCampaignBudgetOverrides: + additionalProperties: false + description: A top-level object that encapsulates a Criteo API request for a + single value. + example: + data: + attributes: + monthlyBudgetOverrides: + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + dailyBudgetOverrides: + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + type: type + properties: + data: + $ref: '#/components/schemas/ValueResourceOfCampaignBudgetOverrides' + type: object + ValueResourceInputOfLineItemBudgetOverrides: + additionalProperties: false description: A top-level object that encapsulates a Criteo API request for a - single value + single value. example: data: attributes: - campaignType: all - clickAttributionWindow: none - endDate: 2000-01-23T04:56:07.000+00:00 - timezone: UTC - format: json-compact - salesChannel: all - reportType: summary - viewAttributionWindow: none - ids: - - ids - - ids - id: id - metrics: - - impressions - - impressions - startDate: 2000-01-23T04:56:07.000+00:00 - dimensions: - - date - - date + monthlyLineItemBudgetOverrides: + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + dailyLineItemBudgetOverrides: + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired type: type properties: data: - $ref: '#/components/schemas/AsyncLineItemsReportResource' + $ref: '#/components/schemas/ValueResourceOfLineItemBudgetOverrides' type: object - StatusResponseResource: - description: A class that represents a domain entity exposed by an API + RetailMediaBrands: + additionalProperties: false + description: A collection of brand ids + example: + brandIds: + - 0 + - 0 + properties: + brandIds: + items: + format: int64 + type: integer + nullable: true + type: array + type: object + ResourceOfRetailMediaAccount: + additionalProperties: false + description: A class that represents a domain entity exposed by an API. example: attributes: - fileSizeBytes: 6 - md5CheckSum: md5CheckSum - createdAt: createdAt - rowCount: 0 - id: id - message: message - expiresAt: expiresAt - status: pending + companyName: companyName + parentAccountLabel: parentAccountLabel + name: name + countryIds: + - countryIds + - countryIds + timeZone: timeZone + subType: Unknown + type: Unknown + currencyId: currencyId id: id type: type properties: attributes: - $ref: '#/components/schemas/StatusResponse' + $ref: '#/components/schemas/RetailMediaAccount' id: + description: Unique identifier of this resource. nullable: true type: string type: nullable: true type: string type: object - AsyncCampaignsReportResource: - description: A top-level object that encapsulates a Criteo API response for - a single value - example: - attributes: - campaignType: all - clickAttributionWindow: none - endDate: 2000-01-23T04:56:07.000+00:00 - timezone: UTC - format: json-compact - salesChannel: all - reportType: summary - viewAttributionWindow: none - ids: - - ids - - ids - id: id - metrics: - - impressions - - impressions - startDate: 2000-01-23T04:56:07.000+00:00 - dimensions: - - date - - date - type: type - properties: - type: - nullable: true - type: string - attributes: - $ref: '#/components/schemas/AsyncCampaignsReport' - type: object - AsyncLineItemsReportResource: + ValueResourceOfRetailMediaSeller: + additionalProperties: false description: A top-level object that encapsulates a Criteo API response for - a single value + a single value. example: attributes: - campaignType: all - clickAttributionWindow: none - endDate: 2000-01-23T04:56:07.000+00:00 - timezone: UTC - format: json-compact - salesChannel: all - reportType: summary - viewAttributionWindow: none - ids: - - ids - - ids - id: id - metrics: - - impressions - - impressions - startDate: 2000-01-23T04:56:07.000+00:00 - dimensions: - - date - - date + sellerId: sellerId + retailerId: 0 type: type properties: type: nullable: true type: string attributes: - $ref: '#/components/schemas/AsyncLineItemsReport' + $ref: '#/components/schemas/RetailMediaSeller' type: object - StatusResponse: - description: Status of an async report request + Metadata: + additionalProperties: false + description: Metadata related to the current request. example: - fileSizeBytes: 6 - md5CheckSum: md5CheckSum - createdAt: createdAt - rowCount: 0 - id: id - message: message - expiresAt: expiresAt - status: pending + offset: 6 + count: 0 + limit: 1 properties: - status: - enum: - - pending - - success - - failure - - expired + count: + format: int64 nullable: true - type: string - rowCount: + type: integer + offset: + description: The (zero-based) starting offset in the collection. format: int32 - nullable: true type: integer - fileSizeBytes: + limit: + description: The number of elements to be returned. format: int32 - nullable: true type: integer - md5CheckSum: - nullable: true + required: + - limit + - offset + type: object + BalanceHistoryChangeDataCaptureV1: + additionalProperties: false + description: Data model represents the data change capture of balance history. + example: + dateOfModification: 2000-01-23T04:56:07.000+00:00 + modifiedByUser: modifiedByUser + changeType: BalanceCreated + memo: memo + changeDetails: + changeValue: changeValue + previousValue: previousValue + currentValue: currentValue + properties: + dateOfModification: + description: Date when data change has occured. + format: date-time type: string - createdAt: - nullable: true + modifiedByUser: + description: Username who modified the insertion order. type: string - expiresAt: - nullable: true + changeType: + description: Represent the type of change states of the history. + enum: + - BalanceCreated + - BalanceAdded + - BalanceRemoved + - BalanceUncapped + - BalanceCapped + - EndDate + - StartDate + - BalanceName + - PoNumber + - ValueAdd + - Unknown type: string - message: + changeDetails: + $ref: '#/components/schemas/ChangeDetailsV1' + memo: + description: Memo associate with the insertion order modification. nullable: true type: string - id: + required: + - changeDetails + - changeType + - dateOfModification + - modifiedByUser + type: object + ValueResourceOfCampaignBudgetOverrides: + additionalProperties: false + description: A top-level object that encapsulates a Criteo API response for + a single value. + example: + attributes: + monthlyBudgetOverrides: + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + dailyBudgetOverrides: + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + type: type + properties: + type: nullable: true type: string + attributes: + $ref: '#/components/schemas/CampaignBudgetOverrides' type: object - x-criteo-canonical: - infoType: entity - AsyncCampaignsReport: - description: Async Campaigns report body request + ValueResourceOfLineItemBudgetOverrides: + additionalProperties: false + description: A top-level object that encapsulates a Criteo API response for + a single value. example: - campaignType: all - clickAttributionWindow: none - endDate: 2000-01-23T04:56:07.000+00:00 - timezone: UTC - format: json-compact - salesChannel: all - reportType: summary - viewAttributionWindow: none - ids: - - ids - - ids - id: id - metrics: - - impressions - - impressions - startDate: 2000-01-23T04:56:07.000+00:00 - dimensions: - - date - - date + attributes: + monthlyLineItemBudgetOverrides: + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + dailyLineItemBudgetOverrides: + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + type: type properties: - ids: - description: Campaign ids to report on - items: - type: string - nullable: true - type: array - id: - description: Campaign id to report on + type: nullable: true type: string - campaignType: - default: all - description: "Filter the type of campaigns to report on: sponsoredProducts\ - \ or onSiteDisplays" - enum: - - all - - sponsoredProducts - - onSiteDisplays + attributes: + $ref: '#/components/schemas/LineItemBudgetOverrides' + type: object + ValueResourceOfRetailMediaBrandAccountCreation: + additionalProperties: false + description: A top-level object that encapsulates a Criteo API response for + a single value. + example: + attributes: + brands: + - 0 + - 0 + companyName: companyName + name: name + type: type + properties: + type: nullable: true type: string - salesChannel: - default: all - description: "Filter on specific sales channel: offline or online" - enum: - - all - - offline - - online + attributes: + $ref: '#/components/schemas/RetailMediaBrandAccountCreation' + type: object + ValueResourceOfRetailMediaSellerAccountCreation: + additionalProperties: false + description: A top-level object that encapsulates a Criteo API response for + a single value. + example: + attributes: + companyName: companyName + name: name + sellers: + - sellerId: sellerId + retailerId: 0 + - sellerId: sellerId + retailerId: 0 + type: type + properties: + type: nullable: true type: string - format: - default: json-compact - description: Format of the output - enum: - - json - - json-compact - - json-newline - - csv + attributes: + $ref: '#/components/schemas/RetailMediaSellerAccountCreation' + type: object + RetailMediaAccount: + additionalProperties: false + description: The details for a newly created account + example: + companyName: companyName + parentAccountLabel: parentAccountLabel + name: name + countryIds: + - countryIds + - countryIds + timeZone: timeZone + subType: Unknown + type: Unknown + currencyId: currencyId + properties: + name: + description: account name nullable: true type: string - reportType: - default: summary - description: "Type of report, if no dimensions/metrics are provided, falls\ - \ back to summary reportType" - enum: - - summary - - pageType - - keyword - - productCategory - - product - - attributedTransactions - - environment - - servedCategory + companyName: + description: Display name for reporting the owning entity of ads for the + Digital Services Act in the European Union nullable: true type: string - clickAttributionWindow: - default: none - description: Click attribution window + type: + description: Type for the account enum: - - none - - 7D - - 14D - - 30D + - Unknown + - Supply + - Demand nullable: true type: string - viewAttributionWindow: - default: none - description: View attribution window + subType: + description: subtype for the account enum: - - none - - 1D - - 7D - - 14D - - 30D + - Unknown + - Brand + - Seller nullable: true type: string - dimensions: - description: List of dimensions to report on + countryIds: + description: list of countries associated with the account items: - enum: - - date - - hour - - accountId - - accountName - - campaignId - - campaignName - - campaignTypeName - - lineItemId - - lineItemName - - retailerId - - retailerName - - brandId - - brandName - - advProductCategory - - advProductId - - advProductName - - salesChannel - - environment - - pageTypeName - - keyword - - searchTerm type: string nullable: true type: array - metrics: - description: List of metrics to report on - items: - enum: - - impressions - - clicks - - spend - - attributedSales - - attributedUnits - - attributedOrders - - assistedSales - - assistedUnits - - ctr - - cpc - - cpo - - cpm - - roas - - videoViews - - videosStarted - - videosPlayedTo25 - - videosPlayedTo50 - - videosPlayedTo75 - - videosPlayedTo100 - - videoPlayingRate - - videoCompletionRate - - uniqueVisitors - - frequency - type: string + currencyId: + description: the currency for the account nullable: true - type: array - startDate: - description: Start date - format: date-time type: string - endDate: - description: End date - format: date-time + parentAccountLabel: + description: parent account label for the account + nullable: true type: string - timezone: - default: UTC - description: "Time zone : see criteo developer portal for supported time\ - \ zones" + timeZone: + description: the timezone for the account + nullable: true + type: string + type: object + RetailMediaSeller: + additionalProperties: false + description: used to define the exact seller linked with an account + example: + sellerId: sellerId + retailerId: 0 + properties: + sellerId: + description: the seller id + nullable: true + type: string + retailerId: + description: the retailer id + format: int32 + nullable: true + type: integer + type: object + ChangeDetailsV1: + additionalProperties: false + description: Change details of a property of the balance. + example: + changeValue: changeValue + previousValue: previousValue + currentValue: currentValue + properties: + previousValue: + description: Previous value of a property of the insertion order. + nullable: true + type: string + currentValue: + description: Current value of a property of the insertion order. + nullable: true + type: string + changeValue: + description: Change detail of a property of the insertion order. nullable: true type: string required: - - endDate - - startDate + - changeValue + - currentValue + - previousValue type: object - AsyncLineItemsReport: - description: Async Line Items report body request + CampaignBudgetOverrides: + additionalProperties: false + description: Campaign budget overrides including Monthly and Daily budget overrides. + example: + monthlyBudgetOverrides: + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + dailyBudgetOverrides: + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + properties: + monthlyBudgetOverrides: + description: "Campaign budget override monthly part, chronological order\ + \ restricted." + items: + $ref: '#/components/schemas/CampaignMonthlyBudgetOverride' + type: array + dailyBudgetOverrides: + description: "Campaign budget override daily part, chronological order restricted." + items: + $ref: '#/components/schemas/CampaignDailyBudgetOverride' + type: array + required: + - dailyBudgetOverrides + - monthlyBudgetOverrides + type: object + LineItemBudgetOverrides: + additionalProperties: false + description: Line item budget overrides including Monthly and Daily budget overrides. + example: + monthlyLineItemBudgetOverrides: + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + dailyLineItemBudgetOverrides: + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + - duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + properties: + monthlyLineItemBudgetOverrides: + description: "Line item budget override monthly part, chronological order\ + \ restricted." + items: + $ref: '#/components/schemas/MonthlyLineItemBudegetOverride' + type: array + dailyLineItemBudgetOverrides: + description: "Line item budget override daily part, chronological order\ + \ restricted." + items: + $ref: '#/components/schemas/DailyLineItemBudgetOverride' + type: array + required: + - dailyLineItemBudgetOverrides + - monthlyLineItemBudgetOverrides + type: object + RetailMediaBrandAccountCreation: + additionalProperties: false + description: the initial set up and configuration options for a new private + market demand brand account example: - campaignType: all - clickAttributionWindow: none - endDate: 2000-01-23T04:56:07.000+00:00 - timezone: UTC - format: json-compact - salesChannel: all - reportType: summary - viewAttributionWindow: none - ids: - - ids - - ids - id: id - metrics: - - impressions - - impressions - startDate: 2000-01-23T04:56:07.000+00:00 - dimensions: - - date - - date + brands: + - 0 + - 0 + companyName: companyName + name: name properties: - ids: - description: Line Item ids to report on + name: + description: "the name of the account, must be unique across all accounts" + nullable: true + type: string + companyName: + description: Display name for reporting the owning entity of ads for the + Digital Services Act in the European Union + nullable: true + type: string + brands: + description: list of brands to link to the new account items: - type: string + format: int64 + type: integer nullable: true type: array - id: - description: Line Item id to report on + type: object + RetailMediaSellerAccountCreation: + additionalProperties: false + description: the initial set up and configuration options for a new private + market demand brand account + example: + companyName: companyName + name: name + sellers: + - sellerId: sellerId + retailerId: 0 + - sellerId: sellerId + retailerId: 0 + properties: + name: + description: "the name of the account, must be unique across all accounts" nullable: true type: string - campaignType: - default: all - description: "Filter the type of campaigns to report on: sponsoredProducts\ - \ or onSiteDisplays" - enum: - - all - - sponsoredProducts - - onSiteDisplays + companyName: + description: Display name for reporting the owning entity of ads for the + Digital Services Act in the European Union nullable: true type: string - salesChannel: - default: all - description: "Filter on specific sales channel: offline or online" - enum: - - all - - offline - - online + sellers: + description: list of sellers to associate to the new account + items: + $ref: '#/components/schemas/RetailMediaSeller' nullable: true - type: string - format: - default: json-compact - description: Format of the output - enum: - - json - - json-compact - - json-newline - - csv + type: array + type: object + CampaignMonthlyBudgetOverride: + additionalProperties: false + description: Campaign monthly budget override. + example: + duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + properties: + startMonth: + description: "Monthly budget override start month, format \"yyyy-MM\". If\ + \ it is null, the StartMonth would be the following month of the last\ + \ item in the override sequence." + format: date-time nullable: true type: string - reportType: - default: summary - description: "Type of report, if no dimensions/metrics are provided, falls\ - \ back to summary reportType" + duration: + description: "The number of MONTHs that the override is active from StartMonth,\ + \ e.g. \"1M\". Must end with 'M' or 'm'." + type: string + maxMonthlySpend: + description: Monthly budget override maximum monthly spend amount. + format: double + type: number + status: + description: Monthly budget override computed status. enum: - - summary - - pageType - - keyword - - productCategory - - product - - attributedTransactions - - environment - - servedCategory + - Expired + - Active + - Upcoming nullable: true type: string - clickAttributionWindow: - default: none - description: Click attribution window - enum: - - none - - 7D - - 14D - - 30D + required: + - duration + - maxMonthlySpend + type: object + CampaignDailyBudgetOverride: + additionalProperties: false + description: Campaign daily budget override. + example: + duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + properties: + startDate: + description: "Daily budget override start date, format \"yyyy-MM-dd\". If\ + \ it is null, the StartDate would be the following date of the last item\ + \ in the override sequence." + format: date-time nullable: true type: string - viewAttributionWindow: - default: none - description: View attribution window + duration: + description: "The number of DAYs that the override is active from StartDate,\ + \ e.g. \"1D\". Must end with 'D' or 'd'." + type: string + maxDailySpend: + description: Daily budget override maximum daily spend amount. + format: double + type: number + status: + description: Daily budget override computed status. enum: - - none - - 1D - - 7D - - 14D - - 30D + - Expired + - Active + - Upcoming nullable: true type: string - dimensions: - description: List of dimensions to report on - items: - enum: - - date - - hour - - accountId - - accountName - - campaignId - - campaignName - - campaignTypeName - - lineItemId - - lineItemName - - retailerId - - retailerName - - brandId - - brandName - - advProductCategory - - advProductId - - advProductName - - salesChannel - - environment - - pageTypeName - - keyword - - searchTerm - type: string + required: + - duration + - maxDailySpend + type: object + MonthlyLineItemBudegetOverride: + additionalProperties: false + description: The details for a monthly budget override + example: + duration: duration + maxMonthlySpend: 0.8008281904610115 + startMonth: 2000-01-23T04:56:07.000+00:00 + status: Expired + properties: + startMonth: + description: "Monthly budget override start month, format \"yyyy-MM\". If\ + \ it is null, the StartMonth would be the following month of the last\ + \ item in the override sequence." + format: date-time nullable: true - type: array - metrics: - description: List of metrics to report on - items: - enum: - - impressions - - clicks - - spend - - attributedSales - - attributedUnits - - attributedOrders - - assistedSales - - assistedUnits - - ctr - - cpc - - cpo - - cpm - - roas - - videoViews - - videosStarted - - videosPlayedTo25 - - videosPlayedTo50 - - videosPlayedTo75 - - videosPlayedTo100 - - videoPlayingRate - - videoCompletionRate - - uniqueVisitors - - frequency - type: string + type: string + duration: + description: "The number of MONTHs that the override is active from StartMonth,\ + \ e.g. \"1M\". Must end with 'M' or 'm'." + type: string + maxMonthlySpend: + description: Monthly budget override maximum monthly spend amount. + format: double + type: number + status: + description: Monthly budget override computed status. + enum: + - Expired + - Active + - Upcoming nullable: true - type: array + type: string + required: + - duration + - maxMonthlySpend + type: object + DailyLineItemBudgetOverride: + additionalProperties: false + description: The details for a daily budget override + example: + duration: duration + maxDailySpend: 6.027456183070403 + startDate: 2000-01-23T04:56:07.000+00:00 + status: Expired + properties: startDate: - description: Start date + description: "Daily budget override start date, format \"yyyy-MM-dd\". If\ + \ it is null, the StartDate would be the following date of the last item\ + \ in the override sequence." format: date-time + nullable: true type: string - endDate: - description: End date - format: date-time + duration: + description: "The number of DAYs that the override is active from StartDate,\ + \ e.g. \"1D\". Must end with 'D' or 'd'." type: string - timezone: - default: UTC - description: "Time zone : see criteo developer portal for supported time\ - \ zones" + maxDailySpend: + description: Daily budget override maximum daily spend amount. + format: double + nullable: true + type: number + status: + description: Daily budget override computed status. + enum: + - Expired + - Active + - Upcoming nullable: true type: string required: - - endDate - - startDate + - duration type: object - Balance202110PagedListResponse: + BalanceResponsePagedListResponse: description: Data model for a paged list of response resources example: metadata: @@ -8659,28 +10783,36 @@ components: currentPageIndex: 1 data: - attributes: - createdAt: 2000-01-23T04:56:07.000+00:00 + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 - name: name memo: memo - poNumber: poNumber + spendType: Onsite remaining: 1.4658129805029452 + salesForceId: salesForceId + createdAt: 2000-01-23T04:56:07.000+00:00 + balanceType: unknown + name: name + poNumber: poNumber startDate: 2000-01-23 status: unknown updatedAt: 2000-01-23T04:56:07.000+00:00 id: id type: type - attributes: - createdAt: 2000-01-23T04:56:07.000+00:00 + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 - name: name memo: memo - poNumber: poNumber + spendType: Onsite remaining: 1.4658129805029452 + salesForceId: salesForceId + createdAt: 2000-01-23T04:56:07.000+00:00 + balanceType: unknown + name: name + poNumber: poNumber startDate: 2000-01-23 status: unknown updatedAt: 2000-01-23T04:56:07.000+00:00 @@ -8733,18 +10865,99 @@ components: $ref: '#/components/schemas/PageMetadata' data: items: - $ref: '#/components/schemas/ResourceOfBalance202110' + $ref: '#/components/schemas/ResourceOfBalanceResponse' type: array x-nullable: false warnings: items: - $ref: '#/components/schemas/ProblemDetails' + $ref: '#/components/schemas/CommonProblem' readOnly: true type: array x-nullable: false errors: items: - $ref: '#/components/schemas/ProblemDetails' + $ref: '#/components/schemas/CommonProblem' + readOnly: true + type: array + x-nullable: false + type: object + x-nullable: false + BalanceResponse: + description: Data model for response resource + example: + data: + attributes: + privateMarketBillingType: NotApplicable + endDate: 2000-01-23 + deposited: 0.8008281904610115 + spent: 6.027456183070403 + memo: memo + spendType: Onsite + remaining: 1.4658129805029452 + salesForceId: salesForceId + createdAt: 2000-01-23T04:56:07.000+00:00 + balanceType: unknown + name: name + poNumber: poNumber + startDate: 2000-01-23 + status: unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/ResourceOfBalanceResponse' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + readOnly: true + type: array + x-nullable: false + errors: + items: + $ref: '#/components/schemas/CommonProblem' readOnly: true type: array x-nullable: false @@ -10143,19 +12356,87 @@ components: title: title properties: data: - $ref: '#/components/schemas/ValueTypeResourceOfStoreTarget202110' - warnings: - items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true - type: array - x-nullable: false - errors: - items: - $ref: '#/components/schemas/ProblemDetails' - readOnly: true - type: array - x-nullable: false + $ref: '#/components/schemas/ValueTypeResourceOfStoreTarget202110' + warnings: + items: + $ref: '#/components/schemas/ProblemDetails' + readOnly: true + type: array + x-nullable: false + errors: + items: + $ref: '#/components/schemas/ProblemDetails' + readOnly: true + type: array + x-nullable: false + type: object + x-nullable: false + CreateBalanceRequest: + description: Data model for an input resource + example: + data: + attributes: + salesForceId: salesForceId + endDate: 2000-01-23 + deposited: 0.8008281904610115 + name: name + memo: memo + poNumber: poNumber + spendType: Onsite + startDate: 2000-01-23 + id: id + type: type + properties: + data: + $ref: '#/components/schemas/ResourceOfCreateBalance' + type: object + x-nullable: false + UpdateBalanceModelRequest: + description: Data model for an input resource + example: + data: + attributes: + salesForceId: salesForceId + endDate: 2000-01-23 + name: name + memo: memo + poNumber: poNumber + startDate: 2000-01-23 + id: id + type: type + properties: + data: + $ref: '#/components/schemas/ResourceOfUpdateBalanceModel' + type: object + x-nullable: false + AddFundsToBalanceRequest: + description: Data model for an input resource + example: + data: + attributes: + deltaAmount: 0.8008281904610115 + memo: memo + poNumber: poNumber + id: id + type: type + properties: + data: + $ref: '#/components/schemas/ResourceOfAddFundsToBalance' + type: object + x-nullable: false + ChangeDatesOfBalanceRequest: + description: Data model for an input resource + example: + data: + attributes: + endDate: 2000-01-23 + memo: memo + startDate: 2000-01-23 + id: id + type: type + properties: + data: + $ref: '#/components/schemas/ResourceOfChangeDatesOfBalance' type: object x-nullable: false PostCampaignV202301: @@ -10486,24 +12767,30 @@ components: $ref: '#/components/schemas/ValueTypeResourceOfStoreIdsUpdateModel202110' type: object x-nullable: false - ResourceOfBalance202110: - description: A class that represents an entity in a guild compliant way + ResourceOfBalanceResponse: + description: Data model for a Resource example: attributes: - createdAt: 2000-01-23T04:56:07.000+00:00 + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 - name: name memo: memo - poNumber: poNumber + spendType: Onsite remaining: 1.4658129805029452 + salesForceId: salesForceId + createdAt: 2000-01-23T04:56:07.000+00:00 + balanceType: unknown + name: name + poNumber: poNumber startDate: 2000-01-23 status: unknown updatedAt: 2000-01-23T04:56:07.000+00:00 id: id type: type properties: + attributes: + $ref: '#/components/schemas/ExternalBalanceResponse' id: description: Id of the entity nullable: true @@ -10512,8 +12799,6 @@ components: description: Canonical type name of the entity nullable: true type: string - attributes: - $ref: '#/components/schemas/ExternalBalance202110' type: object x-nullable: false JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301: @@ -10841,6 +13126,102 @@ components: $ref: '#/components/schemas/ExternalStoreTarget202110' type: object x-nullable: false + ResourceOfCreateBalance: + description: Data model for a Resource + example: + attributes: + salesForceId: salesForceId + endDate: 2000-01-23 + deposited: 0.8008281904610115 + name: name + memo: memo + poNumber: poNumber + spendType: Onsite + startDate: 2000-01-23 + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/ExternalCreateBalance' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + nullable: true + type: string + type: object + x-nullable: false + ResourceOfUpdateBalanceModel: + description: Data model for a Resource + example: + attributes: + salesForceId: salesForceId + endDate: 2000-01-23 + name: name + memo: memo + poNumber: poNumber + startDate: 2000-01-23 + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/ExternalUpdateBalanceModel' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + nullable: true + type: string + type: object + x-nullable: false + ResourceOfAddFundsToBalance: + description: Data model for a Resource + example: + attributes: + deltaAmount: 0.8008281904610115 + memo: memo + poNumber: poNumber + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/ExternalAddFundsToBalance' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + nullable: true + type: string + type: object + x-nullable: false + ResourceOfChangeDatesOfBalance: + description: Data model for a Resource + example: + attributes: + endDate: 2000-01-23 + memo: memo + startDate: 2000-01-23 + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/ExternalChangeDatesOfBalance' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + nullable: true + type: string + type: object + x-nullable: false JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301: description: "A JSON:API wrapper class to format a with Type, and\r\nAttributes properties" @@ -11086,67 +13467,64 @@ components: $ref: '#/components/schemas/ExternalStoreIdsUpdateModel202110' type: object x-nullable: false - ExternalBalance202110: + ExternalBalanceResponse: description: A Retail Media Balance used to determine the funds available for any or all campaigns in an account example: - createdAt: 2000-01-23T04:56:07.000+00:00 + privateMarketBillingType: NotApplicable endDate: 2000-01-23 deposited: 0.8008281904610115 spent: 6.027456183070403 - name: name memo: memo - poNumber: poNumber + spendType: Onsite remaining: 1.4658129805029452 + salesForceId: salesForceId + createdAt: 2000-01-23T04:56:07.000+00:00 + balanceType: unknown + name: name + poNumber: poNumber startDate: 2000-01-23 status: unknown updatedAt: 2000-01-23T04:56:07.000+00:00 properties: name: + description: Name of the balance. type: string x-nullable: false poNumber: + description: Purchase Order number. type: string x-nullable: false memo: + description: Memo type: string x-nullable: false deposited: + description: Amount of billable funds allotted to the balance. format: decimal nullable: true - required: - - "false" type: number x-nullable: true spent: format: decimal nullable: true - required: - - "false" type: number x-nullable: true remaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true startDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string - x-nullable: false endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - nullable: true type: string - x-nullable: true status: enum: - unknown @@ -11163,13 +13541,47 @@ components: format: date-time type: string x-nullable: false + balanceType: + description: Type of the balance + enum: + - unknown + - capped + - uncapped + type: string + x-nullable: false + salesForceId: + description: SalesForceId the balance is linked to. + type: string + x-nullable: false + spendType: + description: Spend Type of the balance. + enum: + - Onsite + - Offsite + - OffsiteAwareness + type: string + x-nullable: false + privateMarketBillingType: + description: Billing type for Private Market. + enum: + - NotApplicable + - BillByRetailer + - BillByCriteo + - Unknown + type: string + x-nullable: false required: + - balanceType - createdAt - deposited + - endDate - memo - name - poNumber + - privateMarketBillingType - remaining + - salesForceId + - spendType - spent - startDate - status @@ -11219,15 +13631,11 @@ components: budgetSpent: format: decimal nullable: true - required: - - "false" type: number x-nullable: true budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true status: @@ -11289,22 +13697,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -11388,8 +13790,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -11417,8 +13817,6 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true campaignId: @@ -11432,8 +13830,6 @@ components: budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true createdAt: @@ -11486,8 +13882,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -11498,29 +13892,21 @@ components: maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true bidStrategy: @@ -11552,8 +13938,6 @@ components: targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -11571,8 +13955,6 @@ components: budgetRemaining: format: decimal nullable: true - required: - - "false" type: number x-nullable: true createdAt: @@ -11658,15 +14040,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: @@ -11793,8 +14171,6 @@ components: bidOverride: format: decimal nullable: true - required: - - "false" type: number x-nullable: true type: object @@ -11892,6 +14268,165 @@ components: - storeIds type: object x-nullable: false + ExternalCreateBalance: + description: An object that represents the available options to set when creating + a Retail Media Balance + example: + salesForceId: salesForceId + endDate: 2000-01-23 + deposited: 0.8008281904610115 + name: name + memo: memo + poNumber: poNumber + spendType: Onsite + startDate: 2000-01-23 + properties: + name: + description: Name of the balance. + type: string + x-nullable: false + poNumber: + description: Purchase Order number. + type: string + x-nullable: false + deposited: + description: Amount of billable funds allotted to the balance. + format: decimal + nullable: true + type: number + x-nullable: true + startDate: + description: "Represents the Date as a year, month, and day in the format\ + \ YYYY-MM-DD" + format: date + type: string + endDate: + description: "Represents the Date as a year, month, and day in the format\ + \ YYYY-MM-DD" + format: date + type: string + spendType: + description: Type of the balance spend. + enum: + - Onsite + - Offsite + - OffsiteAwareness + type: string + x-nullable: false + memo: + description: Memo + type: string + x-nullable: false + salesForceId: + description: SalesForceId the balance is linked to. + type: string + x-nullable: false + required: + - deposited + - endDate + - memo + - name + - salesForceId + - spendType + - startDate + type: object + x-nullable: false + ExternalUpdateBalanceModel: + description: An object that represents the available options to set when updating + a Retail Media Balance + example: + salesForceId: salesForceId + endDate: 2000-01-23 + name: name + memo: memo + poNumber: poNumber + startDate: 2000-01-23 + properties: + name: + description: Name of the balance. + type: string + x-nullable: false + poNumber: + description: Purchase Order number. + type: string + x-nullable: false + salesForceId: + description: SalesForceId the balance is linked to. + type: string + x-nullable: false + startDate: + description: "Represents the Date as a year, month, and day in the format\ + \ YYYY-MM-DD" + format: date + nullable: true + type: string + endDate: + description: "Represents the Date as a year, month, and day in the format\ + \ YYYY-MM-DD" + format: date + nullable: true + type: string + memo: + description: Memo + type: string + x-nullable: false + type: object + x-nullable: false + ExternalAddFundsToBalance: + description: An object that represents the available options of adding funds + to a balance. + example: + deltaAmount: 0.8008281904610115 + memo: memo + poNumber: poNumber + properties: + deltaAmount: + description: Amount of billable funds to be added / decreased allotted to + the balance. + format: double + type: number + x-nullable: false + poNumber: + description: Purchase Order number. + type: string + x-nullable: false + memo: + description: Memo + type: string + x-nullable: false + required: + - deltaAmount + - memo + type: object + x-nullable: false + ExternalChangeDatesOfBalance: + description: An object that represents the available options to modify schedule + of a balance. + example: + endDate: 2000-01-23 + memo: memo + startDate: 2000-01-23 + properties: + startDate: + description: "Represents the Date as a year, month, and day in the format\ + \ YYYY-MM-DD" + format: date + type: string + endDate: + description: "Represents the Date as a year, month, and day in the format\ + \ YYYY-MM-DD" + format: date + type: string + memo: + description: Memo + type: string + x-nullable: false + required: + - endDate + - memo + - startDate + type: object + x-nullable: false CampaignAttributesV202301: description: An object that represents the available options to set when creating a Retail Media Campaign @@ -11955,22 +14490,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -12039,8 +14568,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -12064,36 +14591,26 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -12141,8 +14658,6 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ @@ -12170,36 +14685,26 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true targetBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true maxBid: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -12255,15 +14760,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: @@ -12337,22 +14838,16 @@ components: budget: format: decimal nullable: true - required: - - "false" type: number x-nullable: true monthlyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true dailyPacing: format: decimal nullable: true - required: - - "false" type: number x-nullable: true isAutoDailyPacing: @@ -12450,15 +14945,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: enum: diff --git a/sdks/retailmedia_2023-04/build.gradle b/sdks/retailmedia_2024-07/build.gradle similarity index 97% rename from sdks/retailmedia_2023-04/build.gradle rename to sdks/retailmedia_2024-07/build.gradle index f70c7628..3c3d438e 100644 --- a/sdks/retailmedia_2023-04/build.gradle +++ b/sdks/retailmedia_2024-07/build.gradle @@ -23,7 +23,7 @@ if (JavaVersion.current().isJava8Compatible()) { } group = 'com.criteo' -version = '2023.04.0.240626' +version = '2024.07.0.240731' repositories { jcenter() @@ -74,7 +74,7 @@ publishing { mavenJava(MavenPublication) { groupId 'com.criteo' artifactId 'criteo-api-retailmedia-sdk' - version '2023.04.0.240626' + version '2024.07.0.240731' from components.java artifact sourcesJar artifact javadocJar @@ -82,7 +82,7 @@ publishing { pom { packaging = 'jar' name = 'com.criteo:criteo-api-retailmedia-sdk' - description = 'JAVA SDK for Criteo API retailmedia for 2023_04 version' + description = 'JAVA SDK for Criteo API retailmedia for 2024_07 version' url = 'https://github.com/criteo/criteo-api-java-sdk' licenses { license { diff --git a/sdks/marketingsolutions_2023-04/docs/AudienceApi.md b/sdks/retailmedia_2024-07/docs/AccountsApi.md similarity index 53% rename from sdks/marketingsolutions_2023-04/docs/AudienceApi.md rename to sdks/retailmedia_2024-07/docs/AccountsApi.md index babf66b2..918f6544 100644 --- a/sdks/marketingsolutions_2023-04/docs/AudienceApi.md +++ b/sdks/retailmedia_2024-07/docs/AccountsApi.md @@ -1,38 +1,38 @@ -# AudienceApi +# AccountsApi All URIs are relative to *https://api.criteo.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createAudience**](AudienceApi.md#createAudience) | **POST** /2023-04/audiences | | -| [**deleteIdentifiers**](AudienceApi.md#deleteIdentifiers) | **DELETE** /2023-04/audiences/{audience-id}/contactlist | | -| [**getAudiences**](AudienceApi.md#getAudiences) | **GET** /2023-04/audiences | | -| [**modifyAudience**](AudienceApi.md#modifyAudience) | **PATCH** /2023-04/audiences/{audience-id} | | -| [**modifyAudienceUsers**](AudienceApi.md#modifyAudienceUsers) | **PATCH** /2023-04/audiences/{audience-id}/contactlist | | -| [**removeAudience**](AudienceApi.md#removeAudience) | **DELETE** /2023-04/audiences/{audience-id} | | +| [**addBrands**](AccountsApi.md#addBrands) | **POST** /2024-07/retail-media/account-management/accounts/{accountId}/brands/add | | +| [**createPrivateMarketDemandBrandAccount**](AccountsApi.md#createPrivateMarketDemandBrandAccount) | **POST** /2024-07/retail-media/account-management/accounts/{accountId}/create-brand-account | | +| [**createPrivateMarketDemandSellerAccount**](AccountsApi.md#createPrivateMarketDemandSellerAccount) | **POST** /2024-07/retail-media/account-management/accounts/{accountId}/create-seller-account | | +| [**getApiV1ExternalAccounts**](AccountsApi.md#getApiV1ExternalAccounts) | **GET** /2024-07/retail-media/accounts | | +| [**removeBrands**](AccountsApi.md#removeBrands) | **POST** /2024-07/retail-media/account-management/accounts/{accountId}/brands/remove | | +| [**updateSellers**](AccountsApi.md#updateSellers) | **PUT** /2024-07/retail-media/account-management/accounts/{accountId}/sellers | | -## createAudience +## addBrands -> NewAudienceResponse createAudience(newAudienceRequest) +> ValueResourceOfRetailMediaBrands addBrands(accountId, valueResourceInputOfRetailMediaBrands) -Create an Audience for an Advertiser +Add brands to an account ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.AudienceApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AccountsApi; public class Example { public static void main(String[] args) { @@ -59,13 +59,14 @@ public class Example { // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); // oauth.setAccessToken("YOUR ACCESS TOKEN"); - AudienceApi apiInstance = new AudienceApi(defaultClient); - NewAudienceRequest newAudienceRequest = new NewAudienceRequest(); // NewAudienceRequest | + AccountsApi apiInstance = new AccountsApi(defaultClient); + String accountId = "accountId_example"; // String | the account id to update + ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands = new ValueResourceInputOfRetailMediaBrands(); // ValueResourceInputOfRetailMediaBrands | brands to associate to account try { - NewAudienceResponse result = apiInstance.createAudience(newAudienceRequest); + ValueResourceOfRetailMediaBrands result = apiInstance.addBrands(accountId, valueResourceInputOfRetailMediaBrands); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AudienceApi#createAudience"); + System.err.println("Exception when calling AccountsApi#addBrands"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -80,11 +81,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **newAudienceRequest** | [**NewAudienceRequest**](NewAudienceRequest.md)| | | +| **accountId** | **String**| the account id to update | | +| **valueResourceInputOfRetailMediaBrands** | [**ValueResourceInputOfRetailMediaBrands**](ValueResourceInputOfRetailMediaBrands.md)| brands to associate to account | [optional] | ### Return type -[**NewAudienceResponse**](NewAudienceResponse.md) +[**ValueResourceOfRetailMediaBrands**](ValueResourceOfRetailMediaBrands.md) ### Authorization @@ -92,37 +94,36 @@ public class Example { ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | The audience was created | - | -| **403** | Forbidden | - | +| **200** | Success | - | -## deleteIdentifiers +## createPrivateMarketDemandBrandAccount -> DeleteAudienceContactListResponse deleteIdentifiers(audienceId) +> ResourceOutcomeOfRetailMediaAccount createPrivateMarketDemandBrandAccount(accountId, valueResourceInputOfRetailMediaBrandAccountCreation) -Delete all identifiers from a contact list audience-segment. +Creates a new child Demand Brand Account for the provided parent private market account ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.AudienceApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AccountsApi; public class Example { public static void main(String[] args) { @@ -149,13 +150,14 @@ public class Example { // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); // oauth.setAccessToken("YOUR ACCESS TOKEN"); - AudienceApi apiInstance = new AudienceApi(defaultClient); - String audienceId = "audienceId_example"; // String | The id of the audience to amend + AccountsApi apiInstance = new AccountsApi(defaultClient); + String accountId = "accountId_example"; // String | Account Id for the parent private market account + ValueResourceInputOfRetailMediaBrandAccountCreation valueResourceInputOfRetailMediaBrandAccountCreation = new ValueResourceInputOfRetailMediaBrandAccountCreation(); // ValueResourceInputOfRetailMediaBrandAccountCreation | Initial creation and configuration options for the new account try { - DeleteAudienceContactListResponse result = apiInstance.deleteIdentifiers(audienceId); + ResourceOutcomeOfRetailMediaAccount result = apiInstance.createPrivateMarketDemandBrandAccount(accountId, valueResourceInputOfRetailMediaBrandAccountCreation); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AudienceApi#deleteIdentifiers"); + System.err.println("Exception when calling AccountsApi#createPrivateMarketDemandBrandAccount"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -170,11 +172,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **audienceId** | **String**| The id of the audience to amend | | +| **accountId** | **String**| Account Id for the parent private market account | | +| **valueResourceInputOfRetailMediaBrandAccountCreation** | [**ValueResourceInputOfRetailMediaBrandAccountCreation**](ValueResourceInputOfRetailMediaBrandAccountCreation.md)| Initial creation and configuration options for the new account | [optional] | ### Return type -[**DeleteAudienceContactListResponse**](DeleteAudienceContactListResponse.md) +[**ResourceOutcomeOfRetailMediaAccount**](ResourceOutcomeOfRetailMediaAccount.md) ### Authorization @@ -182,37 +185,36 @@ public class Example { ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | The contactlist was deleted | - | -| **403** | Forbidden | - | +| **201** | Success | - | -## getAudiences +## createPrivateMarketDemandSellerAccount -> GetAudiencesResponse getAudiences(advertiserId) +> ResourceOutcomeOfRetailMediaAccount createPrivateMarketDemandSellerAccount(accountId, valueResourceInputOfRetailMediaSellerAccountCreation) -Get a list of all the audiences for the user or for the given advertiser_id +Creates a new child Demand Seller Account for the provided parent private market account ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.AudienceApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AccountsApi; public class Example { public static void main(String[] args) { @@ -239,13 +241,14 @@ public class Example { // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); // oauth.setAccessToken("YOUR ACCESS TOKEN"); - AudienceApi apiInstance = new AudienceApi(defaultClient); - String advertiserId = "advertiserId_example"; // String | The advertiser id to get all the audiences for. Mandatory for internal users. For external users, if you don't provide it, we will take into account the advertisers from your portfolio + AccountsApi apiInstance = new AccountsApi(defaultClient); + String accountId = "accountId_example"; // String | Account Id for the parent private market account + ValueResourceInputOfRetailMediaSellerAccountCreation valueResourceInputOfRetailMediaSellerAccountCreation = new ValueResourceInputOfRetailMediaSellerAccountCreation(); // ValueResourceInputOfRetailMediaSellerAccountCreation | Initial creation and configuration options for the new account try { - GetAudiencesResponse result = apiInstance.getAudiences(advertiserId); + ResourceOutcomeOfRetailMediaAccount result = apiInstance.createPrivateMarketDemandSellerAccount(accountId, valueResourceInputOfRetailMediaSellerAccountCreation); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AudienceApi#getAudiences"); + System.err.println("Exception when calling AccountsApi#createPrivateMarketDemandSellerAccount"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -260,11 +263,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **advertiserId** | **String**| The advertiser id to get all the audiences for. Mandatory for internal users. For external users, if you don't provide it, we will take into account the advertisers from your portfolio | [optional] | +| **accountId** | **String**| Account Id for the parent private market account | | +| **valueResourceInputOfRetailMediaSellerAccountCreation** | [**ValueResourceInputOfRetailMediaSellerAccountCreation**](ValueResourceInputOfRetailMediaSellerAccountCreation.md)| Initial creation and configuration options for the new account | [optional] | ### Return type -[**GetAudiencesResponse**](GetAudiencesResponse.md) +[**ResourceOutcomeOfRetailMediaAccount**](ResourceOutcomeOfRetailMediaAccount.md) ### Authorization @@ -272,37 +276,36 @@ public class Example { ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | The list was retrieved. | - | -| **403** | Forbidden | - | +| **201** | Success | - | -## modifyAudience +## getApiV1ExternalAccounts -> ReplaceAudienceResponse modifyAudience(audienceId, replaceAudienceRequest) +> JsonApiPageResponseOfAccount getApiV1ExternalAccounts(limitToId, pageIndex, pageSize) -Update user audience specified by the audience id +Gets page of account objects that the current user can access ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.AudienceApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AccountsApi; public class Example { public static void main(String[] args) { @@ -329,14 +332,15 @@ public class Example { // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); // oauth.setAccessToken("YOUR ACCESS TOKEN"); - AudienceApi apiInstance = new AudienceApi(defaultClient); - String audienceId = "audienceId_example"; // String | The id of the audience to amend - ReplaceAudienceRequest replaceAudienceRequest = new ReplaceAudienceRequest(); // ReplaceAudienceRequest | + AccountsApi apiInstance = new AccountsApi(defaultClient); + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { - ReplaceAudienceResponse result = apiInstance.modifyAudience(audienceId, replaceAudienceRequest); + JsonApiPageResponseOfAccount result = apiInstance.getApiV1ExternalAccounts(limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AudienceApi#modifyAudience"); + System.err.println("Exception when calling AccountsApi#getApiV1ExternalAccounts"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -351,12 +355,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **audienceId** | **String**| The id of the audience to amend | | -| **replaceAudienceRequest** | [**ReplaceAudienceRequest**](ReplaceAudienceRequest.md)| | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type -[**ReplaceAudienceResponse**](ReplaceAudienceResponse.md) +[**JsonApiPageResponseOfAccount**](JsonApiPageResponseOfAccount.md) ### Authorization @@ -364,37 +369,36 @@ public class Example { ### HTTP request headers -- **Content-Type**: application/json -- **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | The audience was updated | - | -| **403** | Forbidden | - | +| **200** | Success | - | -## modifyAudienceUsers +## removeBrands -> ModifyAudienceResponse modifyAudienceUsers(audienceId, contactlistAmendmentRequest) +> ValueResourceOfRetailMediaBrands removeBrands(accountId, valueResourceInputOfRetailMediaBrands) -Add/remove users to or from a contact list audience-segment. +Remove a brand from an account ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.AudienceApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AccountsApi; public class Example { public static void main(String[] args) { @@ -421,14 +425,14 @@ public class Example { // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); // oauth.setAccessToken("YOUR ACCESS TOKEN"); - AudienceApi apiInstance = new AudienceApi(defaultClient); - String audienceId = "audienceId_example"; // String | The id of the audience to amend - ContactlistAmendmentRequest contactlistAmendmentRequest = new ContactlistAmendmentRequest(); // ContactlistAmendmentRequest | + AccountsApi apiInstance = new AccountsApi(defaultClient); + String accountId = "accountId_example"; // String | The account id to update + ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands = new ValueResourceInputOfRetailMediaBrands(); // ValueResourceInputOfRetailMediaBrands | Brands to remove from account try { - ModifyAudienceResponse result = apiInstance.modifyAudienceUsers(audienceId, contactlistAmendmentRequest); + ValueResourceOfRetailMediaBrands result = apiInstance.removeBrands(accountId, valueResourceInputOfRetailMediaBrands); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AudienceApi#modifyAudienceUsers"); + System.err.println("Exception when calling AccountsApi#removeBrands"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -443,12 +447,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **audienceId** | **String**| The id of the audience to amend | | -| **contactlistAmendmentRequest** | [**ContactlistAmendmentRequest**](ContactlistAmendmentRequest.md)| | | +| **accountId** | **String**| The account id to update | | +| **valueResourceInputOfRetailMediaBrands** | [**ValueResourceInputOfRetailMediaBrands**](ValueResourceInputOfRetailMediaBrands.md)| Brands to remove from account | [optional] | ### Return type -[**ModifyAudienceResponse**](ModifyAudienceResponse.md) +[**ValueResourceOfRetailMediaBrands**](ValueResourceOfRetailMediaBrands.md) ### Authorization @@ -456,38 +460,36 @@ public class Example { ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Summary of created request | - | -| **403** | Forbidden | - | -| **404** | Audience 123 not found | - | +| **200** | Success | - | -## removeAudience +## updateSellers -> DeleteAudienceResponse removeAudience(audienceId) +> ValueResourceCollectionOutcomeOfRetailMediaSeller updateSellers(accountId, valueResourceCollectionInputOfRetailMediaSeller) -Delete an audience by id +replace the sellers assoiated with an account ### Example ```java -package com.criteo.api.marketingsolutions.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.marketingsolutions.v2023_04.ApiClient; -import com.criteo.api.marketingsolutions.v2023_04.ApiClientBuilder; -import com.criteo.api.marketingsolutions.v2023_04.ApiException; -import com.criteo.api.marketingsolutions.v2023_04.Configuration; -import com.criteo.api.marketingsolutions.v2023_04.auth.*; -import com.criteo.api.marketingsolutions.v2023_04.model.*; -import com.criteo.api.marketingsolutions.v2023_04.api.AudienceApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AccountsApi; public class Example { public static void main(String[] args) { @@ -514,13 +516,14 @@ public class Example { // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); // oauth.setAccessToken("YOUR ACCESS TOKEN"); - AudienceApi apiInstance = new AudienceApi(defaultClient); - String audienceId = "audienceId_example"; // String | The id of the audience to amend + AccountsApi apiInstance = new AccountsApi(defaultClient); + String accountId = "accountId_example"; // String | the account id to update + ValueResourceCollectionInputOfRetailMediaSeller valueResourceCollectionInputOfRetailMediaSeller = new ValueResourceCollectionInputOfRetailMediaSeller(); // ValueResourceCollectionInputOfRetailMediaSeller | sellers to associate try { - DeleteAudienceResponse result = apiInstance.removeAudience(audienceId); + ValueResourceCollectionOutcomeOfRetailMediaSeller result = apiInstance.updateSellers(accountId, valueResourceCollectionInputOfRetailMediaSeller); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AudienceApi#removeAudience"); + System.err.println("Exception when calling AccountsApi#updateSellers"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -535,11 +538,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **audienceId** | **String**| The id of the audience to amend | | +| **accountId** | **String**| the account id to update | | +| **valueResourceCollectionInputOfRetailMediaSeller** | [**ValueResourceCollectionInputOfRetailMediaSeller**](ValueResourceCollectionInputOfRetailMediaSeller.md)| sellers to associate | [optional] | ### Return type -[**DeleteAudienceResponse**](DeleteAudienceResponse.md) +[**ValueResourceCollectionOutcomeOfRetailMediaSeller**](ValueResourceCollectionOutcomeOfRetailMediaSeller.md) ### Authorization @@ -547,13 +551,12 @@ public class Example { ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | The audience was deleted | - | -| **403** | Forbidden | - | +| **200** | Success | - | diff --git a/sdks/retailmedia_2024-07/docs/AddFundsToBalanceRequest.md b/sdks/retailmedia_2024-07/docs/AddFundsToBalanceRequest.md new file mode 100644 index 00000000..7577c815 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/AddFundsToBalanceRequest.md @@ -0,0 +1,14 @@ + + +# AddFundsToBalanceRequest + +Data model for an input resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ResourceOfAddFundsToBalance**](ResourceOfAddFundsToBalance.md) | | [optional] | + + + diff --git a/sdks/retailmedia_2023-04/docs/AddRemoveKeywordModel.md b/sdks/retailmedia_2024-07/docs/AddRemoveKeywordModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AddRemoveKeywordModel.md rename to sdks/retailmedia_2024-07/docs/AddRemoveKeywordModel.md diff --git a/sdks/retailmedia_2023-04/docs/AddRemoveKeywordsModel.md b/sdks/retailmedia_2024-07/docs/AddRemoveKeywordsModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AddRemoveKeywordsModel.md rename to sdks/retailmedia_2024-07/docs/AddRemoveKeywordsModel.md diff --git a/sdks/retailmedia_2023-04/docs/AddRemoveKeywordsModelRequest.md b/sdks/retailmedia_2024-07/docs/AddRemoveKeywordsModelRequest.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AddRemoveKeywordsModelRequest.md rename to sdks/retailmedia_2024-07/docs/AddRemoveKeywordsModelRequest.md diff --git a/sdks/retailmedia_2023-04/docs/AddRemoveKeywordsModelResource.md b/sdks/retailmedia_2024-07/docs/AddRemoveKeywordsModelResource.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AddRemoveKeywordsModelResource.md rename to sdks/retailmedia_2024-07/docs/AddRemoveKeywordsModelResource.md diff --git a/sdks/retailmedia_2023-04/docs/AddToBasketIdsUpdateModel202110Request.md b/sdks/retailmedia_2024-07/docs/AddToBasketIdsUpdateModel202110Request.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AddToBasketIdsUpdateModel202110Request.md rename to sdks/retailmedia_2024-07/docs/AddToBasketIdsUpdateModel202110Request.md diff --git a/sdks/retailmedia_2023-04/docs/AddToBasketTarget202110Request.md b/sdks/retailmedia_2024-07/docs/AddToBasketTarget202110Request.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AddToBasketTarget202110Request.md rename to sdks/retailmedia_2024-07/docs/AddToBasketTarget202110Request.md diff --git a/sdks/retailmedia_2023-04/docs/AddToBasketTarget202110Response.md b/sdks/retailmedia_2024-07/docs/AddToBasketTarget202110Response.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AddToBasketTarget202110Response.md rename to sdks/retailmedia_2024-07/docs/AddToBasketTarget202110Response.md diff --git a/sdks/retailmedia_2023-04/docs/AnalyticsApi.md b/sdks/retailmedia_2024-07/docs/AnalyticsApi.md similarity index 68% rename from sdks/retailmedia_2023-04/docs/AnalyticsApi.md rename to sdks/retailmedia_2024-07/docs/AnalyticsApi.md index 3baae56b..5f9cb454 100644 --- a/sdks/retailmedia_2023-04/docs/AnalyticsApi.md +++ b/sdks/retailmedia_2024-07/docs/AnalyticsApi.md @@ -4,10 +4,11 @@ All URIs are relative to *https://api.criteo.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**generateAsyncCampaignsReport**](AnalyticsApi.md#generateAsyncCampaignsReport) | **POST** /2023-04/retail-media/reports/campaigns | | -| [**generateAsyncLineItemsReport**](AnalyticsApi.md#generateAsyncLineItemsReport) | **POST** /2023-04/retail-media/reports/line-items | | -| [**getAsyncExportOutput**](AnalyticsApi.md#getAsyncExportOutput) | **GET** /2023-04/retail-media/reports/{reportId}/output | | -| [**getAsyncExportStatus**](AnalyticsApi.md#getAsyncExportStatus) | **GET** /2023-04/retail-media/reports/{reportId}/status | | +| [**generateAsyncCampaignsReport**](AnalyticsApi.md#generateAsyncCampaignsReport) | **POST** /2024-07/retail-media/reports/campaigns | | +| [**generateAsyncLineItemsReport**](AnalyticsApi.md#generateAsyncLineItemsReport) | **POST** /2024-07/retail-media/reports/line-items | | +| [**generateAsyncRevenueReport**](AnalyticsApi.md#generateAsyncRevenueReport) | **POST** /2024-07/retail-media/reports/revenue | | +| [**getAsyncExportOutput**](AnalyticsApi.md#getAsyncExportOutput) | **GET** /2024-07/retail-media/reports/{reportId}/output | | +| [**getAsyncExportStatus**](AnalyticsApi.md#getAsyncExportStatus) | **GET** /2024-07/retail-media/reports/{reportId}/status | | @@ -22,15 +23,15 @@ Return an asynchronous Campaigns Report ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.AnalyticsApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AnalyticsApi; public class Example { public static void main(String[] args) { @@ -113,15 +114,15 @@ Returns an asynchronous Line Items Report ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.AnalyticsApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AnalyticsApi; public class Example { public static void main(String[] args) { @@ -193,6 +194,97 @@ public class Example { | **403** | Forbidden | - | +## generateAsyncRevenueReport + +> AsyncReportResponse generateAsyncRevenueReport(asyncRevenueReportRequest) + + + +Returns an asynchronous Revenue Report + +### Example + +```java +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AnalyticsApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AnalyticsApi apiInstance = new AnalyticsApi(defaultClient); + AsyncRevenueReportRequest asyncRevenueReportRequest = new AsyncRevenueReportRequest(); // AsyncRevenueReportRequest | + try { + AsyncReportResponse result = apiInstance.generateAsyncRevenueReport(asyncRevenueReportRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnalyticsApi#generateAsyncRevenueReport"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **asyncRevenueReportRequest** | [**AsyncRevenueReportRequest**](AsyncRevenueReportRequest.md)| | | + +### Return type + +[**AsyncReportResponse**](AsyncReportResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | +| **400** | Bad Request | - | +| **403** | Forbidden | - | + + ## getAsyncExportOutput > String getAsyncExportOutput(reportId) @@ -204,15 +296,15 @@ Returns the output of an async report ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.AnalyticsApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AnalyticsApi; public class Example { public static void main(String[] args) { @@ -295,15 +387,15 @@ Returns the status of an async report ### Example ```java -package com.criteo.api.retailmedia.v2023_04; - -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.AnalyticsApi; +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AnalyticsApi; public class Example { public static void main(String[] args) { diff --git a/sdks/retailmedia_2023-04/docs/ApplicationSummaryModel.md b/sdks/retailmedia_2024-07/docs/ApplicationSummaryModel.md similarity index 75% rename from sdks/retailmedia_2023-04/docs/ApplicationSummaryModel.md rename to sdks/retailmedia_2024-07/docs/ApplicationSummaryModel.md index 704b26ad..d5e84458 100644 --- a/sdks/retailmedia_2023-04/docs/ApplicationSummaryModel.md +++ b/sdks/retailmedia_2024-07/docs/ApplicationSummaryModel.md @@ -2,7 +2,7 @@ # ApplicationSummaryModel -Model of ApplicationSummary +Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients ## Properties diff --git a/sdks/marketingsolutions_2023-04/docs/ApplicationSummaryModelResource.md b/sdks/retailmedia_2024-07/docs/ApplicationSummaryModelResource.md similarity index 79% rename from sdks/marketingsolutions_2023-04/docs/ApplicationSummaryModelResource.md rename to sdks/retailmedia_2024-07/docs/ApplicationSummaryModelResource.md index 81ed2c97..af688c5d 100644 --- a/sdks/marketingsolutions_2023-04/docs/ApplicationSummaryModelResource.md +++ b/sdks/retailmedia_2024-07/docs/ApplicationSummaryModelResource.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResource -A class that represents a ValueType in a guild compliant way +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/retailmedia_2023-04/docs/ApplicationSummaryModelResponse.md b/sdks/retailmedia_2024-07/docs/ApplicationSummaryModelResponse.md similarity index 85% rename from sdks/retailmedia_2023-04/docs/ApplicationSummaryModelResponse.md rename to sdks/retailmedia_2024-07/docs/ApplicationSummaryModelResponse.md index 47b6bd74..658b5549 100644 --- a/sdks/retailmedia_2023-04/docs/ApplicationSummaryModelResponse.md +++ b/sdks/retailmedia_2024-07/docs/ApplicationSummaryModelResponse.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResponse -Response of ApplicationSummaryModel +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/retailmedia_2023-04/docs/ApprovalStatusModel.md b/sdks/retailmedia_2024-07/docs/ApprovalStatusModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ApprovalStatusModel.md rename to sdks/retailmedia_2024-07/docs/ApprovalStatusModel.md diff --git a/sdks/retailmedia_2023-04/docs/Asset.md b/sdks/retailmedia_2024-07/docs/Asset.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/Asset.md rename to sdks/retailmedia_2024-07/docs/Asset.md diff --git a/sdks/retailmedia_2023-04/docs/AssetResource.md b/sdks/retailmedia_2024-07/docs/AssetResource.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AssetResource.md rename to sdks/retailmedia_2024-07/docs/AssetResource.md diff --git a/sdks/retailmedia_2023-04/docs/AssetResponse.md b/sdks/retailmedia_2024-07/docs/AssetResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AssetResponse.md rename to sdks/retailmedia_2024-07/docs/AssetResponse.md diff --git a/sdks/retailmedia_2023-04/docs/AsyncCampaignsReport.md b/sdks/retailmedia_2024-07/docs/AsyncCampaignsReport.md similarity index 97% rename from sdks/retailmedia_2023-04/docs/AsyncCampaignsReport.md rename to sdks/retailmedia_2024-07/docs/AsyncCampaignsReport.md index d735484a..18252b4c 100644 --- a/sdks/retailmedia_2023-04/docs/AsyncCampaignsReport.md +++ b/sdks/retailmedia_2024-07/docs/AsyncCampaignsReport.md @@ -116,6 +116,8 @@ Async Campaigns report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_2023-04/docs/AsyncCampaignsReportRequest.md b/sdks/retailmedia_2024-07/docs/AsyncCampaignsReportRequest.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AsyncCampaignsReportRequest.md rename to sdks/retailmedia_2024-07/docs/AsyncCampaignsReportRequest.md diff --git a/sdks/retailmedia_2023-04/docs/AsyncCampaignsReportResource.md b/sdks/retailmedia_2024-07/docs/AsyncCampaignsReportResource.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AsyncCampaignsReportResource.md rename to sdks/retailmedia_2024-07/docs/AsyncCampaignsReportResource.md diff --git a/sdks/retailmedia_2023-04/docs/AsyncLineItemsReport.md b/sdks/retailmedia_2024-07/docs/AsyncLineItemsReport.md similarity index 97% rename from sdks/retailmedia_2023-04/docs/AsyncLineItemsReport.md rename to sdks/retailmedia_2024-07/docs/AsyncLineItemsReport.md index 9a3a2e0e..276cd5a1 100644 --- a/sdks/retailmedia_2023-04/docs/AsyncLineItemsReport.md +++ b/sdks/retailmedia_2024-07/docs/AsyncLineItemsReport.md @@ -116,6 +116,8 @@ Async Line Items report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_2023-04/docs/AsyncLineItemsReportRequest.md b/sdks/retailmedia_2024-07/docs/AsyncLineItemsReportRequest.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AsyncLineItemsReportRequest.md rename to sdks/retailmedia_2024-07/docs/AsyncLineItemsReportRequest.md diff --git a/sdks/retailmedia_2023-04/docs/AsyncLineItemsReportResource.md b/sdks/retailmedia_2024-07/docs/AsyncLineItemsReportResource.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AsyncLineItemsReportResource.md rename to sdks/retailmedia_2024-07/docs/AsyncLineItemsReportResource.md diff --git a/sdks/retailmedia_2023-04/docs/AsyncReportResponse.md b/sdks/retailmedia_2024-07/docs/AsyncReportResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AsyncReportResponse.md rename to sdks/retailmedia_2024-07/docs/AsyncReportResponse.md diff --git a/sdks/retailmedia_2024-07/docs/AsyncRevenueReport.md b/sdks/retailmedia_2024-07/docs/AsyncRevenueReport.md new file mode 100644 index 00000000..16ae32dc --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/AsyncRevenueReport.md @@ -0,0 +1,250 @@ + + +# AsyncRevenueReport + +Async Revenue report body request + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ids** | **List<String>** | Supply account ids to report on | [optional] | +|**id** | **String** | Supply account id to report on | [optional] | +|**reportType** | [**ReportTypeEnum**](#ReportTypeEnum) | Type of report | [optional] | +|**revenueType** | [**RevenueTypeEnum**](#RevenueTypeEnum) | Type of revenue | [optional] | +|**soldBy** | [**SoldByEnum**](#SoldByEnum) | Filter on the seller: Indirect Sold, Direct Sold or Private Market | [optional] | +|**buyType** | [**BuyTypeEnum**](#BuyTypeEnum) | Filter on buy type: Auction, Preferred Deals or Sponsorship | [optional] | +|**advertiserTypes** | [**List<AdvertiserTypesEnum>**](#List<AdvertiserTypesEnum>) | Filter on the type of advertiser: retailer, brand, seller | [optional] | +|**skuRelations** | [**List<SkuRelationsEnum>**](#List<SkuRelationsEnum>) | Filter on sku relations: Same SKU, Same Parent SKU, Same Category, Same Brand or Same Seller | [optional] | +|**format** | [**FormatEnum**](#FormatEnum) | Format of the output | [optional] | +|**campaignType** | [**CampaignTypeEnum**](#CampaignTypeEnum) | Filter the type of campaigns to report on: sponsoredProducts or onSiteDisplays | [optional] | +|**salesChannel** | [**SalesChannelEnum**](#SalesChannelEnum) | Filter on specific sales channel: offline or online | [optional] | +|**clickAttributionWindow** | [**ClickAttributionWindowEnum**](#ClickAttributionWindowEnum) | Click attribution window | [optional] | +|**viewAttributionWindow** | [**ViewAttributionWindowEnum**](#ViewAttributionWindowEnum) | View attribution window | [optional] | +|**dimensions** | [**List<DimensionsEnum>**](#List<DimensionsEnum>) | List of dimensions to report on | [optional] | +|**metrics** | [**List<MetricsEnum>**](#List<MetricsEnum>) | List of metrics to report on | [optional] | +|**startDate** | **OffsetDateTime** | Start date | | +|**endDate** | **OffsetDateTime** | End date | | +|**timezone** | **String** | Time zone : see criteo developer portal for supported time zones | [optional] | + + + +## Enum: ReportTypeEnum + +| Name | Value | +|---- | -----| +| ADVERTISER | "advertiser" | +| ENVIRONMENT | "environment" | +| PAGETYPE | "pageType" | +| PRODUCTCATEGORY | "productCategory" | +| BRAND | "brand" | + + + +## Enum: RevenueTypeEnum + +| Name | Value | +|---- | -----| +| AUCTION | "auction" | +| PREFERRED | "preferred" | + + + +## Enum: SoldByEnum + +| Name | Value | +|---- | -----| +| DIRECTSOLD | "directSold" | +| INDIRECTSOLD | "indirectSold" | +| PRIVATEMARKET | "privateMarket" | + + + +## Enum: BuyTypeEnum + +| Name | Value | +|---- | -----| +| AUCTION | "auction" | +| PREFERREDDEALS | "preferredDeals" | +| SPONSORSHIP | "sponsorship" | + + + +## Enum: List<AdvertiserTypesEnum> + +| Name | Value | +|---- | -----| +| RETAILER | "retailer" | +| BRAND | "brand" | +| SELLER | "seller" | + + + +## Enum: List<SkuRelationsEnum> + +| Name | Value | +|---- | -----| +| SAMESKU | "sameSku" | +| SAMEPARENTSKU | "sameParentSku" | +| SAMECATEGORY | "sameCategory" | +| SAMEBRAND | "sameBrand" | +| SAMESELLER | "sameSeller" | + + + +## Enum: FormatEnum + +| Name | Value | +|---- | -----| +| JSON | "json" | +| JSON_COMPACT | "json-compact" | +| JSON_NEWLINE | "json-newline" | +| CSV | "csv" | + + + +## Enum: CampaignTypeEnum + +| Name | Value | +|---- | -----| +| ALL | "all" | +| SPONSOREDPRODUCTS | "sponsoredProducts" | +| ONSITEDISPLAYS | "onSiteDisplays" | + + + +## Enum: SalesChannelEnum + +| Name | Value | +|---- | -----| +| ALL | "all" | +| OFFLINE | "offline" | +| ONLINE | "online" | + + + +## Enum: ClickAttributionWindowEnum + +| Name | Value | +|---- | -----| +| NONE | "none" | +| _7D | "7D" | +| _14D | "14D" | +| _30D | "30D" | + + + +## Enum: ViewAttributionWindowEnum + +| Name | Value | +|---- | -----| +| NONE | "none" | +| _1D | "1D" | +| _7D | "7D" | +| _14D | "14D" | +| _30D | "30D" | + + + +## Enum: List<DimensionsEnum> + +| Name | Value | +|---- | -----| +| DATE | "date" | +| HOUR | "hour" | +| PARENTACCOUNT | "parentAccount" | +| ACCOUNTID | "accountId" | +| ACCOUNTNAME | "accountName" | +| ACCOUNTTYPENAME | "accountTypeName" | +| ADVERTISERTYPE | "advertiserType" | +| CAMPAIGNID | "campaignId" | +| CAMPAIGNNAME | "campaignName" | +| CAMPAIGNTYPENAME | "campaignTypeName" | +| CAMPAIGNSTARTDATE | "campaignStartDate" | +| CAMPAIGNENDDATE | "campaignEndDate" | +| LINEITEMID | "lineItemId" | +| LINEITEMNAME | "lineItemName" | +| LINEITEMSTARTDATE | "lineItemStartDate" | +| LINEITEMENDDATE | "lineItemEndDate" | +| LINEITEMSTATUS | "lineItemStatus" | +| RETAILERID | "retailerId" | +| RETAILERNAME | "retailerName" | +| BRANDID | "brandId" | +| BRANDNAME | "brandName" | +| PLACEMENTID | "placementId" | +| PLACEMENTNAME | "placementName" | +| PAGETYPENAME | "pageTypeName" | +| ENVIRONMENT | "environment" | +| PAGECATEGORY | "pageCategory" | +| ADVPRODUCTID | "advProductId" | +| ADVPRODUCTNAME | "advProductName" | +| ADVPRODUCTGTIN | "advProductGtin" | +| ADVPRODUCTMPN | "advProductMpn" | +| BUYTYPE | "buyType" | +| SOLDBY | "soldBy" | +| SALECHANNEL | "saleChannel" | +| ATTRIBUTIONSETTINGS | "attributionSettings" | +| ACTIVITYTYPE | "activityType" | +| KEYWORD | "keyword" | +| SKURELATION | "skuRelation" | +| RETAILERCATEGORYID | "retailerCategoryId" | +| RETAILERCATEGORYNAME | "retailerCategoryName" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | +| TAXONOMY1ID | "taxonomy1Id" | +| TAXONOMY1NAME | "taxonomy1Name" | +| TAXONOMY2ID | "taxonomy2Id" | +| TAXONOMY2NAME | "taxonomy2Name" | +| TAXONOMY3ID | "taxonomy3Id" | +| TAXONOMY3NAME | "taxonomy3Name" | +| TAXONOMY4ID | "taxonomy4Id" | +| TAXONOMY4NAME | "taxonomy4Name" | +| TAXONOMY5ID | "taxonomy5Id" | +| TAXONOMY5NAME | "taxonomy5Name" | +| TAXONOMY6ID | "taxonomy6Id" | +| TAXONOMY6NAME | "taxonomy6Name" | +| TAXONOMY7ID | "taxonomy7Id" | +| TAXONOMY7NAME | "taxonomy7Name" | + + + +## Enum: List<MetricsEnum> + +| Name | Value | +|---- | -----| +| NUMBEROFCAMPAIGNS | "numberOfCampaigns" | +| NUMBEROFLINEITEMS | "numberOfLineItems" | +| NUMBEROFSKUS | "numberOfSkus" | +| SKUPRICE | "skuPrice" | +| PAGEVIEWS | "pageViews" | +| IMPRESSIONS | "impressions" | +| PRODUCTCLICKS | "productClicks" | +| PLACEMENTCLICKS | "placementClicks" | +| CLICKS | "clicks" | +| SALES | "sales" | +| UNITS | "units" | +| TRANSACTIONS | "transactions" | +| ASSISTEDSALES | "assistedSales" | +| ASSISTEDUNITS | "assistedUnits" | +| REVENUE | "revenue" | +| OPENAUCTIONREVENUE | "openAuctionRevenue" | +| PREFERREDDEALSREVENUE | "preferredDealsRevenue" | +| CTR | "ctr" | +| CR | "cr" | +| CPC | "cpc" | +| CPM | "cpm" | +| ROAS | "roas" | +| WORKINGMEDIA | "workingMedia" | +| NETREVENUE | "netRevenue" | +| VIDEOVIEWS | "videoViews" | +| VIDEOSSTARTED | "videosStarted" | +| VIDEOSPLAYEDTO25 | "videosPlayedTo25" | +| VIDEOSPLAYEDTO50 | "videosPlayedTo50" | +| VIDEOSPLAYEDTO75 | "videosPlayedTo75" | +| VIDEOSPLAYEDTO100 | "videosPlayedTo100" | +| VIDEOPLAYINGRATE | "videoPlayingRate" | +| VIDEOCOMPLETIONRATE | "videoCompletionRate" | +| UNIQUEVISITORS | "uniqueVisitors" | +| FREQUENCY | "frequency" | + + + diff --git a/sdks/retailmedia_2024-07/docs/AsyncRevenueReportRequest.md b/sdks/retailmedia_2024-07/docs/AsyncRevenueReportRequest.md new file mode 100644 index 00000000..0a1085ca --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/AsyncRevenueReportRequest.md @@ -0,0 +1,14 @@ + + +# AsyncRevenueReportRequest + +A top-level object that encapsulates a Criteo API request for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**AsyncRevenueReportResource**](AsyncRevenueReportResource.md) | | [optional] | + + + diff --git a/sdks/retailmedia_2024-07/docs/AsyncRevenueReportResource.md b/sdks/retailmedia_2024-07/docs/AsyncRevenueReportResource.md new file mode 100644 index 00000000..b3e1f24f --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/AsyncRevenueReportResource.md @@ -0,0 +1,15 @@ + + +# AsyncRevenueReportResource + +A top-level object that encapsulates a Criteo API response for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**AsyncRevenueReport**](AsyncRevenueReport.md) | | [optional] | + + + diff --git a/sdks/retailmedia_2023-04/docs/AuctionLineItemCreateModelRequest.md b/sdks/retailmedia_2024-07/docs/AuctionLineItemCreateModelRequest.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AuctionLineItemCreateModelRequest.md rename to sdks/retailmedia_2024-07/docs/AuctionLineItemCreateModelRequest.md diff --git a/sdks/retailmedia_2023-04/docs/AuctionLineItemPagedListResponse.md b/sdks/retailmedia_2024-07/docs/AuctionLineItemPagedListResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AuctionLineItemPagedListResponse.md rename to sdks/retailmedia_2024-07/docs/AuctionLineItemPagedListResponse.md diff --git a/sdks/retailmedia_2023-04/docs/AuctionLineItemResponse.md b/sdks/retailmedia_2024-07/docs/AuctionLineItemResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AuctionLineItemResponse.md rename to sdks/retailmedia_2024-07/docs/AuctionLineItemResponse.md diff --git a/sdks/retailmedia_2023-04/docs/AuctionLineItemUpdateModelRequest.md b/sdks/retailmedia_2024-07/docs/AuctionLineItemUpdateModelRequest.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AuctionLineItemUpdateModelRequest.md rename to sdks/retailmedia_2024-07/docs/AuctionLineItemUpdateModelRequest.md diff --git a/sdks/retailmedia_2023-04/docs/AudienceApi.md b/sdks/retailmedia_2024-07/docs/AudienceApi.md similarity index 88% rename from sdks/retailmedia_2023-04/docs/AudienceApi.md rename to sdks/retailmedia_2024-07/docs/AudienceApi.md index 14e5184c..d4849b7f 100644 --- a/sdks/retailmedia_2023-04/docs/AudienceApi.md +++ b/sdks/retailmedia_2024-07/docs/AudienceApi.md @@ -4,10 +4,10 @@ All URIs are relative to *https://api.criteo.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**legacyCreateAudienceV1**](AudienceApi.md#legacyCreateAudienceV1) | **POST** /2023-04/retail-media/accounts/{accountId}/audiences | | -| [**legacyGetAudienceV1**](AudienceApi.md#legacyGetAudienceV1) | **GET** /2023-04/retail-media/accounts/{accountId}/audiences | | -| [**legacyGetAudienceV2**](AudienceApi.md#legacyGetAudienceV2) | **GET** /2023-04/retail-media/v2/accounts/{accountId}/audiences | | -| [**legacyUpdateAudienceV2**](AudienceApi.md#legacyUpdateAudienceV2) | **POST** /2023-04/retail-media/v2/accounts/{accountId}/audiences | | +| [**legacyCreateAudienceV1**](AudienceApi.md#legacyCreateAudienceV1) | **POST** /2024-07/retail-media/accounts/{accountId}/audiences | | +| [**legacyGetAudienceV1**](AudienceApi.md#legacyGetAudienceV1) | **GET** /2024-07/retail-media/accounts/{accountId}/audiences | | +| [**legacyGetAudienceV2**](AudienceApi.md#legacyGetAudienceV2) | **GET** /2024-07/retail-media/v2/accounts/{accountId}/audiences | | +| [**legacyUpdateAudienceV2**](AudienceApi.md#legacyUpdateAudienceV2) | **POST** /2024-07/retail-media/v2/accounts/{accountId}/audiences | | @@ -22,15 +22,15 @@ Create an Audience (deprecated Public API) ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.AudienceApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AudienceApi; public class Example { public static void main(String[] args) { @@ -117,15 +117,15 @@ Get a page of Audiences. (deprecated Public API) ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.AudienceApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AudienceApi; public class Example { public static void main(String[] args) { @@ -215,15 +215,15 @@ Get a page of Audiences. (deprecated Public API) ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.AudienceApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AudienceApi; public class Example { public static void main(String[] args) { @@ -313,15 +313,15 @@ Create an Audience (deprecated Public API) ### Example ```java -package com.criteo.api.retailmedia.v2023_04; - -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.AudienceApi; +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.AudienceApi; public class Example { public static void main(String[] args) { diff --git a/sdks/retailmedia_2023-04/docs/AudienceIdsUpdateModel202110Request.md b/sdks/retailmedia_2024-07/docs/AudienceIdsUpdateModel202110Request.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AudienceIdsUpdateModel202110Request.md rename to sdks/retailmedia_2024-07/docs/AudienceIdsUpdateModel202110Request.md diff --git a/sdks/retailmedia_2023-04/docs/AudienceTarget202110Request.md b/sdks/retailmedia_2024-07/docs/AudienceTarget202110Request.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AudienceTarget202110Request.md rename to sdks/retailmedia_2024-07/docs/AudienceTarget202110Request.md diff --git a/sdks/retailmedia_2023-04/docs/AudienceTarget202110Response.md b/sdks/retailmedia_2024-07/docs/AudienceTarget202110Response.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/AudienceTarget202110Response.md rename to sdks/retailmedia_2024-07/docs/AudienceTarget202110Response.md diff --git a/sdks/retailmedia_2024-07/docs/BalanceApi.md b/sdks/retailmedia_2024-07/docs/BalanceApi.md new file mode 100644 index 00000000..ec90a358 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/BalanceApi.md @@ -0,0 +1,762 @@ +# BalanceApi + +All URIs are relative to *https://api.criteo.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getApi202110ExternalBalanceCampaignsByBalanceId**](BalanceApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2024-07/retail-media/balances/{balance-id}/campaigns | | +| [**getApiV1ExternalAccountBalancesByAccountId**](BalanceApi.md#getApiV1ExternalAccountBalancesByAccountId) | **GET** /2024-07/retail-media/accounts/{account-id}/balances | | +| [**getApiV1ExternalAccountByAccountIdAndBalanceId**](BalanceApi.md#getApiV1ExternalAccountByAccountIdAndBalanceId) | **GET** /2024-07/retail-media/accounts/{account-id}/balances/{balanceId} | | +| [**getBalanceHistory**](BalanceApi.md#getBalanceHistory) | **GET** /2024-07/retail-media/balances/{balanceId}/history | | +| [**patchApiV1ExternalAccountByAccountIdAndBalanceId**](BalanceApi.md#patchApiV1ExternalAccountByAccountIdAndBalanceId) | **PATCH** /2024-07/retail-media/accounts/{account-id}/balances/{balanceId} | | +| [**postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId**](BalanceApi.md#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId) | **POST** /2024-07/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds | | +| [**postApiV1ExternalAccountBalancesByAccountId**](BalanceApi.md#postApiV1ExternalAccountBalancesByAccountId) | **POST** /2024-07/retail-media/accounts/{account-id}/balances | | +| [**postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId**](BalanceApi.md#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId) | **POST** /2024-07/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates | | + + + +## getApi202110ExternalBalanceCampaignsByBalanceId + +> BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize) + + + +Gets page of campaigns for the given balanceId + +### Example + +```java +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String balanceId = "balanceId_example"; // String | The balance to get campaigns from + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + try { + BalanceCampaign202110PagedListResponse result = apiInstance.getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApi202110ExternalBalanceCampaignsByBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **balanceId** | **String**| The balance to get campaigns from | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | + +### Return type + +[**BalanceCampaign202110PagedListResponse**](BalanceCampaign202110PagedListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## getApiV1ExternalAccountBalancesByAccountId + +> BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize) + + + +Get page of balances for the given accountId. + +### Example + +```java +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account to get page of balances for + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request + try { + BalanceResponsePagedListResponse result = apiInstance.getApiV1ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApiV1ExternalAccountBalancesByAccountId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account to get page of balances for | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | + +### Return type + +[**BalanceResponsePagedListResponse**](BalanceResponsePagedListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## getApiV1ExternalAccountByAccountIdAndBalanceId + +> BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId) + + + +Get a balance for the given account id and balance id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance id + try { + BalanceResponse result = apiInstance.getApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApiV1ExternalAccountByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance id | | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## getBalanceHistory + +> PageOfBalanceHistoryChangeDataCaptureV1 getBalanceHistory(balanceId, offset, limit, limitToChangeTypes) + + + +Gets the balance's historical change data. + +### Example + +```java +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String balanceId = "balanceId_example"; // String | Balance id. + Integer offset = 0; // Integer | The (zero-based) starting offset in the collection. + Integer limit = 25; // Integer | The number of elements to be returned. + String limitToChangeTypes = "limitToChangeTypes_example"; // String | Comma separated change types string that will be queried. + try { + PageOfBalanceHistoryChangeDataCaptureV1 result = apiInstance.getBalanceHistory(balanceId, offset, limit, limitToChangeTypes); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getBalanceHistory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **balanceId** | **String**| Balance id. | | +| **offset** | **Integer**| The (zero-based) starting offset in the collection. | [optional] [default to 0] | +| **limit** | **Integer**| The number of elements to be returned. | [optional] [default to 25] | +| **limitToChangeTypes** | **String**| Comma separated change types string that will be queried. | [optional] | + +### Return type + +[**PageOfBalanceHistoryChangeDataCaptureV1**](PageOfBalanceHistoryChangeDataCaptureV1.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## patchApiV1ExternalAccountByAccountIdAndBalanceId + +> BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest) + + + +Modify a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to change the dates + UpdateBalanceModelRequest updateBalanceModelRequest = new UpdateBalanceModelRequest(); // UpdateBalanceModelRequest | + try { + BalanceResponse result = apiInstance.patchApiV1ExternalAccountByAccountIdAndBalanceId(accountId, balanceId, updateBalanceModelRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#patchApiV1ExternalAccountByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to change the dates | | +| **updateBalanceModelRequest** | [**UpdateBalanceModelRequest**](UpdateBalanceModelRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId + +> BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest) + + + +Add funds to a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to add funds to + AddFundsToBalanceRequest addFundsToBalanceRequest = new AddFundsToBalanceRequest(); // AddFundsToBalanceRequest | + try { + BalanceResponse result = apiInstance.postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(accountId, balanceId, addFundsToBalanceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to add funds to | | +| **addFundsToBalanceRequest** | [**AddFundsToBalanceRequest**](AddFundsToBalanceRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## postApiV1ExternalAccountBalancesByAccountId + +> BalanceResponse postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest) + + + +Create balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account to create balances for + CreateBalanceRequest createBalanceRequest = new CreateBalanceRequest(); // CreateBalanceRequest | + try { + BalanceResponse result = apiInstance.postApiV1ExternalAccountBalancesByAccountId(accountId, createBalanceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV1ExternalAccountBalancesByAccountId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account to create balances for | | +| **createBalanceRequest** | [**CreateBalanceRequest**](CreateBalanceRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Success | - | + + +## postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId + +> BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest) + + + +Change dates of a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to change the dates + ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest = new ChangeDatesOfBalanceRequest(); // ChangeDatesOfBalanceRequest | + try { + BalanceResponse result = apiInstance.postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(accountId, balanceId, changeDatesOfBalanceRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to change the dates | | +| **changeDatesOfBalanceRequest** | [**ChangeDatesOfBalanceRequest**](ChangeDatesOfBalanceRequest.md)| | [optional] | + +### Return type + +[**BalanceResponse**](BalanceResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + diff --git a/sdks/retailmedia_2023-04/docs/BalanceCampaign202110ListRequest.md b/sdks/retailmedia_2024-07/docs/BalanceCampaign202110ListRequest.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/BalanceCampaign202110ListRequest.md rename to sdks/retailmedia_2024-07/docs/BalanceCampaign202110ListRequest.md diff --git a/sdks/retailmedia_2023-04/docs/BalanceCampaign202110PagedListResponse.md b/sdks/retailmedia_2024-07/docs/BalanceCampaign202110PagedListResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/BalanceCampaign202110PagedListResponse.md rename to sdks/retailmedia_2024-07/docs/BalanceCampaign202110PagedListResponse.md diff --git a/sdks/retailmedia_2024-07/docs/BalanceHistoryChangeDataCaptureV1.md b/sdks/retailmedia_2024-07/docs/BalanceHistoryChangeDataCaptureV1.md new file mode 100644 index 00000000..1221b676 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/BalanceHistoryChangeDataCaptureV1.md @@ -0,0 +1,36 @@ + + +# BalanceHistoryChangeDataCaptureV1 + +Data model represents the data change capture of balance history. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dateOfModification** | **OffsetDateTime** | Date when data change has occured. | | +|**modifiedByUser** | **String** | Username who modified the insertion order. | | +|**changeType** | [**ChangeTypeEnum**](#ChangeTypeEnum) | Represent the type of change states of the history. | | +|**changeDetails** | [**ChangeDetailsV1**](ChangeDetailsV1.md) | | | +|**memo** | **String** | Memo associate with the insertion order modification. | [optional] | + + + +## Enum: ChangeTypeEnum + +| Name | Value | +|---- | -----| +| BALANCECREATED | "BalanceCreated" | +| BALANCEADDED | "BalanceAdded" | +| BALANCEREMOVED | "BalanceRemoved" | +| BALANCEUNCAPPED | "BalanceUncapped" | +| BALANCECAPPED | "BalanceCapped" | +| ENDDATE | "EndDate" | +| STARTDATE | "StartDate" | +| BALANCENAME | "BalanceName" | +| PONUMBER | "PoNumber" | +| VALUEADD | "ValueAdd" | +| UNKNOWN | "Unknown" | + + + diff --git a/sdks/retailmedia_2024-07/docs/BalanceResponse.md b/sdks/retailmedia_2024-07/docs/BalanceResponse.md new file mode 100644 index 00000000..1667647d --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/BalanceResponse.md @@ -0,0 +1,16 @@ + + +# BalanceResponse + +Data model for response resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ResourceOfBalanceResponse**](ResourceOfBalanceResponse.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/retailmedia_2024-07/docs/BalanceResponsePagedListResponse.md b/sdks/retailmedia_2024-07/docs/BalanceResponsePagedListResponse.md new file mode 100644 index 00000000..0b461a17 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/BalanceResponsePagedListResponse.md @@ -0,0 +1,17 @@ + + +# BalanceResponsePagedListResponse + +Data model for a paged list of response resources + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**data** | [**List<ResourceOfBalanceResponse>**](ResourceOfBalanceResponse.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/retailmedia_2023-04/docs/CampaignApi.md b/sdks/retailmedia_2024-07/docs/CampaignApi.md similarity index 84% rename from sdks/retailmedia_2023-04/docs/CampaignApi.md rename to sdks/retailmedia_2024-07/docs/CampaignApi.md index 32debd66..c45d547d 100644 --- a/sdks/retailmedia_2023-04/docs/CampaignApi.md +++ b/sdks/retailmedia_2024-07/docs/CampaignApi.md @@ -4,68 +4,69 @@ All URIs are relative to *https://api.criteo.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**addRemoveKeywords**](CampaignApi.md#addRemoveKeywords) | **POST** /2023-04/retail-media/line-items/{id}/keywords/add-remove | | -| [**createAsset**](CampaignApi.md#createAsset) | **POST** /2023-04/retail-media/assets | | -| [**fetchKeywords**](CampaignApi.md#fetchKeywords) | **GET** /2023-04/retail-media/line-items/{id}/keywords | | -| [**fetchProposal**](CampaignApi.md#fetchProposal) | **GET** /2023-04/retail-media/preferred-deal-line-items/{id}/proposal | | -| [**getApi202110ExternalAccountBalancesByAccountId**](CampaignApi.md#getApi202110ExternalAccountBalancesByAccountId) | **GET** /2023-04/retail-media/accounts/{account-id}/balances | | -| [**getApi202110ExternalAccountCreativesByAccountId**](CampaignApi.md#getApi202110ExternalAccountCreativesByAccountId) | **GET** /2023-04/retail-media/accounts/{account-id}/creatives | | -| [**getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId**](CampaignApi.md#getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId) | **GET** /2023-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords | | -| [**getApi202110ExternalBalanceCampaignsByBalanceId**](CampaignApi.md#getApi202110ExternalBalanceCampaignsByBalanceId) | **GET** /2023-04/retail-media/balances/{balance-id}/campaigns | | -| [**getApi202110ExternalCampaignPreferredLineItemsByCampaignId**](CampaignApi.md#getApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **GET** /2023-04/retail-media/campaigns/{campaign-id}/preferred-line-items | | -| [**getApi202110ExternalLineItemProductsByLineItemId**](CampaignApi.md#getApi202110ExternalLineItemProductsByLineItemId) | **GET** /2023-04/retail-media/line-items/{line-item-id}/products | | -| [**getApi202110ExternalPreferredLineItemByLineItemId**](CampaignApi.md#getApi202110ExternalPreferredLineItemByLineItemId) | **GET** /2023-04/retail-media/preferred-line-items/{line-item-id} | | -| [**getApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](CampaignApi.md#getApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **GET** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | | -| [**getApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId**](CampaignApi.md#getApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId) | **GET** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences | | -| [**getApi202110ExternalPreferredLineItemTargetingStoresByLineItemId**](CampaignApi.md#getApi202110ExternalPreferredLineItemTargetingStoresByLineItemId) | **GET** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores | | -| [**getApi202110ExternalRetailerPagesByRetailerId**](CampaignApi.md#getApi202110ExternalRetailerPagesByRetailerId) | **GET** /2023-04/retail-media/retailers/{retailerId}/pages | | -| [**getApi202204ExternalCategorieByCategoryId**](CampaignApi.md#getApi202204ExternalCategorieByCategoryId) | **GET** /2023-04/retail-media/categories/{categoryId} | | -| [**getApi202204ExternalCategories**](CampaignApi.md#getApi202204ExternalCategories) | **GET** /2023-04/retail-media/categories | | -| [**getApi202207ExternalRetailerByRetailerIdTemplatestemplateId**](CampaignApi.md#getApi202207ExternalRetailerByRetailerIdTemplatestemplateId) | **GET** /2023-04/retail-media/retailers/{retailer-id}/templates/{template-id} | | -| [**getApi202207ExternalRetailerTemplatesByRetailerId**](CampaignApi.md#getApi202207ExternalRetailerTemplatesByRetailerId) | **GET** /2023-04/retail-media/retailers/{retailer-id}/templates | | -| [**getApi202210ExternalAccountByAccountIdCreativescreativeId**](CampaignApi.md#getApi202210ExternalAccountByAccountIdCreativescreativeId) | **GET** /2023-04/retail-media/accounts/{account-id}/creatives/{creative-id} | | -| [**getApi202301ExternalAccountCampaignsByAccountId**](CampaignApi.md#getApi202301ExternalAccountCampaignsByAccountId) | **GET** /2023-04/retail-media/accounts/{account-id}/campaigns | | -| [**getApi202301ExternalCampaignByCampaignId**](CampaignApi.md#getApi202301ExternalCampaignByCampaignId) | **GET** /2023-04/retail-media/campaigns/{campaignId} | | -| [**getApi202301ExternalLineItemBidMultipliersByLineItemId**](CampaignApi.md#getApi202301ExternalLineItemBidMultipliersByLineItemId) | **GET** /2023-04/retail-media/line-items/{line-item-id}/bid-multipliers | | -| [**getApiV1ExternalAccountBrandsByAccountId**](CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /2023-04/retail-media/accounts/{accountId}/brands | | -| [**getApiV1ExternalAccountRetailersByAccountId**](CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /2023-04/retail-media/accounts/{accountId}/retailers | | -| [**getApiV1ExternalAccounts**](CampaignApi.md#getApiV1ExternalAccounts) | **GET** /2023-04/retail-media/accounts | | -| [**getApiV1ExternalCatalogOutputByCatalogId**](CampaignApi.md#getApiV1ExternalCatalogOutputByCatalogId) | **GET** /2023-04/retail-media/catalogs/{catalogId}/output | | -| [**getApiV1ExternalCatalogStatusByCatalogId**](CampaignApi.md#getApiV1ExternalCatalogStatusByCatalogId) | **GET** /2023-04/retail-media/catalogs/{catalogId}/status | | -| [**getApiV2ExternalAccountLineItemsByAccountId**](CampaignApi.md#getApiV2ExternalAccountLineItemsByAccountId) | **GET** /2023-04/retail-media/accounts/{account-id}/line-items | | -| [**getApiV2ExternalAuctionLineItemByLineItemId**](CampaignApi.md#getApiV2ExternalAuctionLineItemByLineItemId) | **GET** /2023-04/retail-media/auction-line-items/{line-item-id} | | -| [**getApiV2ExternalCampaignAuctionLineItemsByCampaignId**](CampaignApi.md#getApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **GET** /2023-04/retail-media/campaigns/{campaign-id}/auction-line-items | | -| [**getApiV2ExternalLineItemByLineItemId**](CampaignApi.md#getApiV2ExternalLineItemByLineItemId) | **GET** /2023-04/retail-media/line-items/{line-item-id} | | -| [**postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId**](CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId) | **POST** /2023-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append | | -| [**postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId**](CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId) | **POST** /2023-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete | | -| [**postApi202110ExternalBalanceCampaignsAppendByBalanceId**](CampaignApi.md#postApi202110ExternalBalanceCampaignsAppendByBalanceId) | **POST** /2023-04/retail-media/balances/{balance-id}/campaigns/append | | -| [**postApi202110ExternalBalanceCampaignsDeleteByBalanceId**](CampaignApi.md#postApi202110ExternalBalanceCampaignsDeleteByBalanceId) | **POST** /2023-04/retail-media/balances/{balance-id}/campaigns/delete | | -| [**postApi202110ExternalCampaignPreferredLineItemsByCampaignId**](CampaignApi.md#postApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **POST** /2023-04/retail-media/campaigns/{campaign-id}/preferred-line-items | | -| [**postApi202110ExternalLineItemProductsAppendByLineItemId**](CampaignApi.md#postApi202110ExternalLineItemProductsAppendByLineItemId) | **POST** /2023-04/retail-media/line-items/{line-item-id}/products/append | | -| [**postApi202110ExternalLineItemProductsDeleteByLineItemId**](CampaignApi.md#postApi202110ExternalLineItemProductsDeleteByLineItemId) | **POST** /2023-04/retail-media/line-items/{line-item-id}/products/delete | | -| [**postApi202110ExternalLineItemProductsPauseByLineItemId**](CampaignApi.md#postApi202110ExternalLineItemProductsPauseByLineItemId) | **POST** /2023-04/retail-media/line-items/{line-item-id}/products/pause | | -| [**postApi202110ExternalLineItemProductsUnpauseByLineItemId**](CampaignApi.md#postApi202110ExternalLineItemProductsUnpauseByLineItemId) | **POST** /2023-04/retail-media/line-items/{line-item-id}/products/unpause | | -| [**postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId**](CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId) | **POST** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append | | -| [**postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId**](CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId) | **POST** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete | | -| [**postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId**](CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId) | **POST** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append | | -| [**postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId**](CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId) | **POST** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete | | -| [**postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId**](CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId) | **POST** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append | | -| [**postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId**](CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId) | **POST** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete | | -| [**postApi202210ExternalAccountCreativesByAccountId**](CampaignApi.md#postApi202210ExternalAccountCreativesByAccountId) | **POST** /2023-04/retail-media/accounts/{account-id}/creatives | | -| [**postApi202210ExternalAccountCreativesSearchByAccountId**](CampaignApi.md#postApi202210ExternalAccountCreativesSearchByAccountId) | **POST** /2023-04/retail-media/accounts/{account-id}/creatives/search | | -| [**postApi202301ExternalAccountCampaignsByAccountId**](CampaignApi.md#postApi202301ExternalAccountCampaignsByAccountId) | **POST** /2023-04/retail-media/accounts/{account-id}/campaigns | | -| [**postApiV1ExternalAccountCatalogsByAccountId**](CampaignApi.md#postApiV1ExternalAccountCatalogsByAccountId) | **POST** /2023-04/retail-media/accounts/{accountId}/catalogs | | -| [**postApiV2ExternalCampaignAuctionLineItemsByCampaignId**](CampaignApi.md#postApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **POST** /2023-04/retail-media/campaigns/{campaign-id}/auction-line-items | | -| [**putApi202110ExternalPreferredLineItemByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemByLineItemId) | **PUT** /2023-04/retail-media/preferred-line-items/{line-item-id} | | -| [**putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **PUT** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | | -| [**putApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId) | **PUT** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences | | -| [**putApi202110ExternalPreferredLineItemTargetingStoresByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingStoresByLineItemId) | **PUT** /2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores | | -| [**putApi202210ExternalAccountByAccountIdCreativescreativeId**](CampaignApi.md#putApi202210ExternalAccountByAccountIdCreativescreativeId) | **PUT** /2023-04/retail-media/accounts/{account-id}/creatives/{creative-id} | | -| [**putApi202301ExternalCampaignByCampaignId**](CampaignApi.md#putApi202301ExternalCampaignByCampaignId) | **PUT** /2023-04/retail-media/campaigns/{campaignId} | | -| [**putApi202301ExternalLineItemBidMultipliersByLineItemId**](CampaignApi.md#putApi202301ExternalLineItemBidMultipliersByLineItemId) | **PUT** /2023-04/retail-media/line-items/{line-item-id}/bid-multipliers | | -| [**putApiV2ExternalAuctionLineItemByLineItemId**](CampaignApi.md#putApiV2ExternalAuctionLineItemByLineItemId) | **PUT** /2023-04/retail-media/auction-line-items/{line-item-id} | | -| [**setKeywordBids**](CampaignApi.md#setKeywordBids) | **POST** /2023-04/retail-media/line-items/{id}/keywords/set-bid | | -| [**submitProposal**](CampaignApi.md#submitProposal) | **POST** /2023-04/retail-media/preferred-deal-line-items/{id}/proposal/submit | | +| [**addRemoveKeywords**](CampaignApi.md#addRemoveKeywords) | **POST** /2024-07/retail-media/line-items/{id}/keywords/add-remove | | +| [**createAsset**](CampaignApi.md#createAsset) | **POST** /2024-07/retail-media/assets | | +| [**fetchKeywords**](CampaignApi.md#fetchKeywords) | **GET** /2024-07/retail-media/line-items/{id}/keywords | | +| [**fetchProposal**](CampaignApi.md#fetchProposal) | **GET** /2024-07/retail-media/preferred-deal-line-items/{id}/proposal | | +| [**getApi202110ExternalAccountCreativesByAccountId**](CampaignApi.md#getApi202110ExternalAccountCreativesByAccountId) | **GET** /2024-07/retail-media/accounts/{account-id}/creatives | | +| [**getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId**](CampaignApi.md#getApi202110ExternalAuctionLineItemTargetingKeywordsByLineItemId) | **GET** /2024-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords | | +| [**getApi202110ExternalCampaignPreferredLineItemsByCampaignId**](CampaignApi.md#getApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **GET** /2024-07/retail-media/campaigns/{campaign-id}/preferred-line-items | | +| [**getApi202110ExternalLineItemProductsByLineItemId**](CampaignApi.md#getApi202110ExternalLineItemProductsByLineItemId) | **GET** /2024-07/retail-media/line-items/{line-item-id}/products | | +| [**getApi202110ExternalPreferredLineItemByLineItemId**](CampaignApi.md#getApi202110ExternalPreferredLineItemByLineItemId) | **GET** /2024-07/retail-media/preferred-line-items/{line-item-id} | | +| [**getApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](CampaignApi.md#getApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **GET** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | | +| [**getApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId**](CampaignApi.md#getApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId) | **GET** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences | | +| [**getApi202110ExternalPreferredLineItemTargetingStoresByLineItemId**](CampaignApi.md#getApi202110ExternalPreferredLineItemTargetingStoresByLineItemId) | **GET** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores | | +| [**getApi202110ExternalRetailerPagesByRetailerId**](CampaignApi.md#getApi202110ExternalRetailerPagesByRetailerId) | **GET** /2024-07/retail-media/retailers/{retailerId}/pages | | +| [**getApi202204ExternalCategorieByCategoryId**](CampaignApi.md#getApi202204ExternalCategorieByCategoryId) | **GET** /2024-07/retail-media/categories/{categoryId} | | +| [**getApi202204ExternalCategories**](CampaignApi.md#getApi202204ExternalCategories) | **GET** /2024-07/retail-media/categories | | +| [**getApi202207ExternalRetailerByRetailerIdTemplatestemplateId**](CampaignApi.md#getApi202207ExternalRetailerByRetailerIdTemplatestemplateId) | **GET** /2024-07/retail-media/retailers/{retailer-id}/templates/{template-id} | | +| [**getApi202207ExternalRetailerTemplatesByRetailerId**](CampaignApi.md#getApi202207ExternalRetailerTemplatesByRetailerId) | **GET** /2024-07/retail-media/retailers/{retailer-id}/templates | | +| [**getApi202210ExternalAccountByAccountIdCreativescreativeId**](CampaignApi.md#getApi202210ExternalAccountByAccountIdCreativescreativeId) | **GET** /2024-07/retail-media/accounts/{account-id}/creatives/{creative-id} | | +| [**getApi202301ExternalAccountCampaignsByAccountId**](CampaignApi.md#getApi202301ExternalAccountCampaignsByAccountId) | **GET** /2024-07/retail-media/accounts/{account-id}/campaigns | | +| [**getApi202301ExternalCampaignByCampaignId**](CampaignApi.md#getApi202301ExternalCampaignByCampaignId) | **GET** /2024-07/retail-media/campaigns/{campaignId} | | +| [**getApi202301ExternalLineItemBidMultipliersByLineItemId**](CampaignApi.md#getApi202301ExternalLineItemBidMultipliersByLineItemId) | **GET** /2024-07/retail-media/line-items/{line-item-id}/bid-multipliers | | +| [**getApiV1ExternalAccountBrandsByAccountId**](CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /2024-07/retail-media/accounts/{accountId}/brands | | +| [**getApiV1ExternalAccountRetailersByAccountId**](CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /2024-07/retail-media/accounts/{accountId}/retailers | | +| [**getApiV1ExternalCatalogOutputByCatalogId**](CampaignApi.md#getApiV1ExternalCatalogOutputByCatalogId) | **GET** /2024-07/retail-media/catalogs/{catalogId}/output | | +| [**getApiV1ExternalCatalogStatusByCatalogId**](CampaignApi.md#getApiV1ExternalCatalogStatusByCatalogId) | **GET** /2024-07/retail-media/catalogs/{catalogId}/status | | +| [**getApiV2ExternalAccountLineItemsByAccountId**](CampaignApi.md#getApiV2ExternalAccountLineItemsByAccountId) | **GET** /2024-07/retail-media/accounts/{account-id}/line-items | | +| [**getApiV2ExternalAuctionLineItemByLineItemId**](CampaignApi.md#getApiV2ExternalAuctionLineItemByLineItemId) | **GET** /2024-07/retail-media/auction-line-items/{line-item-id} | | +| [**getApiV2ExternalCampaignAuctionLineItemsByCampaignId**](CampaignApi.md#getApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **GET** /2024-07/retail-media/campaigns/{campaign-id}/auction-line-items | | +| [**getApiV2ExternalLineItemByLineItemId**](CampaignApi.md#getApiV2ExternalLineItemByLineItemId) | **GET** /2024-07/retail-media/line-items/{line-item-id} | | +| [**getCampaignBudgetOverrides**](CampaignApi.md#getCampaignBudgetOverrides) | **GET** /2024-07/retail-media/campaigns/{campaignId}/campaign-budget-overrides | | +| [**getLineItemBudgetOverrides**](CampaignApi.md#getLineItemBudgetOverrides) | **GET** /2024-07/retail-media/line-items/{lineItemId}/line-item-budget-overrides | | +| [**postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId**](CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsAppendByLineItemId) | **POST** /2024-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append | | +| [**postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId**](CampaignApi.md#postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteByLineItemId) | **POST** /2024-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete | | +| [**postApi202110ExternalBalanceCampaignsAppendByBalanceId**](CampaignApi.md#postApi202110ExternalBalanceCampaignsAppendByBalanceId) | **POST** /2024-07/retail-media/balances/{balance-id}/campaigns/append | | +| [**postApi202110ExternalBalanceCampaignsDeleteByBalanceId**](CampaignApi.md#postApi202110ExternalBalanceCampaignsDeleteByBalanceId) | **POST** /2024-07/retail-media/balances/{balance-id}/campaigns/delete | | +| [**postApi202110ExternalCampaignPreferredLineItemsByCampaignId**](CampaignApi.md#postApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **POST** /2024-07/retail-media/campaigns/{campaign-id}/preferred-line-items | | +| [**postApi202110ExternalLineItemProductsAppendByLineItemId**](CampaignApi.md#postApi202110ExternalLineItemProductsAppendByLineItemId) | **POST** /2024-07/retail-media/line-items/{line-item-id}/products/append | | +| [**postApi202110ExternalLineItemProductsDeleteByLineItemId**](CampaignApi.md#postApi202110ExternalLineItemProductsDeleteByLineItemId) | **POST** /2024-07/retail-media/line-items/{line-item-id}/products/delete | | +| [**postApi202110ExternalLineItemProductsPauseByLineItemId**](CampaignApi.md#postApi202110ExternalLineItemProductsPauseByLineItemId) | **POST** /2024-07/retail-media/line-items/{line-item-id}/products/pause | | +| [**postApi202110ExternalLineItemProductsUnpauseByLineItemId**](CampaignApi.md#postApi202110ExternalLineItemProductsUnpauseByLineItemId) | **POST** /2024-07/retail-media/line-items/{line-item-id}/products/unpause | | +| [**postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId**](CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAddToBasketAppendByLineItemId) | **POST** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append | | +| [**postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId**](CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAddToBasketDeleteByLineItemId) | **POST** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete | | +| [**postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId**](CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAudiencesAppendByLineItemId) | **POST** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append | | +| [**postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId**](CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingAudiencesDeleteByLineItemId) | **POST** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete | | +| [**postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId**](CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingStoresAppendByLineItemId) | **POST** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append | | +| [**postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId**](CampaignApi.md#postApi202110ExternalPreferredLineItemTargetingStoresDeleteByLineItemId) | **POST** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete | | +| [**postApi202210ExternalAccountCreativesByAccountId**](CampaignApi.md#postApi202210ExternalAccountCreativesByAccountId) | **POST** /2024-07/retail-media/accounts/{account-id}/creatives | | +| [**postApi202210ExternalAccountCreativesSearchByAccountId**](CampaignApi.md#postApi202210ExternalAccountCreativesSearchByAccountId) | **POST** /2024-07/retail-media/accounts/{account-id}/creatives/search | | +| [**postApi202301ExternalAccountCampaignsByAccountId**](CampaignApi.md#postApi202301ExternalAccountCampaignsByAccountId) | **POST** /2024-07/retail-media/accounts/{account-id}/campaigns | | +| [**postApiV1ExternalAccountCatalogsByAccountId**](CampaignApi.md#postApiV1ExternalAccountCatalogsByAccountId) | **POST** /2024-07/retail-media/accounts/{accountId}/catalogs | | +| [**postApiV2ExternalCampaignAuctionLineItemsByCampaignId**](CampaignApi.md#postApiV2ExternalCampaignAuctionLineItemsByCampaignId) | **POST** /2024-07/retail-media/campaigns/{campaign-id}/auction-line-items | | +| [**putApi202110ExternalPreferredLineItemByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemByLineItemId) | **PUT** /2024-07/retail-media/preferred-line-items/{line-item-id} | | +| [**putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAddToBasketByLineItemId) | **PUT** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket | | +| [**putApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingAudiencesByLineItemId) | **PUT** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences | | +| [**putApi202110ExternalPreferredLineItemTargetingStoresByLineItemId**](CampaignApi.md#putApi202110ExternalPreferredLineItemTargetingStoresByLineItemId) | **PUT** /2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores | | +| [**putApi202210ExternalAccountByAccountIdCreativescreativeId**](CampaignApi.md#putApi202210ExternalAccountByAccountIdCreativescreativeId) | **PUT** /2024-07/retail-media/accounts/{account-id}/creatives/{creative-id} | | +| [**putApi202301ExternalCampaignByCampaignId**](CampaignApi.md#putApi202301ExternalCampaignByCampaignId) | **PUT** /2024-07/retail-media/campaigns/{campaignId} | | +| [**putApi202301ExternalLineItemBidMultipliersByLineItemId**](CampaignApi.md#putApi202301ExternalLineItemBidMultipliersByLineItemId) | **PUT** /2024-07/retail-media/line-items/{line-item-id}/bid-multipliers | | +| [**putApiV2ExternalAuctionLineItemByLineItemId**](CampaignApi.md#putApiV2ExternalAuctionLineItemByLineItemId) | **PUT** /2024-07/retail-media/auction-line-items/{line-item-id} | | +| [**setKeywordBids**](CampaignApi.md#setKeywordBids) | **POST** /2024-07/retail-media/line-items/{id}/keywords/set-bid | | +| [**submitProposal**](CampaignApi.md#submitProposal) | **POST** /2024-07/retail-media/preferred-deal-line-items/{id}/proposal/submit | | +| [**updateCampaignBudgetOverrides**](CampaignApi.md#updateCampaignBudgetOverrides) | **PUT** /2024-07/retail-media/campaigns/{campaignId}/campaign-budget-overrides | | +| [**updateLineItemBudgetOverrides**](CampaignApi.md#updateLineItemBudgetOverrides) | **PUT** /2024-07/retail-media/line-items/{lineItemId}/line-item-budget-overrides | | @@ -80,15 +81,15 @@ Add or Remove keywords from the line item in bulk ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -172,15 +173,15 @@ Creates an asset ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -261,15 +262,15 @@ Fetch keywords associated with the specified line item ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -351,15 +352,15 @@ Includes the state of the proposal, the status of the booking and approval, as w ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -431,101 +432,6 @@ public class Example { | **403** | Forbidden | - | -## getApi202110ExternalAccountBalancesByAccountId - -> Balance202110PagedListResponse getApi202110ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize) - - - -Gets page of balance objects for the given account id - -### Example - -```java -package com.criteo.api.retailmedia.v2023_04; - -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The account to get balances for - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request - try { - Balance202110PagedListResponse result = apiInstance.getApi202110ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApi202110ExternalAccountBalancesByAccountId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The account to get balances for | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | - -### Return type - -[**Balance202110PagedListResponse**](Balance202110PagedListResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - ## getApi202110ExternalAccountCreativesByAccountId > Creative202110ListResponse getApi202110ExternalAccountCreativesByAccountId(accountId) @@ -537,15 +443,15 @@ Get account creatives ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -626,15 +532,15 @@ This endpoint gets the keyword target on the specified line item. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -705,101 +611,6 @@ public class Example { | **400** | Bad Request | - | -## getApi202110ExternalBalanceCampaignsByBalanceId - -> BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize) - - - -Gets page of campaigns for the given balanceId - -### Example - -```java -package com.criteo.api.retailmedia.v2023_04; - -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - String balanceId = "balanceId_example"; // String | The balance to get campaigns from - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request - try { - BalanceCampaign202110PagedListResponse result = apiInstance.getApi202110ExternalBalanceCampaignsByBalanceId(balanceId, limitToId, pageIndex, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApi202110ExternalBalanceCampaignsByBalanceId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **balanceId** | **String**| The balance to get campaigns from | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | - -### Return type - -[**BalanceCampaign202110PagedListResponse**](BalanceCampaign202110PagedListResponse.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - ## getApi202110ExternalCampaignPreferredLineItemsByCampaignId > PreferredLineItem202110PagedListResponse getApi202110ExternalCampaignPreferredLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize) @@ -811,15 +622,15 @@ Gets page of preferred line item objects for the given campaign id ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -907,15 +718,15 @@ This endpoint gets the promoted products on the specified line item. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -1002,15 +813,15 @@ Gets the preferred line item for the given line item id ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -1092,15 +903,15 @@ This endpoint gets the add to basket target on the specified line item. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -1182,15 +993,15 @@ This endpoint gets the audience target on the specified line item. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -1272,15 +1083,15 @@ This endpoint gets the store target on the specified line item. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -1362,15 +1173,15 @@ Get the page types available for the given retailer ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -1451,15 +1262,15 @@ Endpoint to search for a specific category by categoryId. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -1542,15 +1353,15 @@ Endpoint to search categories by text and retailer. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -1637,15 +1448,15 @@ Gets the template for the specified retailer id and template id ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -1728,15 +1539,15 @@ Get retailer creative templates ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -1817,15 +1628,15 @@ Get the specified creative ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -1908,15 +1719,15 @@ Get all the editable and creatable campaign attributes including all types of bu ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -2003,15 +1814,15 @@ Get all the editable and creatable campaign attributes including all types of bu ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -2092,15 +1903,15 @@ Get bid multipliers by line item ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -2181,15 +1992,15 @@ Gets page of retailer objects that are associated with the given account ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -2219,8 +2030,8 @@ public class Example { CampaignApi apiInstance = new CampaignApi(defaultClient); String accountId = "accountId_example"; // String | The given account id List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { JsonApiPageResponseOfBrand result = apiInstance.getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize); System.out.println(result); @@ -2242,8 +2053,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **accountId** | **String**| The given account id | | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type @@ -2256,7 +2067,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/plain, application/json, text/json ### HTTP response details @@ -2276,15 +2087,15 @@ Gets page of retailer objects that are associated with the given account ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -2314,8 +2125,8 @@ public class Example { CampaignApi apiInstance = new CampaignApi(defaultClient); String accountId = "accountId_example"; // String | The given account id List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { JsonApiPageResponseOfRetailer result = apiInstance.getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize); System.out.println(result); @@ -2337,8 +2148,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **accountId** | **String**| The given account id | | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type @@ -2351,7 +2162,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/plain, application/json, text/json ### HTTP response details @@ -2360,26 +2171,26 @@ public class Example { | **200** | Success | - | -## getApiV1ExternalAccounts +## getApiV1ExternalCatalogOutputByCatalogId -> JsonApiPageResponseOfAccount getApiV1ExternalAccounts(limitToId, pageIndex, pageSize) +> File getApiV1ExternalCatalogOutputByCatalogId(catalogId) -Gets page of account objects that the current user can access +Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -2407,14 +2218,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. try { - JsonApiPageResponseOfAccount result = apiInstance.getApiV1ExternalAccounts(limitToId, pageIndex, pageSize); + File result = apiInstance.getApiV1ExternalCatalogOutputByCatalogId(catalogId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccounts"); + System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogOutputByCatalogId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2429,13 +2238,101 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | + +### Return type + +[**File**](File.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/x-json-stream, application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Catalog download initiated. | - | +| **400** | The indicated catalog is not available for retrieval, wait for a success status. | - | + + +## getApiV1ExternalCatalogStatusByCatalogId + +> JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(catalogId) + + + +Check the status of a catalog request. + +### Example + +```java +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CampaignApi apiInstance = new CampaignApi(defaultClient); + String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. + try { + JsonApiSingleResponseOfCatalogStatus result = apiInstance.getApiV1ExternalCatalogStatusByCatalogId(catalogId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogStatusByCatalogId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | ### Return type -[**JsonApiPageResponseOfAccount**](JsonApiPageResponseOfAccount.md) +[**JsonApiSingleResponseOfCatalogStatus**](JsonApiSingleResponseOfCatalogStatus.md) ### Authorization @@ -2450,29 +2347,29 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Success | - | +| **200** | Catalog request found. | - | -## getApiV1ExternalCatalogOutputByCatalogId +## getApiV2ExternalAccountLineItemsByAccountId -> File getApiV1ExternalCatalogOutputByCatalogId(catalogId) +> CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize) -Output the indicated catalog. Catalogs are only available for retrieval when their associated status request is at a Success status. Produces application/x-json-stream of v2021_07 CatalogProduct json objects. +Gets page of line item objects for the given account id ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -2500,12 +2397,17 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. + String accountId = "accountId_example"; // String | The given account id + List limitToCampaignId = Arrays.asList(); // List | The campaign ids that you would like to limit your result set to + String limitToType = "Unknown"; // String | The campaign types that you would like to limit your result set to + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request try { - File result = apiInstance.getApiV1ExternalCatalogOutputByCatalogId(catalogId); + CommonLineItemPagedListResponse result = apiInstance.getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogOutputByCatalogId"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalAccountLineItemsByAccountId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2520,11 +2422,16 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | +| **accountId** | **String**| The given account id | | +| **limitToCampaignId** | [**List<String>**](String.md)| The campaign ids that you would like to limit your result set to | [optional] | +| **limitToType** | **String**| The campaign types that you would like to limit your result set to | [optional] [enum: Unknown, Auction, Preferred] | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | ### Return type -[**File**](File.md) +[**CommonLineItemPagedListResponse**](CommonLineItemPagedListResponse.md) ### Authorization @@ -2533,36 +2440,35 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/x-json-stream, application/json +- **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Catalog download initiated. | - | -| **400** | The indicated catalog is not available for retrieval, wait for a success status. | - | +| **200** | Success | - | -## getApiV1ExternalCatalogStatusByCatalogId +## getApiV2ExternalAuctionLineItemByLineItemId -> JsonApiSingleResponseOfCatalogStatus getApiV1ExternalCatalogStatusByCatalogId(catalogId) +> AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(lineItemId) -Check the status of a catalog request. +Gets the auction line item for the given line item id ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -2590,12 +2496,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String catalogId = "catalogId_example"; // String | A catalog ID returned from an account catalog request. + String lineItemId = "lineItemId_example"; // String | The given line item id try { - JsonApiSingleResponseOfCatalogStatus result = apiInstance.getApiV1ExternalCatalogStatusByCatalogId(catalogId); + AuctionLineItemResponse result = apiInstance.getApiV2ExternalAuctionLineItemByLineItemId(lineItemId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalCatalogStatusByCatalogId"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalAuctionLineItemByLineItemId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2610,11 +2516,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **catalogId** | **String**| A catalog ID returned from an account catalog request. | | +| **lineItemId** | **String**| The given line item id | | ### Return type -[**JsonApiSingleResponseOfCatalogStatus**](JsonApiSingleResponseOfCatalogStatus.md) +[**AuctionLineItemResponse**](AuctionLineItemResponse.md) ### Authorization @@ -2629,29 +2535,30 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Catalog request found. | - | +| **200** | Success | - | +| **400** | Bad Request | - | -## getApiV2ExternalAccountLineItemsByAccountId +## getApiV2ExternalCampaignAuctionLineItemsByCampaignId -> CommonLineItemPagedListResponse getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize) +> AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize) -Gets page of line item objects for the given account id +Gets page of auction line item objects for the given campaign id ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -2679,17 +2586,15 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String accountId = "accountId_example"; // String | The given account id - List limitToCampaignId = Arrays.asList(); // List | The campaign ids that you would like to limit your result set to - String limitToType = "Unknown"; // String | The campaign types that you would like to limit your result set to + String campaignId = "campaignId_example"; // String | The given campaign id List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request try { - CommonLineItemPagedListResponse result = apiInstance.getApiV2ExternalAccountLineItemsByAccountId(accountId, limitToCampaignId, limitToType, limitToId, pageIndex, pageSize); + AuctionLineItemPagedListResponse result = apiInstance.getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalAccountLineItemsByAccountId"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalCampaignAuctionLineItemsByCampaignId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2704,16 +2609,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| The given account id | | -| **limitToCampaignId** | [**List<String>**](String.md)| The campaign ids that you would like to limit your result set to | [optional] | -| **limitToType** | **String**| The campaign types that you would like to limit your result set to | [optional] [enum: Unknown, Auction, Preferred] | +| **campaignId** | **String**| The given campaign id | | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | | **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | | **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | ### Return type -[**CommonLineItemPagedListResponse**](CommonLineItemPagedListResponse.md) +[**AuctionLineItemPagedListResponse**](AuctionLineItemPagedListResponse.md) ### Authorization @@ -2729,28 +2632,29 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Success | - | +| **400** | Bad Request | - | -## getApiV2ExternalAuctionLineItemByLineItemId +## getApiV2ExternalLineItemByLineItemId -> AuctionLineItemResponse getApiV2ExternalAuctionLineItemByLineItemId(lineItemId) +> CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(lineItemId) -Gets the auction line item for the given line item id +Gets the line item for the given line item id ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -2780,10 +2684,10 @@ public class Example { CampaignApi apiInstance = new CampaignApi(defaultClient); String lineItemId = "lineItemId_example"; // String | The given line item id try { - AuctionLineItemResponse result = apiInstance.getApiV2ExternalAuctionLineItemByLineItemId(lineItemId); + CommonLineItemResponse result = apiInstance.getApiV2ExternalLineItemByLineItemId(lineItemId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalAuctionLineItemByLineItemId"); + System.err.println("Exception when calling CampaignApi#getApiV2ExternalLineItemByLineItemId"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2802,7 +2706,7 @@ public class Example { ### Return type -[**AuctionLineItemResponse**](AuctionLineItemResponse.md) +[**CommonLineItemResponse**](CommonLineItemResponse.md) ### Authorization @@ -2818,29 +2722,28 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Success | - | -| **400** | Bad Request | - | -## getApiV2ExternalCampaignAuctionLineItemsByCampaignId +## getCampaignBudgetOverrides -> AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize) +> ValueResourceOutcomeOfCampaignBudgetOverrides getCampaignBudgetOverrides(campaignId) -Gets page of auction line item objects for the given campaign id +Get current campaign budget overrides by given external campaign id. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -2868,15 +2771,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String campaignId = "campaignId_example"; // String | The given campaign id - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + Long campaignId = 56L; // Long | External campaign id. try { - AuctionLineItemPagedListResponse result = apiInstance.getApiV2ExternalCampaignAuctionLineItemsByCampaignId(campaignId, limitToId, pageIndex, pageSize); + ValueResourceOutcomeOfCampaignBudgetOverrides result = apiInstance.getCampaignBudgetOverrides(campaignId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalCampaignAuctionLineItemsByCampaignId"); + System.err.println("Exception when calling CampaignApi#getCampaignBudgetOverrides"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2891,14 +2791,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **campaignId** | **String**| The given campaign id | | -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **campaignId** | **Long**| External campaign id. | | ### Return type -[**AuctionLineItemPagedListResponse**](AuctionLineItemPagedListResponse.md) +[**ValueResourceOutcomeOfCampaignBudgetOverrides**](ValueResourceOutcomeOfCampaignBudgetOverrides.md) ### Authorization @@ -2914,29 +2811,28 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Success | - | -| **400** | Bad Request | - | -## getApiV2ExternalLineItemByLineItemId +## getLineItemBudgetOverrides -> CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(lineItemId) +> ValueResourceOutcomeOfLineItemBudgetOverrides getLineItemBudgetOverrides(lineItemId) -Gets the line item for the given line item id +Gets a collection of monthly and daily budget overrides for the provided line item. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -2964,12 +2860,12 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); CampaignApi apiInstance = new CampaignApi(defaultClient); - String lineItemId = "lineItemId_example"; // String | The given line item id + String lineItemId = "lineItemId_example"; // String | The line item id to get budget overrides for. try { - CommonLineItemResponse result = apiInstance.getApiV2ExternalLineItemByLineItemId(lineItemId); + ValueResourceOutcomeOfLineItemBudgetOverrides result = apiInstance.getLineItemBudgetOverrides(lineItemId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV2ExternalLineItemByLineItemId"); + System.err.println("Exception when calling CampaignApi#getLineItemBudgetOverrides"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2984,11 +2880,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **lineItemId** | **String**| The given line item id | | +| **lineItemId** | **String**| The line item id to get budget overrides for. | | ### Return type -[**CommonLineItemResponse**](CommonLineItemResponse.md) +[**ValueResourceOutcomeOfLineItemBudgetOverrides**](ValueResourceOutcomeOfLineItemBudgetOverrides.md) ### Authorization @@ -3017,15 +2913,15 @@ This endpoint appends one or more keywords to targeting on the specified line it ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -3109,15 +3005,15 @@ This endpoint removes one or more keywords from targeting on the specified line ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -3201,15 +3097,15 @@ appends one or more campaigns to the specified balance ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -3292,15 +3188,15 @@ Removes one or more campaigns on the specified balance ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -3383,15 +3279,15 @@ Creates a new preferred line item with the specified settings ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -3475,15 +3371,15 @@ This endpoint appends one or more products to promote on the specified line item ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -3566,15 +3462,15 @@ This endpoint removes one or more products from promotion on the specified line ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -3657,15 +3553,15 @@ This endpoint pauses one or more promoted products on a specified line item. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -3747,15 +3643,15 @@ This endpoint unpauses one or more promoted products on a specified line item. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -3837,15 +3733,15 @@ This endpoint appends one or more add to basket ids to targeting on the specifie ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -3929,15 +3825,15 @@ This endpoint removes one or more add to basket ids from targeting on the specif ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -4021,15 +3917,15 @@ This endpoint appends one or more audiences ids to targeting on the specified li ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -4113,15 +4009,15 @@ This endpoint removes one or more audiences ids from targeting on the specified ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -4205,15 +4101,15 @@ This endpoint appends one or more store ids to targeting on the specified line i ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -4297,15 +4193,15 @@ This endpoint removes one or more store ids from targeting on the specified line ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -4389,15 +4285,15 @@ Create a creative for an account ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -4480,15 +4376,15 @@ Get account creatives ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -4571,15 +4467,15 @@ Create a campaign and assign budgets for the given account id with creatable cam ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -4662,15 +4558,15 @@ Create a request for a Catalog available to the indicated account. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -4753,15 +4649,15 @@ Creates new auction line item with the specified settings ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -4845,15 +4741,15 @@ Updates the preferred line item for the given line item id ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -4937,15 +4833,15 @@ This endpoint sets the scope of the add to basket target on the specified line i ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -5029,15 +4925,15 @@ This endpoint sets the scope of the audience target on the specified line item. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -5121,15 +5017,15 @@ This endpoint sets the scope of the store target on the specified line item. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -5213,15 +5109,15 @@ Update a creative ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -5307,15 +5203,15 @@ Edit a campaign for the given campaign id with a given editable attributes. This ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -5398,15 +5294,15 @@ Replace bid multipliers on a line item ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -5489,15 +5385,15 @@ Updates the auction line item for the given line item id ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -5581,15 +5477,15 @@ Set bid overrides for associated keywords to the given line item in bulk ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -5673,15 +5569,15 @@ Only the components of the Line Item that are in a valid state will be reviewed. ### Example ```java -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.CampaignApi; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; public class Example { public static void main(String[] args) { @@ -5752,3 +5648,185 @@ public class Example { | **400** | Bad Request | - | | **403** | Forbidden | - | + +## updateCampaignBudgetOverrides + +> ValueResourceOutcomeOfCampaignBudgetOverrides updateCampaignBudgetOverrides(campaignId, valueResourceInputOfCampaignBudgetOverrides) + + + +Update campaign budget overrides by given external campaign id and new campaign budget overrides settings. + +### Example + +```java +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CampaignApi apiInstance = new CampaignApi(defaultClient); + Long campaignId = 56L; // Long | External campaign id. + ValueResourceInputOfCampaignBudgetOverrides valueResourceInputOfCampaignBudgetOverrides = new ValueResourceInputOfCampaignBudgetOverrides(); // ValueResourceInputOfCampaignBudgetOverrides | New campaign budget overrides settings value resource input. + try { + ValueResourceOutcomeOfCampaignBudgetOverrides result = apiInstance.updateCampaignBudgetOverrides(campaignId, valueResourceInputOfCampaignBudgetOverrides); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CampaignApi#updateCampaignBudgetOverrides"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **campaignId** | **Long**| External campaign id. | | +| **valueResourceInputOfCampaignBudgetOverrides** | [**ValueResourceInputOfCampaignBudgetOverrides**](ValueResourceInputOfCampaignBudgetOverrides.md)| New campaign budget overrides settings value resource input. | [optional] | + +### Return type + +[**ValueResourceOutcomeOfCampaignBudgetOverrides**](ValueResourceOutcomeOfCampaignBudgetOverrides.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Success | - | + + +## updateLineItemBudgetOverrides + +> ValueResourceOutcomeOfLineItemBudgetOverrides updateLineItemBudgetOverrides(lineItemId, valueResourceInputOfLineItemBudgetOverrides) + + + +Update line item budget overrides by given external line item id and new line item budget overrides settings. + +### Example + +```java +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.CampaignApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CampaignApi apiInstance = new CampaignApi(defaultClient); + String lineItemId = "lineItemId_example"; // String | Line item external id. + ValueResourceInputOfLineItemBudgetOverrides valueResourceInputOfLineItemBudgetOverrides = new ValueResourceInputOfLineItemBudgetOverrides(); // ValueResourceInputOfLineItemBudgetOverrides | New line item budget overrides settings value resource input. + try { + ValueResourceOutcomeOfLineItemBudgetOverrides result = apiInstance.updateLineItemBudgetOverrides(lineItemId, valueResourceInputOfLineItemBudgetOverrides); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CampaignApi#updateLineItemBudgetOverrides"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **lineItemId** | **String**| Line item external id. | | +| **valueResourceInputOfLineItemBudgetOverrides** | [**ValueResourceInputOfLineItemBudgetOverrides**](ValueResourceInputOfLineItemBudgetOverrides.md)| New line item budget overrides settings value resource input. | [optional] | + +### Return type + +[**ValueResourceOutcomeOfLineItemBudgetOverrides**](ValueResourceOutcomeOfLineItemBudgetOverrides.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Success | - | + diff --git a/sdks/retailmedia_2023-04/docs/CampaignAttributesV202301.md b/sdks/retailmedia_2024-07/docs/CampaignAttributesV202301.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/CampaignAttributesV202301.md rename to sdks/retailmedia_2024-07/docs/CampaignAttributesV202301.md diff --git a/sdks/retailmedia_2024-07/docs/CampaignBudgetOverrides.md b/sdks/retailmedia_2024-07/docs/CampaignBudgetOverrides.md new file mode 100644 index 00000000..2ca090b3 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/CampaignBudgetOverrides.md @@ -0,0 +1,15 @@ + + +# CampaignBudgetOverrides + +Campaign budget overrides including Monthly and Daily budget overrides. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**monthlyBudgetOverrides** | [**List<CampaignMonthlyBudgetOverride>**](CampaignMonthlyBudgetOverride.md) | Campaign budget override monthly part, chronological order restricted. | | +|**dailyBudgetOverrides** | [**List<CampaignDailyBudgetOverride>**](CampaignDailyBudgetOverride.md) | Campaign budget override daily part, chronological order restricted. | | + + + diff --git a/sdks/retailmedia_2024-07/docs/CampaignDailyBudgetOverride.md b/sdks/retailmedia_2024-07/docs/CampaignDailyBudgetOverride.md new file mode 100644 index 00000000..d4a27af1 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/CampaignDailyBudgetOverride.md @@ -0,0 +1,27 @@ + + +# CampaignDailyBudgetOverride + +Campaign daily budget override. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startDate** | **OffsetDateTime** | Daily budget override start date, format \"yyyy-MM-dd\". If it is null, the StartDate would be the following date of the last item in the override sequence. | [optional] | +|**duration** | **String** | The number of DAYs that the override is active from StartDate, e.g. \"1D\". Must end with 'D' or 'd'. | | +|**maxDailySpend** | **Double** | Daily budget override maximum daily spend amount. | | +|**status** | [**StatusEnum**](#StatusEnum) | Daily budget override computed status. | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| EXPIRED | "Expired" | +| ACTIVE | "Active" | +| UPCOMING | "Upcoming" | + + + diff --git a/sdks/retailmedia_2024-07/docs/CampaignMonthlyBudgetOverride.md b/sdks/retailmedia_2024-07/docs/CampaignMonthlyBudgetOverride.md new file mode 100644 index 00000000..22cc2705 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/CampaignMonthlyBudgetOverride.md @@ -0,0 +1,27 @@ + + +# CampaignMonthlyBudgetOverride + +Campaign monthly budget override. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startMonth** | **OffsetDateTime** | Monthly budget override start month, format \"yyyy-MM\". If it is null, the StartMonth would be the following month of the last item in the override sequence. | [optional] | +|**duration** | **String** | The number of MONTHs that the override is active from StartMonth, e.g. \"1M\". Must end with 'M' or 'm'. | | +|**maxMonthlySpend** | **Double** | Monthly budget override maximum monthly spend amount. | | +|**status** | [**StatusEnum**](#StatusEnum) | Monthly budget override computed status. | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| EXPIRED | "Expired" | +| ACTIVE | "Active" | +| UPCOMING | "Upcoming" | + + + diff --git a/sdks/retailmedia_2023-04/docs/CampaignV202301.md b/sdks/retailmedia_2024-07/docs/CampaignV202301.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/CampaignV202301.md rename to sdks/retailmedia_2024-07/docs/CampaignV202301.md diff --git a/sdks/retailmedia_2023-04/docs/Category202204.md b/sdks/retailmedia_2024-07/docs/Category202204.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/Category202204.md rename to sdks/retailmedia_2024-07/docs/Category202204.md diff --git a/sdks/retailmedia_2023-04/docs/Category202204ListResponse.md b/sdks/retailmedia_2024-07/docs/Category202204ListResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/Category202204ListResponse.md rename to sdks/retailmedia_2024-07/docs/Category202204ListResponse.md diff --git a/sdks/retailmedia_2024-07/docs/ChangeDatesOfBalanceRequest.md b/sdks/retailmedia_2024-07/docs/ChangeDatesOfBalanceRequest.md new file mode 100644 index 00000000..a3c847e6 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ChangeDatesOfBalanceRequest.md @@ -0,0 +1,14 @@ + + +# ChangeDatesOfBalanceRequest + +Data model for an input resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ResourceOfChangeDatesOfBalance**](ResourceOfChangeDatesOfBalance.md) | | [optional] | + + + diff --git a/sdks/retailmedia_2024-07/docs/ChangeDetailsV1.md b/sdks/retailmedia_2024-07/docs/ChangeDetailsV1.md new file mode 100644 index 00000000..14bb8a12 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ChangeDetailsV1.md @@ -0,0 +1,16 @@ + + +# ChangeDetailsV1 + +Change details of a property of the balance. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**previousValue** | **String** | Previous value of a property of the insertion order. | | +|**currentValue** | **String** | Current value of a property of the insertion order. | | +|**changeValue** | **String** | Change detail of a property of the insertion order. | | + + + diff --git a/sdks/retailmedia_2023-04/docs/ChoiceOption.md b/sdks/retailmedia_2024-07/docs/ChoiceOption.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ChoiceOption.md rename to sdks/retailmedia_2024-07/docs/ChoiceOption.md diff --git a/sdks/retailmedia_2023-04/docs/ChoiceVariableSpecification.md b/sdks/retailmedia_2024-07/docs/ChoiceVariableSpecification.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ChoiceVariableSpecification.md rename to sdks/retailmedia_2024-07/docs/ChoiceVariableSpecification.md diff --git a/sdks/retailmedia_2023-04/docs/ChoiceVariableValue.md b/sdks/retailmedia_2024-07/docs/ChoiceVariableValue.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ChoiceVariableValue.md rename to sdks/retailmedia_2024-07/docs/ChoiceVariableValue.md diff --git a/sdks/retailmedia_2023-04/docs/ColorVariableValue.md b/sdks/retailmedia_2024-07/docs/ColorVariableValue.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ColorVariableValue.md rename to sdks/retailmedia_2024-07/docs/ColorVariableValue.md diff --git a/sdks/retailmedia_2023-04/docs/CommonError.md b/sdks/retailmedia_2024-07/docs/CommonError.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/CommonError.md rename to sdks/retailmedia_2024-07/docs/CommonError.md diff --git a/sdks/retailmedia_2023-04/docs/CommonLineItemPagedListResponse.md b/sdks/retailmedia_2024-07/docs/CommonLineItemPagedListResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/CommonLineItemPagedListResponse.md rename to sdks/retailmedia_2024-07/docs/CommonLineItemPagedListResponse.md diff --git a/sdks/retailmedia_2023-04/docs/CommonLineItemResponse.md b/sdks/retailmedia_2024-07/docs/CommonLineItemResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/CommonLineItemResponse.md rename to sdks/retailmedia_2024-07/docs/CommonLineItemResponse.md diff --git a/sdks/marketingsolutions_2023-04/docs/CommonProblem.md b/sdks/retailmedia_2024-07/docs/CommonProblem.md similarity index 89% rename from sdks/marketingsolutions_2023-04/docs/CommonProblem.md rename to sdks/retailmedia_2024-07/docs/CommonProblem.md index 1ee7a1f1..3f7f164b 100644 --- a/sdks/marketingsolutions_2023-04/docs/CommonProblem.md +++ b/sdks/retailmedia_2024-07/docs/CommonProblem.md @@ -2,7 +2,7 @@ # CommonProblem -Common problem object. Can be specialized as needed. +Common problem object. ## Properties @@ -11,7 +11,7 @@ Common problem object. Can be specialized as needed. |**traceId** | **String** | The request correlation ID this problem comes from. | [optional] | |**traceIdentifier** | **String** | The request correlation ID this problem comes from. (deprecated, use traceId instead) | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The problem's category. | [optional] | -|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | +|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | |**instance** | **String** | A URI that identifies the specific occurrence of the problem. | [optional] | |**title** | **String** | A short human-readable description of the problem type | [optional] | |**detail** | **String** | A human-readable explanation specific to this occurrence of the problem | [optional] | diff --git a/sdks/retailmedia_2023-04/docs/CommonWarning.md b/sdks/retailmedia_2024-07/docs/CommonWarning.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/CommonWarning.md rename to sdks/retailmedia_2024-07/docs/CommonWarning.md diff --git a/sdks/retailmedia_2024-07/docs/CreateBalanceRequest.md b/sdks/retailmedia_2024-07/docs/CreateBalanceRequest.md new file mode 100644 index 00000000..5942f408 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/CreateBalanceRequest.md @@ -0,0 +1,14 @@ + + +# CreateBalanceRequest + +Data model for an input resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ResourceOfCreateBalance**](ResourceOfCreateBalance.md) | | [optional] | + + + diff --git a/sdks/retailmedia_2023-04/docs/Creative202110.md b/sdks/retailmedia_2024-07/docs/Creative202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/Creative202110.md rename to sdks/retailmedia_2024-07/docs/Creative202110.md diff --git a/sdks/retailmedia_2023-04/docs/Creative202110ListResponse.md b/sdks/retailmedia_2024-07/docs/Creative202110ListResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/Creative202110ListResponse.md rename to sdks/retailmedia_2024-07/docs/Creative202110ListResponse.md diff --git a/sdks/retailmedia_2023-04/docs/Creative202210.md b/sdks/retailmedia_2024-07/docs/Creative202210.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/Creative202210.md rename to sdks/retailmedia_2024-07/docs/Creative202210.md diff --git a/sdks/retailmedia_2023-04/docs/Creative202210ListResponse.md b/sdks/retailmedia_2024-07/docs/Creative202210ListResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/Creative202210ListResponse.md rename to sdks/retailmedia_2024-07/docs/Creative202210ListResponse.md diff --git a/sdks/retailmedia_2023-04/docs/Creative202210Response.md b/sdks/retailmedia_2024-07/docs/Creative202210Response.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/Creative202210Response.md rename to sdks/retailmedia_2024-07/docs/Creative202210Response.md diff --git a/sdks/retailmedia_2023-04/docs/CreativeCreateModel202207.md b/sdks/retailmedia_2024-07/docs/CreativeCreateModel202207.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/CreativeCreateModel202207.md rename to sdks/retailmedia_2024-07/docs/CreativeCreateModel202207.md diff --git a/sdks/retailmedia_2023-04/docs/CreativeUpdateModel202207.md b/sdks/retailmedia_2024-07/docs/CreativeUpdateModel202207.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/CreativeUpdateModel202207.md rename to sdks/retailmedia_2024-07/docs/CreativeUpdateModel202207.md diff --git a/sdks/retailmedia_2024-07/docs/DailyLineItemBudgetOverride.md b/sdks/retailmedia_2024-07/docs/DailyLineItemBudgetOverride.md new file mode 100644 index 00000000..e0601a64 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/DailyLineItemBudgetOverride.md @@ -0,0 +1,27 @@ + + +# DailyLineItemBudgetOverride + +The details for a daily budget override + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startDate** | **OffsetDateTime** | Daily budget override start date, format \"yyyy-MM-dd\". If it is null, the StartDate would be the following date of the last item in the override sequence. | [optional] | +|**duration** | **String** | The number of DAYs that the override is active from StartDate, e.g. \"1D\". Must end with 'D' or 'd'. | | +|**maxDailySpend** | **Double** | Daily budget override maximum daily spend amount. | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Daily budget override computed status. | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| EXPIRED | "Expired" | +| ACTIVE | "Active" | +| UPCOMING | "Upcoming" | + + + diff --git a/sdks/retailmedia_2023-04/docs/EditableCampaignAttributesV202301.md b/sdks/retailmedia_2024-07/docs/EditableCampaignAttributesV202301.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/EditableCampaignAttributesV202301.md rename to sdks/retailmedia_2024-07/docs/EditableCampaignAttributesV202301.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalAccount.md b/sdks/retailmedia_2024-07/docs/ExternalAccount.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalAccount.md rename to sdks/retailmedia_2024-07/docs/ExternalAccount.md diff --git a/sdks/retailmedia_2024-07/docs/ExternalAddFundsToBalance.md b/sdks/retailmedia_2024-07/docs/ExternalAddFundsToBalance.md new file mode 100644 index 00000000..f5f05588 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ExternalAddFundsToBalance.md @@ -0,0 +1,16 @@ + + +# ExternalAddFundsToBalance + +An object that represents the available options of adding funds to a balance. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**deltaAmount** | **Double** | Amount of billable funds to be added / decreased allotted to the balance. | | +|**poNumber** | **String** | Purchase Order number. | [optional] | +|**memo** | **String** | Memo | | + + + diff --git a/sdks/retailmedia_2023-04/docs/ExternalAddToBasketIdsUpdateModel202110.md b/sdks/retailmedia_2024-07/docs/ExternalAddToBasketIdsUpdateModel202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalAddToBasketIdsUpdateModel202110.md rename to sdks/retailmedia_2024-07/docs/ExternalAddToBasketIdsUpdateModel202110.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalAddToBasketTarget202110.md b/sdks/retailmedia_2024-07/docs/ExternalAddToBasketTarget202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalAddToBasketTarget202110.md rename to sdks/retailmedia_2024-07/docs/ExternalAddToBasketTarget202110.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalAuctionLineItem.md b/sdks/retailmedia_2024-07/docs/ExternalAuctionLineItem.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalAuctionLineItem.md rename to sdks/retailmedia_2024-07/docs/ExternalAuctionLineItem.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalAuctionLineItemCreateModel.md b/sdks/retailmedia_2024-07/docs/ExternalAuctionLineItemCreateModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalAuctionLineItemCreateModel.md rename to sdks/retailmedia_2024-07/docs/ExternalAuctionLineItemCreateModel.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalAuctionLineItemUpdateModel.md b/sdks/retailmedia_2024-07/docs/ExternalAuctionLineItemUpdateModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalAuctionLineItemUpdateModel.md rename to sdks/retailmedia_2024-07/docs/ExternalAuctionLineItemUpdateModel.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalAudienceIdsUpdateModel202110.md b/sdks/retailmedia_2024-07/docs/ExternalAudienceIdsUpdateModel202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalAudienceIdsUpdateModel202110.md rename to sdks/retailmedia_2024-07/docs/ExternalAudienceIdsUpdateModel202110.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalAudienceTarget202110.md b/sdks/retailmedia_2024-07/docs/ExternalAudienceTarget202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalAudienceTarget202110.md rename to sdks/retailmedia_2024-07/docs/ExternalAudienceTarget202110.md diff --git a/sdks/retailmedia_2024-07/docs/ExternalBalanceResponse.md b/sdks/retailmedia_2024-07/docs/ExternalBalanceResponse.md new file mode 100644 index 00000000..127b9534 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ExternalBalanceResponse.md @@ -0,0 +1,70 @@ + + +# ExternalBalanceResponse + +A Retail Media Balance used to determine the funds available for any or all campaigns in an account + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the balance. | | +|**poNumber** | **String** | Purchase Order number. | | +|**memo** | **String** | Memo | | +|**deposited** | **BigDecimal** | Amount of billable funds allotted to the balance. | | +|**spent** | **BigDecimal** | | | +|**remaining** | **BigDecimal** | | | +|**startDate** | **LocalDate** | Represents the Date as a year, month, and day in the format YYYY-MM-DD | | +|**endDate** | **LocalDate** | Represents the Date as a year, month, and day in the format YYYY-MM-DD | | +|**status** | [**StatusEnum**](#StatusEnum) | | | +|**createdAt** | **OffsetDateTime** | | | +|**updatedAt** | **OffsetDateTime** | | | +|**balanceType** | [**BalanceTypeEnum**](#BalanceTypeEnum) | Type of the balance | | +|**salesForceId** | **String** | SalesForceId the balance is linked to. | | +|**spendType** | [**SpendTypeEnum**](#SpendTypeEnum) | Spend Type of the balance. | | +|**privateMarketBillingType** | [**PrivateMarketBillingTypeEnum**](#PrivateMarketBillingTypeEnum) | Billing type for Private Market. | | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "unknown" | +| SCHEDULED | "scheduled" | +| ACTIVE | "active" | +| ENDED | "ended" | + + + +## Enum: BalanceTypeEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "unknown" | +| CAPPED | "capped" | +| UNCAPPED | "uncapped" | + + + +## Enum: SpendTypeEnum + +| Name | Value | +|---- | -----| +| ONSITE | "Onsite" | +| OFFSITE | "Offsite" | +| OFFSITEAWARENESS | "OffsiteAwareness" | + + + +## Enum: PrivateMarketBillingTypeEnum + +| Name | Value | +|---- | -----| +| NOTAPPLICABLE | "NotApplicable" | +| BILLBYRETAILER | "BillByRetailer" | +| BILLBYCRITEO | "BillByCriteo" | +| UNKNOWN | "Unknown" | + + + diff --git a/sdks/retailmedia_2023-04/docs/ExternalBrand.md b/sdks/retailmedia_2024-07/docs/ExternalBrand.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalBrand.md rename to sdks/retailmedia_2024-07/docs/ExternalBrand.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalCatalogRequest.md b/sdks/retailmedia_2024-07/docs/ExternalCatalogRequest.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalCatalogRequest.md rename to sdks/retailmedia_2024-07/docs/ExternalCatalogRequest.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalCatalogStatus.md b/sdks/retailmedia_2024-07/docs/ExternalCatalogStatus.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalCatalogStatus.md rename to sdks/retailmedia_2024-07/docs/ExternalCatalogStatus.md diff --git a/sdks/retailmedia_2024-07/docs/ExternalChangeDatesOfBalance.md b/sdks/retailmedia_2024-07/docs/ExternalChangeDatesOfBalance.md new file mode 100644 index 00000000..04ee6658 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ExternalChangeDatesOfBalance.md @@ -0,0 +1,16 @@ + + +# ExternalChangeDatesOfBalance + +An object that represents the available options to modify schedule of a balance. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startDate** | **LocalDate** | Represents the Date as a year, month, and day in the format YYYY-MM-DD | | +|**endDate** | **LocalDate** | Represents the Date as a year, month, and day in the format YYYY-MM-DD | | +|**memo** | **String** | Memo | | + + + diff --git a/sdks/retailmedia_2023-04/docs/ExternalCommonLineItem.md b/sdks/retailmedia_2024-07/docs/ExternalCommonLineItem.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalCommonLineItem.md rename to sdks/retailmedia_2024-07/docs/ExternalCommonLineItem.md diff --git a/sdks/retailmedia_2024-07/docs/ExternalCreateBalance.md b/sdks/retailmedia_2024-07/docs/ExternalCreateBalance.md new file mode 100644 index 00000000..99a65b80 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ExternalCreateBalance.md @@ -0,0 +1,31 @@ + + +# ExternalCreateBalance + +An object that represents the available options to set when creating a Retail Media Balance + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the balance. | | +|**poNumber** | **String** | Purchase Order number. | [optional] | +|**deposited** | **BigDecimal** | Amount of billable funds allotted to the balance. | | +|**startDate** | **LocalDate** | Represents the Date as a year, month, and day in the format YYYY-MM-DD | | +|**endDate** | **LocalDate** | Represents the Date as a year, month, and day in the format YYYY-MM-DD | | +|**spendType** | [**SpendTypeEnum**](#SpendTypeEnum) | Type of the balance spend. | | +|**memo** | **String** | Memo | | +|**salesForceId** | **String** | SalesForceId the balance is linked to. | | + + + +## Enum: SpendTypeEnum + +| Name | Value | +|---- | -----| +| ONSITE | "Onsite" | +| OFFSITE | "Offsite" | +| OFFSITEAWARENESS | "OffsiteAwareness" | + + + diff --git a/sdks/retailmedia_2023-04/docs/ExternalKeywordTarget202110.md b/sdks/retailmedia_2024-07/docs/ExternalKeywordTarget202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalKeywordTarget202110.md rename to sdks/retailmedia_2024-07/docs/ExternalKeywordTarget202110.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalLineItemCapping202110.md b/sdks/retailmedia_2024-07/docs/ExternalLineItemCapping202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalLineItemCapping202110.md rename to sdks/retailmedia_2024-07/docs/ExternalLineItemCapping202110.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalLineItemPage202110.md b/sdks/retailmedia_2024-07/docs/ExternalLineItemPage202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalLineItemPage202110.md rename to sdks/retailmedia_2024-07/docs/ExternalLineItemPage202110.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalLineItemPageCategory202110.md b/sdks/retailmedia_2024-07/docs/ExternalLineItemPageCategory202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalLineItemPageCategory202110.md rename to sdks/retailmedia_2024-07/docs/ExternalLineItemPageCategory202110.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalPreferredLineItem202110.md b/sdks/retailmedia_2024-07/docs/ExternalPreferredLineItem202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalPreferredLineItem202110.md rename to sdks/retailmedia_2024-07/docs/ExternalPreferredLineItem202110.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalPreferredLineItemCreateModel202110.md b/sdks/retailmedia_2024-07/docs/ExternalPreferredLineItemCreateModel202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalPreferredLineItemCreateModel202110.md rename to sdks/retailmedia_2024-07/docs/ExternalPreferredLineItemCreateModel202110.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalPreferredLineItemUpdateModel202110.md b/sdks/retailmedia_2024-07/docs/ExternalPreferredLineItemUpdateModel202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalPreferredLineItemUpdateModel202110.md rename to sdks/retailmedia_2024-07/docs/ExternalPreferredLineItemUpdateModel202110.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalPromotedProduct202110.md b/sdks/retailmedia_2024-07/docs/ExternalPromotedProduct202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalPromotedProduct202110.md rename to sdks/retailmedia_2024-07/docs/ExternalPromotedProduct202110.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalRetailer.md b/sdks/retailmedia_2024-07/docs/ExternalRetailer.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalRetailer.md rename to sdks/retailmedia_2024-07/docs/ExternalRetailer.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalRetailerPages202110.md b/sdks/retailmedia_2024-07/docs/ExternalRetailerPages202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalRetailerPages202110.md rename to sdks/retailmedia_2024-07/docs/ExternalRetailerPages202110.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalStoreIdsUpdateModel202110.md b/sdks/retailmedia_2024-07/docs/ExternalStoreIdsUpdateModel202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalStoreIdsUpdateModel202110.md rename to sdks/retailmedia_2024-07/docs/ExternalStoreIdsUpdateModel202110.md diff --git a/sdks/retailmedia_2023-04/docs/ExternalStoreTarget202110.md b/sdks/retailmedia_2024-07/docs/ExternalStoreTarget202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ExternalStoreTarget202110.md rename to sdks/retailmedia_2024-07/docs/ExternalStoreTarget202110.md diff --git a/sdks/retailmedia_2024-07/docs/ExternalUpdateBalanceModel.md b/sdks/retailmedia_2024-07/docs/ExternalUpdateBalanceModel.md new file mode 100644 index 00000000..2e08478b --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ExternalUpdateBalanceModel.md @@ -0,0 +1,19 @@ + + +# ExternalUpdateBalanceModel + +An object that represents the available options to set when updating a Retail Media Balance + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the balance. | [optional] | +|**poNumber** | **String** | Purchase Order number. | [optional] | +|**salesForceId** | **String** | SalesForceId the balance is linked to. | [optional] | +|**startDate** | **LocalDate** | Represents the Date as a year, month, and day in the format YYYY-MM-DD | [optional] | +|**endDate** | **LocalDate** | Represents the Date as a year, month, and day in the format YYYY-MM-DD | [optional] | +|**memo** | **String** | Memo | [optional] | + + + diff --git a/sdks/retailmedia_2023-04/docs/FilesVariableValue.md b/sdks/retailmedia_2024-07/docs/FilesVariableValue.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/FilesVariableValue.md rename to sdks/retailmedia_2024-07/docs/FilesVariableValue.md diff --git a/sdks/retailmedia_2023-04/docs/FilesVariablesSpecification.md b/sdks/retailmedia_2024-07/docs/FilesVariablesSpecification.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/FilesVariablesSpecification.md rename to sdks/retailmedia_2024-07/docs/FilesVariablesSpecification.md diff --git a/sdks/retailmedia_2023-04/docs/GatewayApi.md b/sdks/retailmedia_2024-07/docs/GatewayApi.md similarity index 85% rename from sdks/retailmedia_2023-04/docs/GatewayApi.md rename to sdks/retailmedia_2024-07/docs/GatewayApi.md index 10ac0bb5..e46d4d2d 100644 --- a/sdks/retailmedia_2023-04/docs/GatewayApi.md +++ b/sdks/retailmedia_2024-07/docs/GatewayApi.md @@ -4,7 +4,7 @@ All URIs are relative to *https://api.criteo.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getCurrentApplication**](GatewayApi.md#getCurrentApplication) | **GET** /2023-04/retail-media/me | | +| [**getCurrentApplication**](GatewayApi.md#getCurrentApplication) | **GET** /2024-07/retail-media/me | | @@ -19,15 +19,15 @@ Get information about the currently logged application ### Example ```java -package com.criteo.api.retailmedia.v2023_04; - -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.auth.*; -import com.criteo.api.retailmedia.v2023_04.model.*; -import com.criteo.api.retailmedia.v2023_04.api.GatewayApi; +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.auth.*; +import com.criteo.api.retailmedia.v2024_07.model.*; +import com.criteo.api.retailmedia.v2024_07.api.GatewayApi; public class Example { public static void main(String[] args) { diff --git a/sdks/retailmedia_2023-04/docs/HyperlinkVariableValue.md b/sdks/retailmedia_2024-07/docs/HyperlinkVariableValue.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/HyperlinkVariableValue.md rename to sdks/retailmedia_2024-07/docs/HyperlinkVariableValue.md diff --git a/sdks/retailmedia_2023-04/docs/InputKeywordsModel.md b/sdks/retailmedia_2024-07/docs/InputKeywordsModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/InputKeywordsModel.md rename to sdks/retailmedia_2024-07/docs/InputKeywordsModel.md diff --git a/sdks/retailmedia_2023-04/docs/InputResourceOfAuctionLineItemCreateModel.md b/sdks/retailmedia_2024-07/docs/InputResourceOfAuctionLineItemCreateModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/InputResourceOfAuctionLineItemCreateModel.md rename to sdks/retailmedia_2024-07/docs/InputResourceOfAuctionLineItemCreateModel.md diff --git a/sdks/retailmedia_2023-04/docs/InputResourceOfPreferredLineItemCreateModel202110.md b/sdks/retailmedia_2024-07/docs/InputResourceOfPreferredLineItemCreateModel202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/InputResourceOfPreferredLineItemCreateModel202110.md rename to sdks/retailmedia_2024-07/docs/InputResourceOfPreferredLineItemCreateModel202110.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.md b/sdks/retailmedia_2024-07/docs/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.md rename to sdks/retailmedia_2024-07/docs/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiBodyWithIdOfInt64AndAccountAndAccount.md b/sdks/retailmedia_2024-07/docs/JsonApiBodyWithIdOfInt64AndAccountAndAccount.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiBodyWithIdOfInt64AndAccountAndAccount.md rename to sdks/retailmedia_2024-07/docs/JsonApiBodyWithIdOfInt64AndAccountAndAccount.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiBodyWithIdOfInt64AndBrandAndBrand.md b/sdks/retailmedia_2024-07/docs/JsonApiBodyWithIdOfInt64AndBrandAndBrand.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiBodyWithIdOfInt64AndBrandAndBrand.md rename to sdks/retailmedia_2024-07/docs/JsonApiBodyWithIdOfInt64AndBrandAndBrand.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.md b/sdks/retailmedia_2024-07/docs/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.md rename to sdks/retailmedia_2024-07/docs/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md b/sdks/retailmedia_2024-07/docs/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md rename to sdks/retailmedia_2024-07/docs/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.md b/sdks/retailmedia_2024-07/docs/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.md rename to sdks/retailmedia_2024-07/docs/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md b/sdks/retailmedia_2024-07/docs/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md rename to sdks/retailmedia_2024-07/docs/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.md b/sdks/retailmedia_2024-07/docs/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.md rename to sdks/retailmedia_2024-07/docs/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.md b/sdks/retailmedia_2024-07/docs/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.md rename to sdks/retailmedia_2024-07/docs/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiPageResponseOfAccount.md b/sdks/retailmedia_2024-07/docs/JsonApiPageResponseOfAccount.md similarity index 88% rename from sdks/retailmedia_2023-04/docs/JsonApiPageResponseOfAccount.md rename to sdks/retailmedia_2024-07/docs/JsonApiPageResponseOfAccount.md index af50ec88..aa059cfb 100644 --- a/sdks/retailmedia_2023-04/docs/JsonApiPageResponseOfAccount.md +++ b/sdks/retailmedia_2024-07/docs/JsonApiPageResponseOfAccount.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndAccountAndAccount>**](JsonApiBodyWithIdOfInt64AndAccountAndAccount.md) | | | diff --git a/sdks/retailmedia_2023-04/docs/JsonApiPageResponseOfBrand.md b/sdks/retailmedia_2024-07/docs/JsonApiPageResponseOfBrand.md similarity index 88% rename from sdks/retailmedia_2023-04/docs/JsonApiPageResponseOfBrand.md rename to sdks/retailmedia_2024-07/docs/JsonApiPageResponseOfBrand.md index 0c2714ac..83498f93 100644 --- a/sdks/retailmedia_2023-04/docs/JsonApiPageResponseOfBrand.md +++ b/sdks/retailmedia_2024-07/docs/JsonApiPageResponseOfBrand.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndBrandAndBrand>**](JsonApiBodyWithIdOfInt64AndBrandAndBrand.md) | | | diff --git a/sdks/retailmedia_2023-04/docs/JsonApiPageResponseOfCampaignV202301.md b/sdks/retailmedia_2024-07/docs/JsonApiPageResponseOfCampaignV202301.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiPageResponseOfCampaignV202301.md rename to sdks/retailmedia_2024-07/docs/JsonApiPageResponseOfCampaignV202301.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiPageResponseOfRetailer.md b/sdks/retailmedia_2024-07/docs/JsonApiPageResponseOfRetailer.md similarity index 88% rename from sdks/retailmedia_2023-04/docs/JsonApiPageResponseOfRetailer.md rename to sdks/retailmedia_2024-07/docs/JsonApiPageResponseOfRetailer.md index e62ca2fd..4c29b7d7 100644 --- a/sdks/retailmedia_2023-04/docs/JsonApiPageResponseOfRetailer.md +++ b/sdks/retailmedia_2024-07/docs/JsonApiPageResponseOfRetailer.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndRetailerAndRetailer>**](JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md) | | | diff --git a/sdks/retailmedia_2023-04/docs/JsonApiRequestOfCatalogRequest.md b/sdks/retailmedia_2024-07/docs/JsonApiRequestOfCatalogRequest.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiRequestOfCatalogRequest.md rename to sdks/retailmedia_2024-07/docs/JsonApiRequestOfCatalogRequest.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiSingleResponseOfCampaignV202301.md b/sdks/retailmedia_2024-07/docs/JsonApiSingleResponseOfCampaignV202301.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiSingleResponseOfCampaignV202301.md rename to sdks/retailmedia_2024-07/docs/JsonApiSingleResponseOfCampaignV202301.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiSingleResponseOfCatalogStatus.md b/sdks/retailmedia_2024-07/docs/JsonApiSingleResponseOfCatalogStatus.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiSingleResponseOfCatalogStatus.md rename to sdks/retailmedia_2024-07/docs/JsonApiSingleResponseOfCatalogStatus.md diff --git a/sdks/retailmedia_2023-04/docs/JsonApiSingleResponseOfLineItemBidMultipliers.md b/sdks/retailmedia_2024-07/docs/JsonApiSingleResponseOfLineItemBidMultipliers.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/JsonApiSingleResponseOfLineItemBidMultipliers.md rename to sdks/retailmedia_2024-07/docs/JsonApiSingleResponseOfLineItemBidMultipliers.md diff --git a/sdks/retailmedia_2023-04/docs/KeywordDataModel.md b/sdks/retailmedia_2024-07/docs/KeywordDataModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/KeywordDataModel.md rename to sdks/retailmedia_2024-07/docs/KeywordDataModel.md diff --git a/sdks/retailmedia_2023-04/docs/KeywordTarget202110Request.md b/sdks/retailmedia_2024-07/docs/KeywordTarget202110Request.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/KeywordTarget202110Request.md rename to sdks/retailmedia_2024-07/docs/KeywordTarget202110Request.md diff --git a/sdks/retailmedia_2023-04/docs/KeywordTarget202110Response.md b/sdks/retailmedia_2024-07/docs/KeywordTarget202110Response.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/KeywordTarget202110Response.md rename to sdks/retailmedia_2024-07/docs/KeywordTarget202110Response.md diff --git a/sdks/retailmedia_2023-04/docs/KeywordsModel.md b/sdks/retailmedia_2024-07/docs/KeywordsModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/KeywordsModel.md rename to sdks/retailmedia_2024-07/docs/KeywordsModel.md diff --git a/sdks/retailmedia_2023-04/docs/KeywordsModelResource.md b/sdks/retailmedia_2024-07/docs/KeywordsModelResource.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/KeywordsModelResource.md rename to sdks/retailmedia_2024-07/docs/KeywordsModelResource.md diff --git a/sdks/retailmedia_2023-04/docs/KeywordsModelResponse.md b/sdks/retailmedia_2024-07/docs/KeywordsModelResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/KeywordsModelResponse.md rename to sdks/retailmedia_2024-07/docs/KeywordsModelResponse.md diff --git a/sdks/retailmedia_2023-04/docs/LineItemBidMultipliers.md b/sdks/retailmedia_2024-07/docs/LineItemBidMultipliers.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/LineItemBidMultipliers.md rename to sdks/retailmedia_2024-07/docs/LineItemBidMultipliers.md diff --git a/sdks/retailmedia_2023-04/docs/LineItemBidMultipliersRequest.md b/sdks/retailmedia_2024-07/docs/LineItemBidMultipliersRequest.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/LineItemBidMultipliersRequest.md rename to sdks/retailmedia_2024-07/docs/LineItemBidMultipliersRequest.md diff --git a/sdks/retailmedia_2023-04/docs/LineItemBidMultipliersResponse.md b/sdks/retailmedia_2024-07/docs/LineItemBidMultipliersResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/LineItemBidMultipliersResponse.md rename to sdks/retailmedia_2024-07/docs/LineItemBidMultipliersResponse.md diff --git a/sdks/retailmedia_2024-07/docs/LineItemBudgetOverrides.md b/sdks/retailmedia_2024-07/docs/LineItemBudgetOverrides.md new file mode 100644 index 00000000..a155e12c --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/LineItemBudgetOverrides.md @@ -0,0 +1,15 @@ + + +# LineItemBudgetOverrides + +Line item budget overrides including Monthly and Daily budget overrides. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**monthlyLineItemBudgetOverrides** | [**List<MonthlyLineItemBudegetOverride>**](MonthlyLineItemBudegetOverride.md) | Line item budget override monthly part, chronological order restricted. | | +|**dailyLineItemBudgetOverrides** | [**List<DailyLineItemBudgetOverride>**](DailyLineItemBudgetOverride.md) | Line item budget override daily part, chronological order restricted. | | + + + diff --git a/sdks/retailmedia_2023-04/docs/MatchTypeModel.md b/sdks/retailmedia_2024-07/docs/MatchTypeModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/MatchTypeModel.md rename to sdks/retailmedia_2024-07/docs/MatchTypeModel.md diff --git a/sdks/retailmedia_2024-07/docs/Metadata.md b/sdks/retailmedia_2024-07/docs/Metadata.md new file mode 100644 index 00000000..9ba9b303 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/Metadata.md @@ -0,0 +1,16 @@ + + +# Metadata + +Metadata related to the current request. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**count** | **Long** | | [optional] | +|**offset** | **Integer** | The (zero-based) starting offset in the collection. | | +|**limit** | **Integer** | The number of elements to be returned. | | + + + diff --git a/sdks/retailmedia_2024-07/docs/MonthlyLineItemBudegetOverride.md b/sdks/retailmedia_2024-07/docs/MonthlyLineItemBudegetOverride.md new file mode 100644 index 00000000..ce8a5cdd --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/MonthlyLineItemBudegetOverride.md @@ -0,0 +1,27 @@ + + +# MonthlyLineItemBudegetOverride + +The details for a monthly budget override + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startMonth** | **OffsetDateTime** | Monthly budget override start month, format \"yyyy-MM\". If it is null, the StartMonth would be the following month of the last item in the override sequence. | [optional] | +|**duration** | **String** | The number of MONTHs that the override is active from StartMonth, e.g. \"1M\". Must end with 'M' or 'm'. | | +|**maxMonthlySpend** | **Double** | Monthly budget override maximum monthly spend amount. | | +|**status** | [**StatusEnum**](#StatusEnum) | Monthly budget override computed status. | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| EXPIRED | "Expired" | +| ACTIVE | "Active" | +| UPCOMING | "Upcoming" | + + + diff --git a/sdks/retailmedia_2023-04/docs/NegotiationStateModel.md b/sdks/retailmedia_2024-07/docs/NegotiationStateModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/NegotiationStateModel.md rename to sdks/retailmedia_2024-07/docs/NegotiationStateModel.md diff --git a/sdks/retailmedia_2023-04/docs/PageMetadata.md b/sdks/retailmedia_2024-07/docs/PageMetadata.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/PageMetadata.md rename to sdks/retailmedia_2024-07/docs/PageMetadata.md diff --git a/sdks/retailmedia_preview/docs/PageOfInsertionOrderHistoryChangeDataCapture.md b/sdks/retailmedia_2024-07/docs/PageOfBalanceHistoryChangeDataCaptureV1.md similarity index 58% rename from sdks/retailmedia_preview/docs/PageOfInsertionOrderHistoryChangeDataCapture.md rename to sdks/retailmedia_2024-07/docs/PageOfBalanceHistoryChangeDataCaptureV1.md index dc2db06e..7cae5bde 100644 --- a/sdks/retailmedia_preview/docs/PageOfInsertionOrderHistoryChangeDataCapture.md +++ b/sdks/retailmedia_2024-07/docs/PageOfBalanceHistoryChangeDataCaptureV1.md @@ -1,6 +1,6 @@ -# PageOfInsertionOrderHistoryChangeDataCapture +# PageOfBalanceHistoryChangeDataCaptureV1 A wrapper class to return a single page of items with metadata. @@ -9,7 +9,7 @@ A wrapper class to return a single page of items with metadata. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**meta** | [**Metadata**](Metadata.md) | | | -|**data** | [**List<InsertionOrderHistoryChangeDataCapture>**](InsertionOrderHistoryChangeDataCapture.md) | | | +|**data** | [**List<BalanceHistoryChangeDataCaptureV1>**](BalanceHistoryChangeDataCaptureV1.md) | | | diff --git a/sdks/retailmedia_2023-04/docs/PageTypeEnvironment.md b/sdks/retailmedia_2024-07/docs/PageTypeEnvironment.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/PageTypeEnvironment.md rename to sdks/retailmedia_2024-07/docs/PageTypeEnvironment.md diff --git a/sdks/retailmedia_2023-04/docs/PostCampaignV202301.md b/sdks/retailmedia_2024-07/docs/PostCampaignV202301.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/PostCampaignV202301.md rename to sdks/retailmedia_2024-07/docs/PostCampaignV202301.md diff --git a/sdks/retailmedia_2023-04/docs/PreferredLineItem202110PagedListResponse.md b/sdks/retailmedia_2024-07/docs/PreferredLineItem202110PagedListResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/PreferredLineItem202110PagedListResponse.md rename to sdks/retailmedia_2024-07/docs/PreferredLineItem202110PagedListResponse.md diff --git a/sdks/retailmedia_2023-04/docs/PreferredLineItem202110Response.md b/sdks/retailmedia_2024-07/docs/PreferredLineItem202110Response.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/PreferredLineItem202110Response.md rename to sdks/retailmedia_2024-07/docs/PreferredLineItem202110Response.md diff --git a/sdks/retailmedia_2023-04/docs/PreferredLineItemCreateModel202110Request.md b/sdks/retailmedia_2024-07/docs/PreferredLineItemCreateModel202110Request.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/PreferredLineItemCreateModel202110Request.md rename to sdks/retailmedia_2024-07/docs/PreferredLineItemCreateModel202110Request.md diff --git a/sdks/retailmedia_2023-04/docs/PreferredLineItemUpdateModel202110Request.md b/sdks/retailmedia_2024-07/docs/PreferredLineItemUpdateModel202110Request.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/PreferredLineItemUpdateModel202110Request.md rename to sdks/retailmedia_2024-07/docs/PreferredLineItemUpdateModel202110Request.md diff --git a/sdks/retailmedia_2023-04/docs/ProblemDetails.md b/sdks/retailmedia_2024-07/docs/ProblemDetails.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ProblemDetails.md rename to sdks/retailmedia_2024-07/docs/ProblemDetails.md diff --git a/sdks/retailmedia_2023-04/docs/PromotedProduct202110ListRequest.md b/sdks/retailmedia_2024-07/docs/PromotedProduct202110ListRequest.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/PromotedProduct202110ListRequest.md rename to sdks/retailmedia_2024-07/docs/PromotedProduct202110ListRequest.md diff --git a/sdks/retailmedia_2023-04/docs/PromotedProduct202110PagedListResponse.md b/sdks/retailmedia_2024-07/docs/PromotedProduct202110PagedListResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/PromotedProduct202110PagedListResponse.md rename to sdks/retailmedia_2024-07/docs/PromotedProduct202110PagedListResponse.md diff --git a/sdks/retailmedia_2023-04/docs/ProposalStatusModel.md b/sdks/retailmedia_2024-07/docs/ProposalStatusModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ProposalStatusModel.md rename to sdks/retailmedia_2024-07/docs/ProposalStatusModel.md diff --git a/sdks/retailmedia_2023-04/docs/ProposalStatusModelResource.md b/sdks/retailmedia_2024-07/docs/ProposalStatusModelResource.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ProposalStatusModelResource.md rename to sdks/retailmedia_2024-07/docs/ProposalStatusModelResource.md diff --git a/sdks/retailmedia_2023-04/docs/ProposalStatusModelResponse.md b/sdks/retailmedia_2024-07/docs/ProposalStatusModelResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ProposalStatusModelResponse.md rename to sdks/retailmedia_2024-07/docs/ProposalStatusModelResponse.md diff --git a/sdks/retailmedia_2023-04/docs/PutCampaignV202301.md b/sdks/retailmedia_2024-07/docs/PutCampaignV202301.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/PutCampaignV202301.md rename to sdks/retailmedia_2024-07/docs/PutCampaignV202301.md diff --git a/sdks/retailmedia_2023-04/docs/ReportOutcome.md b/sdks/retailmedia_2024-07/docs/ReportOutcome.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ReportOutcome.md rename to sdks/retailmedia_2024-07/docs/ReportOutcome.md diff --git a/sdks/retailmedia_2024-07/docs/ResourceOfAddFundsToBalance.md b/sdks/retailmedia_2024-07/docs/ResourceOfAddFundsToBalance.md new file mode 100644 index 00000000..32046042 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ResourceOfAddFundsToBalance.md @@ -0,0 +1,16 @@ + + +# ResourceOfAddFundsToBalance + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**ExternalAddFundsToBalance**](ExternalAddFundsToBalance.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | Canonical type name of the entity | [optional] | + + + diff --git a/sdks/retailmedia_2023-04/docs/ResourceOfAuctionLineItem.md b/sdks/retailmedia_2024-07/docs/ResourceOfAuctionLineItem.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ResourceOfAuctionLineItem.md rename to sdks/retailmedia_2024-07/docs/ResourceOfAuctionLineItem.md diff --git a/sdks/retailmedia_2023-04/docs/ResourceOfAuctionLineItemUpdateModel.md b/sdks/retailmedia_2024-07/docs/ResourceOfAuctionLineItemUpdateModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ResourceOfAuctionLineItemUpdateModel.md rename to sdks/retailmedia_2024-07/docs/ResourceOfAuctionLineItemUpdateModel.md diff --git a/sdks/retailmedia_2023-04/docs/ResourceOfBalanceCampaign202110.md b/sdks/retailmedia_2024-07/docs/ResourceOfBalanceCampaign202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ResourceOfBalanceCampaign202110.md rename to sdks/retailmedia_2024-07/docs/ResourceOfBalanceCampaign202110.md diff --git a/sdks/retailmedia_2024-07/docs/ResourceOfBalanceResponse.md b/sdks/retailmedia_2024-07/docs/ResourceOfBalanceResponse.md new file mode 100644 index 00000000..514b3d20 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ResourceOfBalanceResponse.md @@ -0,0 +1,16 @@ + + +# ResourceOfBalanceResponse + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**ExternalBalanceResponse**](ExternalBalanceResponse.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | Canonical type name of the entity | [optional] | + + + diff --git a/sdks/retailmedia_2023-04/docs/ResourceOfCategory202204.md b/sdks/retailmedia_2024-07/docs/ResourceOfCategory202204.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ResourceOfCategory202204.md rename to sdks/retailmedia_2024-07/docs/ResourceOfCategory202204.md diff --git a/sdks/retailmedia_2024-07/docs/ResourceOfChangeDatesOfBalance.md b/sdks/retailmedia_2024-07/docs/ResourceOfChangeDatesOfBalance.md new file mode 100644 index 00000000..6cd9e81f --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ResourceOfChangeDatesOfBalance.md @@ -0,0 +1,16 @@ + + +# ResourceOfChangeDatesOfBalance + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**ExternalChangeDatesOfBalance**](ExternalChangeDatesOfBalance.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | Canonical type name of the entity | [optional] | + + + diff --git a/sdks/retailmedia_2023-04/docs/ResourceOfCommonLineItem.md b/sdks/retailmedia_2024-07/docs/ResourceOfCommonLineItem.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ResourceOfCommonLineItem.md rename to sdks/retailmedia_2024-07/docs/ResourceOfCommonLineItem.md diff --git a/sdks/retailmedia_2024-07/docs/ResourceOfCreateBalance.md b/sdks/retailmedia_2024-07/docs/ResourceOfCreateBalance.md new file mode 100644 index 00000000..54d54d70 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ResourceOfCreateBalance.md @@ -0,0 +1,16 @@ + + +# ResourceOfCreateBalance + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**ExternalCreateBalance**](ExternalCreateBalance.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | Canonical type name of the entity | [optional] | + + + diff --git a/sdks/retailmedia_2023-04/docs/ResourceOfCreative202110.md b/sdks/retailmedia_2024-07/docs/ResourceOfCreative202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ResourceOfCreative202110.md rename to sdks/retailmedia_2024-07/docs/ResourceOfCreative202110.md diff --git a/sdks/retailmedia_2023-04/docs/ResourceOfCreative202210.md b/sdks/retailmedia_2024-07/docs/ResourceOfCreative202210.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ResourceOfCreative202210.md rename to sdks/retailmedia_2024-07/docs/ResourceOfCreative202210.md diff --git a/sdks/retailmedia_2023-04/docs/ResourceOfLineItemBidMultipliers.md b/sdks/retailmedia_2024-07/docs/ResourceOfLineItemBidMultipliers.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ResourceOfLineItemBidMultipliers.md rename to sdks/retailmedia_2024-07/docs/ResourceOfLineItemBidMultipliers.md diff --git a/sdks/retailmedia_2023-04/docs/ResourceOfPreferredLineItem202110.md b/sdks/retailmedia_2024-07/docs/ResourceOfPreferredLineItem202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ResourceOfPreferredLineItem202110.md rename to sdks/retailmedia_2024-07/docs/ResourceOfPreferredLineItem202110.md diff --git a/sdks/retailmedia_2023-04/docs/ResourceOfPreferredLineItemUpdateModel202110.md b/sdks/retailmedia_2024-07/docs/ResourceOfPreferredLineItemUpdateModel202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ResourceOfPreferredLineItemUpdateModel202110.md rename to sdks/retailmedia_2024-07/docs/ResourceOfPreferredLineItemUpdateModel202110.md diff --git a/sdks/retailmedia_2023-04/docs/ResourceOfPromotedProduct202110.md b/sdks/retailmedia_2024-07/docs/ResourceOfPromotedProduct202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ResourceOfPromotedProduct202110.md rename to sdks/retailmedia_2024-07/docs/ResourceOfPromotedProduct202110.md diff --git a/sdks/retailmedia_preview/docs/ResourceOfRetailMediaAccount.md b/sdks/retailmedia_2024-07/docs/ResourceOfRetailMediaAccount.md similarity index 100% rename from sdks/retailmedia_preview/docs/ResourceOfRetailMediaAccount.md rename to sdks/retailmedia_2024-07/docs/ResourceOfRetailMediaAccount.md diff --git a/sdks/retailmedia_2023-04/docs/ResourceOfTemplate.md b/sdks/retailmedia_2024-07/docs/ResourceOfTemplate.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ResourceOfTemplate.md rename to sdks/retailmedia_2024-07/docs/ResourceOfTemplate.md diff --git a/sdks/retailmedia_2024-07/docs/ResourceOfUpdateBalanceModel.md b/sdks/retailmedia_2024-07/docs/ResourceOfUpdateBalanceModel.md new file mode 100644 index 00000000..da471df9 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ResourceOfUpdateBalanceModel.md @@ -0,0 +1,16 @@ + + +# ResourceOfUpdateBalanceModel + +Data model for a Resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**ExternalUpdateBalanceModel**](ExternalUpdateBalanceModel.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | Canonical type name of the entity | [optional] | + + + diff --git a/sdks/retailmedia_2023-04/docs/ResourceOutcome.md b/sdks/retailmedia_2024-07/docs/ResourceOutcome.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ResourceOutcome.md rename to sdks/retailmedia_2024-07/docs/ResourceOutcome.md diff --git a/sdks/retailmedia_preview/docs/ResourceOutcomeOfRetailMediaAccount.md b/sdks/retailmedia_2024-07/docs/ResourceOutcomeOfRetailMediaAccount.md similarity index 100% rename from sdks/retailmedia_preview/docs/ResourceOutcomeOfRetailMediaAccount.md rename to sdks/retailmedia_2024-07/docs/ResourceOutcomeOfRetailMediaAccount.md diff --git a/sdks/retailmedia_preview/docs/RetailMediaAccount.md b/sdks/retailmedia_2024-07/docs/RetailMediaAccount.md similarity index 100% rename from sdks/retailmedia_preview/docs/RetailMediaAccount.md rename to sdks/retailmedia_2024-07/docs/RetailMediaAccount.md diff --git a/sdks/retailmedia_preview/docs/RetailMediaBrandAccountCreation.md b/sdks/retailmedia_2024-07/docs/RetailMediaBrandAccountCreation.md similarity index 100% rename from sdks/retailmedia_preview/docs/RetailMediaBrandAccountCreation.md rename to sdks/retailmedia_2024-07/docs/RetailMediaBrandAccountCreation.md diff --git a/sdks/retailmedia_preview/docs/RetailMediaBrands.md b/sdks/retailmedia_2024-07/docs/RetailMediaBrands.md similarity index 100% rename from sdks/retailmedia_preview/docs/RetailMediaBrands.md rename to sdks/retailmedia_2024-07/docs/RetailMediaBrands.md diff --git a/sdks/retailmedia_preview/docs/RetailMediaSeller.md b/sdks/retailmedia_2024-07/docs/RetailMediaSeller.md similarity index 100% rename from sdks/retailmedia_preview/docs/RetailMediaSeller.md rename to sdks/retailmedia_2024-07/docs/RetailMediaSeller.md diff --git a/sdks/retailmedia_preview/docs/RetailMediaSellerAccountCreation.md b/sdks/retailmedia_2024-07/docs/RetailMediaSellerAccountCreation.md similarity index 100% rename from sdks/retailmedia_preview/docs/RetailMediaSellerAccountCreation.md rename to sdks/retailmedia_2024-07/docs/RetailMediaSellerAccountCreation.md diff --git a/sdks/retailmedia_2023-04/docs/ReviewStateModel.md b/sdks/retailmedia_2024-07/docs/ReviewStateModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ReviewStateModel.md rename to sdks/retailmedia_2024-07/docs/ReviewStateModel.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateEntityV1.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateEntityV1.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateEntityV1.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateEntityV1.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateEntityV1Resource.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateEntityV1Resource.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateEntityV1Resource.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateEntityV1Resource.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateEntityV1Response.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateEntityV1Response.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateEntityV1Response.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateEntityV1Response.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateEntityV2.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateEntityV2.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateEntityV2.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateEntityV2.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateEntityV2Resource.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateEntityV2Resource.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateEntityV2Resource.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateEntityV2Resource.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateEntityV2Response.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateEntityV2Response.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateEntityV2Response.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateEntityV2Response.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateInputEntityV1.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateInputEntityV1.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateInputEntityV1.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateInputEntityV1.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateInputEntityV2.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateInputEntityV2.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceCreateInputEntityV2.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceCreateInputEntityV2.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceGetEntityV1.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceGetEntityV1.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceGetEntityV1.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceGetEntityV1.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceGetEntityV1ListResponse.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceGetEntityV1ListResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceGetEntityV1ListResponse.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceGetEntityV1ListResponse.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceGetEntityV1Resource.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceGetEntityV1Resource.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceGetEntityV1Resource.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceGetEntityV1Resource.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceGetEntityV2.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceGetEntityV2.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceGetEntityV2.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceGetEntityV2.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceGetEntityV2ListResponse.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceGetEntityV2ListResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceGetEntityV2ListResponse.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceGetEntityV2ListResponse.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceGetEntityV2Resource.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceGetEntityV2Resource.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceGetEntityV2Resource.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceGetEntityV2Resource.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceUserBehaviorCreateV2.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceUserBehaviorCreateV2.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceUserBehaviorCreateV2.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceUserBehaviorCreateV2.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacyAudienceUserBehaviorDetailsV2.md b/sdks/retailmedia_2024-07/docs/RmLegacyAudienceUserBehaviorDetailsV2.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacyAudienceUserBehaviorDetailsV2.md rename to sdks/retailmedia_2024-07/docs/RmLegacyAudienceUserBehaviorDetailsV2.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacySegmentCustomerList.md b/sdks/retailmedia_2024-07/docs/RmLegacySegmentCustomerList.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacySegmentCustomerList.md rename to sdks/retailmedia_2024-07/docs/RmLegacySegmentCustomerList.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacySegmentUserBehaviorCreateV2.md b/sdks/retailmedia_2024-07/docs/RmLegacySegmentUserBehaviorCreateV2.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacySegmentUserBehaviorCreateV2.md rename to sdks/retailmedia_2024-07/docs/RmLegacySegmentUserBehaviorCreateV2.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacySegmentUserBehaviorV1.md b/sdks/retailmedia_2024-07/docs/RmLegacySegmentUserBehaviorV1.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacySegmentUserBehaviorV1.md rename to sdks/retailmedia_2024-07/docs/RmLegacySegmentUserBehaviorV1.md diff --git a/sdks/retailmedia_2023-04/docs/RmLegacySegmentUserBehaviorV2.md b/sdks/retailmedia_2024-07/docs/RmLegacySegmentUserBehaviorV2.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmLegacySegmentUserBehaviorV2.md rename to sdks/retailmedia_2024-07/docs/RmLegacySegmentUserBehaviorV2.md diff --git a/sdks/retailmedia_2023-04/docs/RmcaCommonProblem.md b/sdks/retailmedia_2024-07/docs/RmcaCommonProblem.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/RmcaCommonProblem.md rename to sdks/retailmedia_2024-07/docs/RmcaCommonProblem.md diff --git a/sdks/retailmedia_2023-04/docs/Section.md b/sdks/retailmedia_2024-07/docs/Section.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/Section.md rename to sdks/retailmedia_2024-07/docs/Section.md diff --git a/sdks/retailmedia_2023-04/docs/SetBidModel.md b/sdks/retailmedia_2024-07/docs/SetBidModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/SetBidModel.md rename to sdks/retailmedia_2024-07/docs/SetBidModel.md diff --git a/sdks/retailmedia_2023-04/docs/SetBidsModel.md b/sdks/retailmedia_2024-07/docs/SetBidsModel.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/SetBidsModel.md rename to sdks/retailmedia_2024-07/docs/SetBidsModel.md diff --git a/sdks/retailmedia_2023-04/docs/SetBidsModelRequest.md b/sdks/retailmedia_2024-07/docs/SetBidsModelRequest.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/SetBidsModelRequest.md rename to sdks/retailmedia_2024-07/docs/SetBidsModelRequest.md diff --git a/sdks/retailmedia_2023-04/docs/SetBidsModelResource.md b/sdks/retailmedia_2024-07/docs/SetBidsModelResource.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/SetBidsModelResource.md rename to sdks/retailmedia_2024-07/docs/SetBidsModelResource.md diff --git a/sdks/retailmedia_2023-04/docs/StatusResponse.md b/sdks/retailmedia_2024-07/docs/StatusResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/StatusResponse.md rename to sdks/retailmedia_2024-07/docs/StatusResponse.md diff --git a/sdks/retailmedia_2023-04/docs/StatusResponseResource.md b/sdks/retailmedia_2024-07/docs/StatusResponseResource.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/StatusResponseResource.md rename to sdks/retailmedia_2024-07/docs/StatusResponseResource.md diff --git a/sdks/retailmedia_2023-04/docs/StoreIdsUpdateModel202110Request.md b/sdks/retailmedia_2024-07/docs/StoreIdsUpdateModel202110Request.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/StoreIdsUpdateModel202110Request.md rename to sdks/retailmedia_2024-07/docs/StoreIdsUpdateModel202110Request.md diff --git a/sdks/retailmedia_2023-04/docs/StoreTarget202110Request.md b/sdks/retailmedia_2024-07/docs/StoreTarget202110Request.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/StoreTarget202110Request.md rename to sdks/retailmedia_2024-07/docs/StoreTarget202110Request.md diff --git a/sdks/retailmedia_2023-04/docs/StoreTarget202110Response.md b/sdks/retailmedia_2024-07/docs/StoreTarget202110Response.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/StoreTarget202110Response.md rename to sdks/retailmedia_2024-07/docs/StoreTarget202110Response.md diff --git a/sdks/retailmedia_2023-04/docs/Template.md b/sdks/retailmedia_2024-07/docs/Template.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/Template.md rename to sdks/retailmedia_2024-07/docs/Template.md diff --git a/sdks/retailmedia_2023-04/docs/TemplateListResponse.md b/sdks/retailmedia_2024-07/docs/TemplateListResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/TemplateListResponse.md rename to sdks/retailmedia_2024-07/docs/TemplateListResponse.md diff --git a/sdks/retailmedia_2023-04/docs/TemplateResponse.md b/sdks/retailmedia_2024-07/docs/TemplateResponse.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/TemplateResponse.md rename to sdks/retailmedia_2024-07/docs/TemplateResponse.md diff --git a/sdks/retailmedia_2023-04/docs/TemplateVariable.md b/sdks/retailmedia_2024-07/docs/TemplateVariable.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/TemplateVariable.md rename to sdks/retailmedia_2024-07/docs/TemplateVariable.md diff --git a/sdks/retailmedia_2023-04/docs/TemplateVariableValue.md b/sdks/retailmedia_2024-07/docs/TemplateVariableValue.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/TemplateVariableValue.md rename to sdks/retailmedia_2024-07/docs/TemplateVariableValue.md diff --git a/sdks/retailmedia_2023-04/docs/TextVariableSpecification.md b/sdks/retailmedia_2024-07/docs/TextVariableSpecification.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/TextVariableSpecification.md rename to sdks/retailmedia_2024-07/docs/TextVariableSpecification.md diff --git a/sdks/retailmedia_2023-04/docs/TextVariableValue.md b/sdks/retailmedia_2024-07/docs/TextVariableValue.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/TextVariableValue.md rename to sdks/retailmedia_2024-07/docs/TextVariableValue.md diff --git a/sdks/retailmedia_2024-07/docs/UpdateBalanceModelRequest.md b/sdks/retailmedia_2024-07/docs/UpdateBalanceModelRequest.md new file mode 100644 index 00000000..62d810a1 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/UpdateBalanceModelRequest.md @@ -0,0 +1,14 @@ + + +# UpdateBalanceModelRequest + +Data model for an input resource + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ResourceOfUpdateBalanceModel**](ResourceOfUpdateBalanceModel.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/ValueResourceCollectionInputOfRetailMediaSeller.md b/sdks/retailmedia_2024-07/docs/ValueResourceCollectionInputOfRetailMediaSeller.md similarity index 100% rename from sdks/retailmedia_preview/docs/ValueResourceCollectionInputOfRetailMediaSeller.md rename to sdks/retailmedia_2024-07/docs/ValueResourceCollectionInputOfRetailMediaSeller.md diff --git a/sdks/retailmedia_preview/docs/ValueResourceCollectionOutcomeOfRetailMediaSeller.md b/sdks/retailmedia_2024-07/docs/ValueResourceCollectionOutcomeOfRetailMediaSeller.md similarity index 100% rename from sdks/retailmedia_preview/docs/ValueResourceCollectionOutcomeOfRetailMediaSeller.md rename to sdks/retailmedia_2024-07/docs/ValueResourceCollectionOutcomeOfRetailMediaSeller.md diff --git a/sdks/retailmedia_2024-07/docs/ValueResourceInputOfCampaignBudgetOverrides.md b/sdks/retailmedia_2024-07/docs/ValueResourceInputOfCampaignBudgetOverrides.md new file mode 100644 index 00000000..8ad9da63 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ValueResourceInputOfCampaignBudgetOverrides.md @@ -0,0 +1,14 @@ + + +# ValueResourceInputOfCampaignBudgetOverrides + +A top-level object that encapsulates a Criteo API request for a single value. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ValueResourceOfCampaignBudgetOverrides**](ValueResourceOfCampaignBudgetOverrides.md) | | [optional] | + + + diff --git a/sdks/retailmedia_2024-07/docs/ValueResourceInputOfLineItemBudgetOverrides.md b/sdks/retailmedia_2024-07/docs/ValueResourceInputOfLineItemBudgetOverrides.md new file mode 100644 index 00000000..977302f1 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ValueResourceInputOfLineItemBudgetOverrides.md @@ -0,0 +1,14 @@ + + +# ValueResourceInputOfLineItemBudgetOverrides + +A top-level object that encapsulates a Criteo API request for a single value. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ValueResourceOfLineItemBudgetOverrides**](ValueResourceOfLineItemBudgetOverrides.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/ValueResourceInputOfRetailMediaBrandAccountCreation.md b/sdks/retailmedia_2024-07/docs/ValueResourceInputOfRetailMediaBrandAccountCreation.md similarity index 100% rename from sdks/retailmedia_preview/docs/ValueResourceInputOfRetailMediaBrandAccountCreation.md rename to sdks/retailmedia_2024-07/docs/ValueResourceInputOfRetailMediaBrandAccountCreation.md diff --git a/sdks/retailmedia_preview/docs/ValueResourceInputOfRetailMediaBrands.md b/sdks/retailmedia_2024-07/docs/ValueResourceInputOfRetailMediaBrands.md similarity index 100% rename from sdks/retailmedia_preview/docs/ValueResourceInputOfRetailMediaBrands.md rename to sdks/retailmedia_2024-07/docs/ValueResourceInputOfRetailMediaBrands.md diff --git a/sdks/retailmedia_preview/docs/ValueResourceInputOfRetailMediaSellerAccountCreation.md b/sdks/retailmedia_2024-07/docs/ValueResourceInputOfRetailMediaSellerAccountCreation.md similarity index 100% rename from sdks/retailmedia_preview/docs/ValueResourceInputOfRetailMediaSellerAccountCreation.md rename to sdks/retailmedia_2024-07/docs/ValueResourceInputOfRetailMediaSellerAccountCreation.md diff --git a/sdks/retailmedia_2024-07/docs/ValueResourceOfCampaignBudgetOverrides.md b/sdks/retailmedia_2024-07/docs/ValueResourceOfCampaignBudgetOverrides.md new file mode 100644 index 00000000..88f70e17 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ValueResourceOfCampaignBudgetOverrides.md @@ -0,0 +1,15 @@ + + +# ValueResourceOfCampaignBudgetOverrides + +A top-level object that encapsulates a Criteo API response for a single value. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**CampaignBudgetOverrides**](CampaignBudgetOverrides.md) | | [optional] | + + + diff --git a/sdks/retailmedia_2024-07/docs/ValueResourceOfLineItemBudgetOverrides.md b/sdks/retailmedia_2024-07/docs/ValueResourceOfLineItemBudgetOverrides.md new file mode 100644 index 00000000..d58bc7f7 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ValueResourceOfLineItemBudgetOverrides.md @@ -0,0 +1,15 @@ + + +# ValueResourceOfLineItemBudgetOverrides + +A top-level object that encapsulates a Criteo API response for a single value. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**LineItemBudgetOverrides**](LineItemBudgetOverrides.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/ValueResourceOfRetailMediaBrandAccountCreation.md b/sdks/retailmedia_2024-07/docs/ValueResourceOfRetailMediaBrandAccountCreation.md similarity index 100% rename from sdks/retailmedia_preview/docs/ValueResourceOfRetailMediaBrandAccountCreation.md rename to sdks/retailmedia_2024-07/docs/ValueResourceOfRetailMediaBrandAccountCreation.md diff --git a/sdks/retailmedia_preview/docs/ValueResourceOfRetailMediaBrands.md b/sdks/retailmedia_2024-07/docs/ValueResourceOfRetailMediaBrands.md similarity index 100% rename from sdks/retailmedia_preview/docs/ValueResourceOfRetailMediaBrands.md rename to sdks/retailmedia_2024-07/docs/ValueResourceOfRetailMediaBrands.md diff --git a/sdks/retailmedia_preview/docs/ValueResourceOfRetailMediaSeller.md b/sdks/retailmedia_2024-07/docs/ValueResourceOfRetailMediaSeller.md similarity index 100% rename from sdks/retailmedia_preview/docs/ValueResourceOfRetailMediaSeller.md rename to sdks/retailmedia_2024-07/docs/ValueResourceOfRetailMediaSeller.md diff --git a/sdks/retailmedia_preview/docs/ValueResourceOfRetailMediaSellerAccountCreation.md b/sdks/retailmedia_2024-07/docs/ValueResourceOfRetailMediaSellerAccountCreation.md similarity index 100% rename from sdks/retailmedia_preview/docs/ValueResourceOfRetailMediaSellerAccountCreation.md rename to sdks/retailmedia_2024-07/docs/ValueResourceOfRetailMediaSellerAccountCreation.md diff --git a/sdks/retailmedia_2024-07/docs/ValueResourceOutcomeOfCampaignBudgetOverrides.md b/sdks/retailmedia_2024-07/docs/ValueResourceOutcomeOfCampaignBudgetOverrides.md new file mode 100644 index 00000000..00cce843 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ValueResourceOutcomeOfCampaignBudgetOverrides.md @@ -0,0 +1,16 @@ + + +# ValueResourceOutcomeOfCampaignBudgetOverrides + +A top-level object that encapsulates a Criteo API response for a single value. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ValueResourceOfCampaignBudgetOverrides**](ValueResourceOfCampaignBudgetOverrides.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/retailmedia_2024-07/docs/ValueResourceOutcomeOfLineItemBudgetOverrides.md b/sdks/retailmedia_2024-07/docs/ValueResourceOutcomeOfLineItemBudgetOverrides.md new file mode 100644 index 00000000..ab1664c8 --- /dev/null +++ b/sdks/retailmedia_2024-07/docs/ValueResourceOutcomeOfLineItemBudgetOverrides.md @@ -0,0 +1,16 @@ + + +# ValueResourceOutcomeOfLineItemBudgetOverrides + +A top-level object that encapsulates a Criteo API response for a single value. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ValueResourceOfLineItemBudgetOverrides**](ValueResourceOfLineItemBudgetOverrides.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/retailmedia_2023-04/docs/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.md b/sdks/retailmedia_2024-07/docs/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.md rename to sdks/retailmedia_2024-07/docs/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.md diff --git a/sdks/retailmedia_2023-04/docs/ValueTypeResourceOfAddToBasketTarget202110.md b/sdks/retailmedia_2024-07/docs/ValueTypeResourceOfAddToBasketTarget202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ValueTypeResourceOfAddToBasketTarget202110.md rename to sdks/retailmedia_2024-07/docs/ValueTypeResourceOfAddToBasketTarget202110.md diff --git a/sdks/retailmedia_2023-04/docs/ValueTypeResourceOfAudienceIdsUpdateModel202110.md b/sdks/retailmedia_2024-07/docs/ValueTypeResourceOfAudienceIdsUpdateModel202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ValueTypeResourceOfAudienceIdsUpdateModel202110.md rename to sdks/retailmedia_2024-07/docs/ValueTypeResourceOfAudienceIdsUpdateModel202110.md diff --git a/sdks/retailmedia_2023-04/docs/ValueTypeResourceOfAudienceTarget202110.md b/sdks/retailmedia_2024-07/docs/ValueTypeResourceOfAudienceTarget202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ValueTypeResourceOfAudienceTarget202110.md rename to sdks/retailmedia_2024-07/docs/ValueTypeResourceOfAudienceTarget202110.md diff --git a/sdks/retailmedia_2023-04/docs/ValueTypeResourceOfKeywordTarget202110.md b/sdks/retailmedia_2024-07/docs/ValueTypeResourceOfKeywordTarget202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ValueTypeResourceOfKeywordTarget202110.md rename to sdks/retailmedia_2024-07/docs/ValueTypeResourceOfKeywordTarget202110.md diff --git a/sdks/retailmedia_2023-04/docs/ValueTypeResourceOfStoreIdsUpdateModel202110.md b/sdks/retailmedia_2024-07/docs/ValueTypeResourceOfStoreIdsUpdateModel202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ValueTypeResourceOfStoreIdsUpdateModel202110.md rename to sdks/retailmedia_2024-07/docs/ValueTypeResourceOfStoreIdsUpdateModel202110.md diff --git a/sdks/retailmedia_2023-04/docs/ValueTypeResourceOfStoreTarget202110.md b/sdks/retailmedia_2024-07/docs/ValueTypeResourceOfStoreTarget202110.md similarity index 100% rename from sdks/retailmedia_2023-04/docs/ValueTypeResourceOfStoreTarget202110.md rename to sdks/retailmedia_2024-07/docs/ValueTypeResourceOfStoreTarget202110.md diff --git a/sdks/retailmedia_2023-04/gradle/wrapper/gradle-wrapper.jar b/sdks/retailmedia_2024-07/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from sdks/retailmedia_2023-04/gradle/wrapper/gradle-wrapper.jar rename to sdks/retailmedia_2024-07/gradle/wrapper/gradle-wrapper.jar diff --git a/sdks/retailmedia_2023-04/gradle/wrapper/gradle-wrapper.properties b/sdks/retailmedia_2024-07/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from sdks/retailmedia_2023-04/gradle/wrapper/gradle-wrapper.properties rename to sdks/retailmedia_2024-07/gradle/wrapper/gradle-wrapper.properties diff --git a/sdks/retailmedia_2023-04/gradlew b/sdks/retailmedia_2024-07/gradlew similarity index 100% rename from sdks/retailmedia_2023-04/gradlew rename to sdks/retailmedia_2024-07/gradlew diff --git a/sdks/retailmedia_2023-04/gradlew.bat b/sdks/retailmedia_2024-07/gradlew.bat similarity index 100% rename from sdks/retailmedia_2023-04/gradlew.bat rename to sdks/retailmedia_2024-07/gradlew.bat diff --git a/sdks/retailmedia_2023-04/settings.gradle b/sdks/retailmedia_2024-07/settings.gradle similarity index 100% rename from sdks/retailmedia_2023-04/settings.gradle rename to sdks/retailmedia_2024-07/settings.gradle diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiCallback.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiCallback.java similarity index 94% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiCallback.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiCallback.java index 2d98d44d..db00f207 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiCallback.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiCallback.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; import java.io.IOException; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiClient.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiClient.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiClient.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiClient.java index 92990081..113cd4cb 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiClient.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiClient.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; import okhttp3.*; import okhttp3.internal.http.HttpMethod; @@ -52,13 +52,13 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import com.criteo.api.retailmedia.v2023_04.auth.Authentication; -import com.criteo.api.retailmedia.v2023_04.auth.HttpBasicAuth; -import com.criteo.api.retailmedia.v2023_04.auth.HttpBearerAuth; -import com.criteo.api.retailmedia.v2023_04.auth.ApiKeyAuth; -import com.criteo.api.retailmedia.v2023_04.auth.OAuth; -import com.criteo.api.retailmedia.v2023_04.auth.RetryingOAuth; -import com.criteo.api.retailmedia.v2023_04.auth.OAuthFlow; +import com.criteo.api.retailmedia.v2024_07.auth.Authentication; +import com.criteo.api.retailmedia.v2024_07.auth.HttpBasicAuth; +import com.criteo.api.retailmedia.v2024_07.auth.HttpBearerAuth; +import com.criteo.api.retailmedia.v2024_07.auth.ApiKeyAuth; +import com.criteo.api.retailmedia.v2024_07.auth.OAuth; +import com.criteo.api.retailmedia.v2024_07.auth.RetryingOAuth; +import com.criteo.api.retailmedia.v2024_07.auth.OAuthFlow; /** *

ApiClient class.

@@ -213,7 +213,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2023.04.0.240626/java"); + setUserAgent("OpenAPI-Generator/2024.07.0.240731/java"); authentications = new HashMap(); } @@ -386,7 +386,7 @@ public DateFormat getDateFormat() { *

Setter for the field dateFormat.

* * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link com.criteo.api.retailmedia.v2023_04.ApiClient} object + * @return a {@link com.criteo.api.retailmedia.v2024_07.ApiClient} object */ public ApiClient setDateFormat(DateFormat dateFormat) { JSON.setDateFormat(dateFormat); @@ -397,7 +397,7 @@ public ApiClient setDateFormat(DateFormat dateFormat) { *

Set SqlDateFormat.

* * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link com.criteo.api.retailmedia.v2023_04.ApiClient} object + * @return a {@link com.criteo.api.retailmedia.v2024_07.ApiClient} object */ public ApiClient setSqlDateFormat(DateFormat dateFormat) { JSON.setSqlDateFormat(dateFormat); @@ -408,7 +408,7 @@ public ApiClient setSqlDateFormat(DateFormat dateFormat) { *

Set OffsetDateTimeFormat.

* * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link com.criteo.api.retailmedia.v2023_04.ApiClient} object + * @return a {@link com.criteo.api.retailmedia.v2024_07.ApiClient} object */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { JSON.setOffsetDateTimeFormat(dateFormat); @@ -419,7 +419,7 @@ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { *

Set LocalDateFormat.

* * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link com.criteo.api.retailmedia.v2023_04.ApiClient} object + * @return a {@link com.criteo.api.retailmedia.v2024_07.ApiClient} object */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { JSON.setLocalDateFormat(dateFormat); @@ -430,7 +430,7 @@ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { *

Set LenientOnJson.

* * @param lenientOnJson a boolean - * @return a {@link com.criteo.api.retailmedia.v2023_04.ApiClient} object + * @return a {@link com.criteo.api.retailmedia.v2024_07.ApiClient} object */ public ApiClient setLenientOnJson(boolean lenientOnJson) { JSON.setLenientOnJson(lenientOnJson); @@ -944,7 +944,7 @@ public String escapeString(String str) { * @param response HTTP response * @param returnType The type of the Java object * @return The deserialized Java object - * @throws com.criteo.api.retailmedia.v2023_04.ApiException If fail to deserialize response body, i.e. cannot read response body + * @throws com.criteo.api.retailmedia.v2024_07.ApiException If fail to deserialize response body, i.e. cannot read response body * or the Content-Type of the response is not supported. */ @SuppressWarnings("unchecked") @@ -1005,7 +1005,7 @@ public T deserialize(Response response, Type returnType) throws ApiException * @param obj The Java object * @param contentType The request Content-Type * @return The serialized request body - * @throws com.criteo.api.retailmedia.v2023_04.ApiException If fail to serialize the given object + * @throws com.criteo.api.retailmedia.v2024_07.ApiException If fail to serialize the given object */ public RequestBody serialize(Object obj, String contentType) throws ApiException { if (obj instanceof byte[]) { @@ -1035,7 +1035,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException * Download file from the given response. * * @param response An instance of the Response object - * @throws com.criteo.api.retailmedia.v2023_04.ApiException If fail to read file content from response and write to disk + * @throws com.criteo.api.retailmedia.v2024_07.ApiException If fail to read file content from response and write to disk * @return Downloaded file */ public File downloadFileFromResponse(Response response) throws ApiException { @@ -1099,7 +1099,7 @@ public File prepareDownloadFile(Response response) throws IOException { * @param Type * @param call An instance of the Call object * @return ApiResponse<T> - * @throws com.criteo.api.retailmedia.v2023_04.ApiException If fail to execute the call + * @throws com.criteo.api.retailmedia.v2024_07.ApiException If fail to execute the call */ public ApiResponse execute(Call call) throws ApiException { return execute(call, null); @@ -1114,7 +1114,7 @@ public ApiResponse execute(Call call) throws ApiException { * @return ApiResponse object containing response status, headers and * data, which is a Java object deserialized from response body and would be null * when returnType is null. - * @throws com.criteo.api.retailmedia.v2023_04.ApiException If fail to execute the call + * @throws com.criteo.api.retailmedia.v2024_07.ApiException If fail to execute the call */ public ApiResponse execute(Call call, Type returnType) throws ApiException { try { @@ -1178,7 +1178,7 @@ public void onResponse(Call call, Response response) throws IOException { * @param response Response * @param returnType Return type * @return Type - * @throws com.criteo.api.retailmedia.v2023_04.ApiException If the response has an unsuccessful status code or + * @throws com.criteo.api.retailmedia.v2024_07.ApiException If the response has an unsuccessful status code or * fail to deserialize the response body */ public T handleResponse(Response response, Type returnType) throws ApiException { @@ -1225,7 +1225,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP call - * @throws com.criteo.api.retailmedia.v2023_04.ApiException If fail to serialize the request body object + * @throws com.criteo.api.retailmedia.v2024_07.ApiException If fail to serialize the request body object */ public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); @@ -1248,7 +1248,7 @@ public Call buildCall(String baseUrl, String path, String method, List que * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP request - * @throws com.criteo.api.retailmedia.v2023_04.ApiException If fail to serialize the request body object + * @throws com.criteo.api.retailmedia.v2024_07.ApiException If fail to serialize the request body object */ public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams @@ -1411,7 +1411,7 @@ public void processCookieParams(Map cookieParams, Request.Builde * @param payload HTTP request body * @param method HTTP method * @param uri URI - * @throws com.criteo.api.retailmedia.v2023_04.ApiException If fails to update the parameters + * @throws com.criteo.api.retailmedia.v2024_07.ApiException If fails to update the parameters */ public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { @@ -1622,7 +1622,7 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti * * @param requestBody The HTTP request object * @return The string representation of the HTTP request body - * @throws com.criteo.api.retailmedia.v2023_04.ApiException If fail to serialize the request body object into a string + * @throws com.criteo.api.retailmedia.v2024_07.ApiException If fail to serialize the request body object into a string */ private String requestBodyToString(RequestBody requestBody) throws ApiException { if (requestBody != null) { diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiClientBuilder.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiClientBuilder.java similarity index 89% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiClientBuilder.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiClientBuilder.java index 9067e719..6ce70db1 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiClientBuilder.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiClientBuilder.java @@ -1,4 +1,4 @@ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; import java.util.Map; import java.util.HashMap; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiException.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiException.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiException.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiException.java index 5580e654..bca1d0ed 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiException.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiException.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; import java.util.Map; import java.util.List; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiResponse.java similarity index 94% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiResponse.java index 4a79afc2..d3c51cab 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ApiResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ApiResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; import java.util.List; import java.util.Map; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/Configuration.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/Configuration.java similarity index 91% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/Configuration.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/Configuration.java index 5973c82d..1644106f 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/Configuration.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/Configuration.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/GzipRequestInterceptor.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/GzipRequestInterceptor.java similarity index 96% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/GzipRequestInterceptor.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/GzipRequestInterceptor.java index 86ecf8e2..8315f329 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/GzipRequestInterceptor.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/GzipRequestInterceptor.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; import okhttp3.*; import okio.Buffer; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/JSON.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/JSON.java similarity index 60% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/JSON.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/JSON.java index b6a52449..b98cfb31 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/JSON.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/JSON.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -93,188 +93,236 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AddRemoveKeywordModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AddRemoveKeywordsModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AddRemoveKeywordsModelRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AddRemoveKeywordsModelResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AddToBasketIdsUpdateModel202110Request.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AddToBasketTarget202110Request.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AddToBasketTarget202110Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ApplicationSummaryModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ApplicationSummaryModelResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ApplicationSummaryModelResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.Asset.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AssetResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AssetResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AsyncCampaignsReport.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AsyncCampaignsReportRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AsyncCampaignsReportResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AsyncLineItemsReport.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AsyncLineItemsReportRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AsyncLineItemsReportResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AsyncReportResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AuctionLineItemCreateModelRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AuctionLineItemPagedListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AuctionLineItemResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AuctionLineItemUpdateModelRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AudienceIdsUpdateModel202110Request.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AudienceTarget202110Request.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.AudienceTarget202110Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.Balance202110PagedListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.BalanceCampaign202110ListRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.BalanceCampaign202110PagedListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.CampaignAttributesV202301.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.CampaignV202301.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.Category202204.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.Category202204ListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ChoiceOption.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ChoiceVariableSpecification.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ChoiceVariableValue.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ColorVariableValue.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.CommonError.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.CommonLineItemPagedListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.CommonLineItemResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.CommonProblem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.CommonWarning.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.Creative202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.Creative202110ListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.Creative202210.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.Creative202210ListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.Creative202210Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.CreativeCreateModel202207.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.CreativeUpdateModel202207.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.EditableCampaignAttributesV202301.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalAddToBasketIdsUpdateModel202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalAddToBasketTarget202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalAuctionLineItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalAuctionLineItemCreateModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalAuctionLineItemUpdateModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalAudienceIdsUpdateModel202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalAudienceTarget202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalBalance202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalBrand.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalCatalogRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalCatalogStatus.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalCommonLineItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalKeywordTarget202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalLineItemCapping202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalLineItemPage202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalLineItemPageCategory202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalPreferredLineItem202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalPreferredLineItemCreateModel202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalPreferredLineItemUpdateModel202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalPromotedProduct202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalRetailer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalRetailerPages202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalStoreIdsUpdateModel202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ExternalStoreTarget202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.FilesVariableValue.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.FilesVariablesSpecification.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.HyperlinkVariableValue.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.InputKeywordsModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.InputResourceOfAuctionLineItemCreateModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.InputResourceOfPreferredLineItemCreateModel202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithIdOfInt64AndAccountAndAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithIdOfInt64AndBrandAndBrand.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiPageResponseOfAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiPageResponseOfBrand.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiPageResponseOfCampaignV202301.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiPageResponseOfRetailer.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiRequestOfCatalogRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiSingleResponseOfCampaignV202301.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiSingleResponseOfCatalogStatus.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.JsonApiSingleResponseOfLineItemBidMultipliers.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.KeywordDataModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.KeywordTarget202110Request.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.KeywordTarget202110Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.KeywordsModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.KeywordsModelResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.KeywordsModelResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.LineItemBidMultipliers.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.LineItemBidMultipliersRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.LineItemBidMultipliersResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.PageMetadata.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.PageTypeEnvironment.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.PostCampaignV202301.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.PreferredLineItem202110PagedListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.PreferredLineItem202110Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.PreferredLineItemCreateModel202110Request.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.PreferredLineItemUpdateModel202110Request.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ProblemDetails.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.PromotedProduct202110ListRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.PromotedProduct202110PagedListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ProposalStatusModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ProposalStatusModelResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ProposalStatusModelResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.PutCampaignV202301.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ReportOutcome.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOfAuctionLineItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOfAuctionLineItemUpdateModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOfBalance202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOfBalanceCampaign202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOfCategory202204.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOfCommonLineItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOfCreative202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOfCreative202210.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOfLineItemBidMultipliers.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOfPreferredLineItem202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOfPreferredLineItemUpdateModel202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOfPromotedProduct202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOfTemplate.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ResourceOutcome.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV1Resource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV1Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV2Resource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV2Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateInputEntityV1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateInputEntityV2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceGetEntityV1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceGetEntityV1ListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceGetEntityV1Resource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceGetEntityV2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceGetEntityV2ListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceGetEntityV2Resource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceUserBehaviorCreateV2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceUserBehaviorDetailsV2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacySegmentCustomerList.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacySegmentUserBehaviorCreateV2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacySegmentUserBehaviorV1.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmLegacySegmentUserBehaviorV2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.RmcaCommonProblem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.Section.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.SetBidModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.SetBidsModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.SetBidsModelRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.SetBidsModelResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.StatusResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.StatusResponseResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.StoreIdsUpdateModel202110Request.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.StoreTarget202110Request.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.StoreTarget202110Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.Template.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.TemplateListResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.TemplateResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.TemplateVariable.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.TemplateVariableValue.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.TextVariableSpecification.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.TextVariableValue.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfAddToBasketIdsUpdateModel202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfAddToBasketTarget202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfAudienceIdsUpdateModel202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfAudienceTarget202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfKeywordTarget202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfStoreIdsUpdateModel202110.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfStoreTarget202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AddFundsToBalanceRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AddRemoveKeywordModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AddRemoveKeywordsModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AddRemoveKeywordsModelRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AddRemoveKeywordsModelResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AddToBasketIdsUpdateModel202110Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AddToBasketTarget202110Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AddToBasketTarget202110Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ApplicationSummaryModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ApplicationSummaryModelResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ApplicationSummaryModelResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.Asset.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AssetResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AssetResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AsyncCampaignsReport.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AsyncCampaignsReportRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AsyncCampaignsReportResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AsyncLineItemsReport.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AsyncLineItemsReportRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AsyncLineItemsReportResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AsyncReportResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AsyncRevenueReport.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AsyncRevenueReportRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AsyncRevenueReportResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AuctionLineItemCreateModelRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AuctionLineItemPagedListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AuctionLineItemResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AuctionLineItemUpdateModelRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AudienceIdsUpdateModel202110Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AudienceTarget202110Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.AudienceTarget202110Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.BalanceCampaign202110ListRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.BalanceCampaign202110PagedListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.BalanceHistoryChangeDataCaptureV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.BalanceResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.BalanceResponsePagedListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.CampaignAttributesV202301.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.CampaignBudgetOverrides.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.CampaignDailyBudgetOverride.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.CampaignMonthlyBudgetOverride.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.CampaignV202301.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.Category202204.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.Category202204ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ChangeDatesOfBalanceRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ChangeDetailsV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ChoiceOption.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ChoiceVariableSpecification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ChoiceVariableValue.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ColorVariableValue.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.CommonError.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.CommonLineItemPagedListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.CommonLineItemResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.CommonProblem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.CommonWarning.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.CreateBalanceRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.Creative202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.Creative202110ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.Creative202210.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.Creative202210ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.Creative202210Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.CreativeCreateModel202207.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.CreativeUpdateModel202207.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.DailyLineItemBudgetOverride.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.EditableCampaignAttributesV202301.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalAccount.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalAddFundsToBalance.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalAddToBasketIdsUpdateModel202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalAddToBasketTarget202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalAuctionLineItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalAuctionLineItemCreateModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalAuctionLineItemUpdateModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalAudienceIdsUpdateModel202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalAudienceTarget202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalBalanceResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalBrand.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalCatalogRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalCatalogStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalChangeDatesOfBalance.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalCommonLineItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalCreateBalance.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalKeywordTarget202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalLineItemCapping202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalLineItemPage202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalLineItemPageCategory202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalPreferredLineItem202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalPreferredLineItemCreateModel202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalPreferredLineItemUpdateModel202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalPromotedProduct202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalRetailer.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalRetailerPages202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalStoreIdsUpdateModel202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalStoreTarget202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ExternalUpdateBalanceModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.FilesVariableValue.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.FilesVariablesSpecification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.HyperlinkVariableValue.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.InputKeywordsModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.InputResourceOfAuctionLineItemCreateModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.InputResourceOfPreferredLineItemCreateModel202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithIdOfInt64AndAccountAndAccount.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithIdOfInt64AndBrandAndBrand.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiPageResponseOfAccount.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiPageResponseOfBrand.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiPageResponseOfCampaignV202301.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiPageResponseOfRetailer.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiRequestOfCatalogRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiSingleResponseOfCampaignV202301.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiSingleResponseOfCatalogStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.JsonApiSingleResponseOfLineItemBidMultipliers.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.KeywordDataModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.KeywordTarget202110Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.KeywordTarget202110Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.KeywordsModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.KeywordsModelResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.KeywordsModelResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.LineItemBidMultipliers.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.LineItemBidMultipliersRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.LineItemBidMultipliersResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.LineItemBudgetOverrides.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.Metadata.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.MonthlyLineItemBudegetOverride.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.PageMetadata.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.PageOfBalanceHistoryChangeDataCaptureV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.PageTypeEnvironment.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.PostCampaignV202301.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.PreferredLineItem202110PagedListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.PreferredLineItem202110Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.PreferredLineItemCreateModel202110Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.PreferredLineItemUpdateModel202110Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ProblemDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.PromotedProduct202110ListRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.PromotedProduct202110PagedListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ProposalStatusModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ProposalStatusModelResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ProposalStatusModelResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.PutCampaignV202301.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ReportOutcome.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfAddFundsToBalance.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfAuctionLineItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfAuctionLineItemUpdateModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfBalanceCampaign202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfBalanceResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfCategory202204.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfChangeDatesOfBalance.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfCommonLineItem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfCreateBalance.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfCreative202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfCreative202210.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfLineItemBidMultipliers.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfPreferredLineItem202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfPreferredLineItemUpdateModel202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfPromotedProduct202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfRetailMediaAccount.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfTemplate.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOfUpdateBalanceModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOutcome.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ResourceOutcomeOfRetailMediaAccount.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RetailMediaAccount.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RetailMediaBrandAccountCreation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RetailMediaBrands.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RetailMediaSeller.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RetailMediaSellerAccountCreation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV1Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV2Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV2Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateInputEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateInputEntityV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceGetEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceGetEntityV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceGetEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceGetEntityV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceGetEntityV2ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceGetEntityV2Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceUserBehaviorCreateV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceUserBehaviorDetailsV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacySegmentCustomerList.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacySegmentUserBehaviorCreateV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacySegmentUserBehaviorV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmLegacySegmentUserBehaviorV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.RmcaCommonProblem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.Section.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.SetBidModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.SetBidsModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.SetBidsModelRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.SetBidsModelResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.StatusResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.StatusResponseResource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.StoreIdsUpdateModel202110Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.StoreTarget202110Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.StoreTarget202110Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.Template.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.TemplateListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.TemplateResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.TemplateVariable.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.TemplateVariableValue.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.TextVariableSpecification.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.TextVariableValue.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.UpdateBalanceModelRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceCollectionInputOfRetailMediaSeller.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceCollectionOutcomeOfRetailMediaSeller.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceInputOfCampaignBudgetOverrides.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceInputOfLineItemBudgetOverrides.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceInputOfRetailMediaBrandAccountCreation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceInputOfRetailMediaBrands.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceInputOfRetailMediaSellerAccountCreation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfCampaignBudgetOverrides.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfLineItemBudgetOverrides.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfRetailMediaBrandAccountCreation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfRetailMediaBrands.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfRetailMediaSeller.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfRetailMediaSellerAccountCreation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceOutcomeOfCampaignBudgetOverrides.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueResourceOutcomeOfLineItemBudgetOverrides.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfAddToBasketIdsUpdateModel202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfAddToBasketTarget202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfAudienceIdsUpdateModel202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfAudienceTarget202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfKeywordTarget202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfStoreIdsUpdateModel202110.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfStoreTarget202110.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/Pair.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/Pair.java similarity index 91% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/Pair.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/Pair.java index d8181fa9..c56324f3 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/Pair.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/Pair.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Pair { diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ProgressRequestBody.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ProgressRequestBody.java similarity index 94% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ProgressRequestBody.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ProgressRequestBody.java index 1514afcf..530de5cf 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ProgressRequestBody.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ProgressRequestBody.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; import okhttp3.MediaType; import okhttp3.RequestBody; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ProgressResponseBody.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ProgressResponseBody.java similarity index 95% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ProgressResponseBody.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ProgressResponseBody.java index 487deecb..716ef5ab 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ProgressResponseBody.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ProgressResponseBody.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; import okhttp3.MediaType; import okhttp3.ResponseBody; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ServerConfiguration.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ServerConfiguration.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ServerConfiguration.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ServerConfiguration.java index 612cd6e1..9b71a620 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ServerConfiguration.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ServerConfiguration.java @@ -1,4 +1,4 @@ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; import java.util.Map; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ServerVariable.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ServerVariable.java similarity index 94% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ServerVariable.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ServerVariable.java index ba44f80c..9602945d 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/ServerVariable.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/ServerVariable.java @@ -1,4 +1,4 @@ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; import java.util.HashSet; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/StringUtil.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/StringUtil.java similarity index 95% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/StringUtil.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/StringUtil.java index 84aff796..cf2ad9bd 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/StringUtil.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/StringUtil.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; import java.util.Collection; import java.util.Iterator; diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/AccountsApi.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/AccountsApi.java new file mode 100644 index 00000000..98de36bd --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/AccountsApi.java @@ -0,0 +1,877 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.api; + +import com.criteo.api.retailmedia.v2024_07.ApiCallback; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.ApiResponse; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.Pair; +import com.criteo.api.retailmedia.v2024_07.ProgressRequestBody; +import com.criteo.api.retailmedia.v2024_07.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.criteo.api.retailmedia.v2024_07.model.JsonApiPageResponseOfAccount; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOutcomeOfRetailMediaAccount; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceCollectionInputOfRetailMediaSeller; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceCollectionOutcomeOfRetailMediaSeller; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceInputOfRetailMediaBrandAccountCreation; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceInputOfRetailMediaBrands; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceInputOfRetailMediaSellerAccountCreation; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfRetailMediaBrands; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class AccountsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public AccountsApi() { + this(Configuration.getDefaultApiClient()); + } + + public AccountsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for addBrands + * @param accountId the account id to update (required) + * @param valueResourceInputOfRetailMediaBrands brands to associate to account (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call addBrandsCall(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = valueResourceInputOfRetailMediaBrands; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/account-management/accounts/{accountId}/brands/add" + .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call addBrandsValidateBeforeCall(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling addBrands(Async)"); + } + + return addBrandsCall(accountId, valueResourceInputOfRetailMediaBrands, _callback); + + } + + /** + * + * Add brands to an account + * @param accountId the account id to update (required) + * @param valueResourceInputOfRetailMediaBrands brands to associate to account (optional) + * @return ValueResourceOfRetailMediaBrands + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ValueResourceOfRetailMediaBrands addBrands(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands) throws ApiException { + ApiResponse localVarResp = addBrandsWithHttpInfo(accountId, valueResourceInputOfRetailMediaBrands); + return localVarResp.getData(); + } + + /** + * + * Add brands to an account + * @param accountId the account id to update (required) + * @param valueResourceInputOfRetailMediaBrands brands to associate to account (optional) + * @return ApiResponse<ValueResourceOfRetailMediaBrands> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse addBrandsWithHttpInfo(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands) throws ApiException { + okhttp3.Call localVarCall = addBrandsValidateBeforeCall(accountId, valueResourceInputOfRetailMediaBrands, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Add brands to an account + * @param accountId the account id to update (required) + * @param valueResourceInputOfRetailMediaBrands brands to associate to account (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call addBrandsAsync(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = addBrandsValidateBeforeCall(accountId, valueResourceInputOfRetailMediaBrands, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createPrivateMarketDemandBrandAccount + * @param accountId Account Id for the parent private market account (required) + * @param valueResourceInputOfRetailMediaBrandAccountCreation Initial creation and configuration options for the new account (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call createPrivateMarketDemandBrandAccountCall(String accountId, ValueResourceInputOfRetailMediaBrandAccountCreation valueResourceInputOfRetailMediaBrandAccountCreation, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = valueResourceInputOfRetailMediaBrandAccountCreation; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/account-management/accounts/{accountId}/create-brand-account" + .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createPrivateMarketDemandBrandAccountValidateBeforeCall(String accountId, ValueResourceInputOfRetailMediaBrandAccountCreation valueResourceInputOfRetailMediaBrandAccountCreation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling createPrivateMarketDemandBrandAccount(Async)"); + } + + return createPrivateMarketDemandBrandAccountCall(accountId, valueResourceInputOfRetailMediaBrandAccountCreation, _callback); + + } + + /** + * + * Creates a new child Demand Brand Account for the provided parent private market account + * @param accountId Account Id for the parent private market account (required) + * @param valueResourceInputOfRetailMediaBrandAccountCreation Initial creation and configuration options for the new account (optional) + * @return ResourceOutcomeOfRetailMediaAccount + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public ResourceOutcomeOfRetailMediaAccount createPrivateMarketDemandBrandAccount(String accountId, ValueResourceInputOfRetailMediaBrandAccountCreation valueResourceInputOfRetailMediaBrandAccountCreation) throws ApiException { + ApiResponse localVarResp = createPrivateMarketDemandBrandAccountWithHttpInfo(accountId, valueResourceInputOfRetailMediaBrandAccountCreation); + return localVarResp.getData(); + } + + /** + * + * Creates a new child Demand Brand Account for the provided parent private market account + * @param accountId Account Id for the parent private market account (required) + * @param valueResourceInputOfRetailMediaBrandAccountCreation Initial creation and configuration options for the new account (optional) + * @return ApiResponse<ResourceOutcomeOfRetailMediaAccount> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public ApiResponse createPrivateMarketDemandBrandAccountWithHttpInfo(String accountId, ValueResourceInputOfRetailMediaBrandAccountCreation valueResourceInputOfRetailMediaBrandAccountCreation) throws ApiException { + okhttp3.Call localVarCall = createPrivateMarketDemandBrandAccountValidateBeforeCall(accountId, valueResourceInputOfRetailMediaBrandAccountCreation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Creates a new child Demand Brand Account for the provided parent private market account + * @param accountId Account Id for the parent private market account (required) + * @param valueResourceInputOfRetailMediaBrandAccountCreation Initial creation and configuration options for the new account (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call createPrivateMarketDemandBrandAccountAsync(String accountId, ValueResourceInputOfRetailMediaBrandAccountCreation valueResourceInputOfRetailMediaBrandAccountCreation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createPrivateMarketDemandBrandAccountValidateBeforeCall(accountId, valueResourceInputOfRetailMediaBrandAccountCreation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createPrivateMarketDemandSellerAccount + * @param accountId Account Id for the parent private market account (required) + * @param valueResourceInputOfRetailMediaSellerAccountCreation Initial creation and configuration options for the new account (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call createPrivateMarketDemandSellerAccountCall(String accountId, ValueResourceInputOfRetailMediaSellerAccountCreation valueResourceInputOfRetailMediaSellerAccountCreation, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = valueResourceInputOfRetailMediaSellerAccountCreation; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/account-management/accounts/{accountId}/create-seller-account" + .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createPrivateMarketDemandSellerAccountValidateBeforeCall(String accountId, ValueResourceInputOfRetailMediaSellerAccountCreation valueResourceInputOfRetailMediaSellerAccountCreation, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling createPrivateMarketDemandSellerAccount(Async)"); + } + + return createPrivateMarketDemandSellerAccountCall(accountId, valueResourceInputOfRetailMediaSellerAccountCreation, _callback); + + } + + /** + * + * Creates a new child Demand Seller Account for the provided parent private market account + * @param accountId Account Id for the parent private market account (required) + * @param valueResourceInputOfRetailMediaSellerAccountCreation Initial creation and configuration options for the new account (optional) + * @return ResourceOutcomeOfRetailMediaAccount + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public ResourceOutcomeOfRetailMediaAccount createPrivateMarketDemandSellerAccount(String accountId, ValueResourceInputOfRetailMediaSellerAccountCreation valueResourceInputOfRetailMediaSellerAccountCreation) throws ApiException { + ApiResponse localVarResp = createPrivateMarketDemandSellerAccountWithHttpInfo(accountId, valueResourceInputOfRetailMediaSellerAccountCreation); + return localVarResp.getData(); + } + + /** + * + * Creates a new child Demand Seller Account for the provided parent private market account + * @param accountId Account Id for the parent private market account (required) + * @param valueResourceInputOfRetailMediaSellerAccountCreation Initial creation and configuration options for the new account (optional) + * @return ApiResponse<ResourceOutcomeOfRetailMediaAccount> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public ApiResponse createPrivateMarketDemandSellerAccountWithHttpInfo(String accountId, ValueResourceInputOfRetailMediaSellerAccountCreation valueResourceInputOfRetailMediaSellerAccountCreation) throws ApiException { + okhttp3.Call localVarCall = createPrivateMarketDemandSellerAccountValidateBeforeCall(accountId, valueResourceInputOfRetailMediaSellerAccountCreation, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Creates a new child Demand Seller Account for the provided parent private market account + * @param accountId Account Id for the parent private market account (required) + * @param valueResourceInputOfRetailMediaSellerAccountCreation Initial creation and configuration options for the new account (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call createPrivateMarketDemandSellerAccountAsync(String accountId, ValueResourceInputOfRetailMediaSellerAccountCreation valueResourceInputOfRetailMediaSellerAccountCreation, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createPrivateMarketDemandSellerAccountValidateBeforeCall(accountId, valueResourceInputOfRetailMediaSellerAccountCreation, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiV1ExternalAccounts + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/accounts"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + return getApiV1ExternalAccountsCall(limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return JsonApiPageResponseOfAccount + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountsWithHttpInfo(limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return ApiResponse<JsonApiPageResponseOfAccount> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV1ExternalAccountsWithHttpInfo(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountsAsync(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for removeBrands + * @param accountId The account id to update (required) + * @param valueResourceInputOfRetailMediaBrands Brands to remove from account (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call removeBrandsCall(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = valueResourceInputOfRetailMediaBrands; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/account-management/accounts/{accountId}/brands/remove" + .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call removeBrandsValidateBeforeCall(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling removeBrands(Async)"); + } + + return removeBrandsCall(accountId, valueResourceInputOfRetailMediaBrands, _callback); + + } + + /** + * + * Remove a brand from an account + * @param accountId The account id to update (required) + * @param valueResourceInputOfRetailMediaBrands Brands to remove from account (optional) + * @return ValueResourceOfRetailMediaBrands + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ValueResourceOfRetailMediaBrands removeBrands(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands) throws ApiException { + ApiResponse localVarResp = removeBrandsWithHttpInfo(accountId, valueResourceInputOfRetailMediaBrands); + return localVarResp.getData(); + } + + /** + * + * Remove a brand from an account + * @param accountId The account id to update (required) + * @param valueResourceInputOfRetailMediaBrands Brands to remove from account (optional) + * @return ApiResponse<ValueResourceOfRetailMediaBrands> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse removeBrandsWithHttpInfo(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands) throws ApiException { + okhttp3.Call localVarCall = removeBrandsValidateBeforeCall(accountId, valueResourceInputOfRetailMediaBrands, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Remove a brand from an account + * @param accountId The account id to update (required) + * @param valueResourceInputOfRetailMediaBrands Brands to remove from account (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call removeBrandsAsync(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = removeBrandsValidateBeforeCall(accountId, valueResourceInputOfRetailMediaBrands, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateSellers + * @param accountId the account id to update (required) + * @param valueResourceCollectionInputOfRetailMediaSeller sellers to associate (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call updateSellersCall(String accountId, ValueResourceCollectionInputOfRetailMediaSeller valueResourceCollectionInputOfRetailMediaSeller, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = valueResourceCollectionInputOfRetailMediaSeller; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/account-management/accounts/{accountId}/sellers" + .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateSellersValidateBeforeCall(String accountId, ValueResourceCollectionInputOfRetailMediaSeller valueResourceCollectionInputOfRetailMediaSeller, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling updateSellers(Async)"); + } + + return updateSellersCall(accountId, valueResourceCollectionInputOfRetailMediaSeller, _callback); + + } + + /** + * + * replace the sellers assoiated with an account + * @param accountId the account id to update (required) + * @param valueResourceCollectionInputOfRetailMediaSeller sellers to associate (optional) + * @return ValueResourceCollectionOutcomeOfRetailMediaSeller + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ValueResourceCollectionOutcomeOfRetailMediaSeller updateSellers(String accountId, ValueResourceCollectionInputOfRetailMediaSeller valueResourceCollectionInputOfRetailMediaSeller) throws ApiException { + ApiResponse localVarResp = updateSellersWithHttpInfo(accountId, valueResourceCollectionInputOfRetailMediaSeller); + return localVarResp.getData(); + } + + /** + * + * replace the sellers assoiated with an account + * @param accountId the account id to update (required) + * @param valueResourceCollectionInputOfRetailMediaSeller sellers to associate (optional) + * @return ApiResponse<ValueResourceCollectionOutcomeOfRetailMediaSeller> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse updateSellersWithHttpInfo(String accountId, ValueResourceCollectionInputOfRetailMediaSeller valueResourceCollectionInputOfRetailMediaSeller) throws ApiException { + okhttp3.Call localVarCall = updateSellersValidateBeforeCall(accountId, valueResourceCollectionInputOfRetailMediaSeller, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * replace the sellers assoiated with an account + * @param accountId the account id to update (required) + * @param valueResourceCollectionInputOfRetailMediaSeller sellers to associate (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call updateSellersAsync(String accountId, ValueResourceCollectionInputOfRetailMediaSeller valueResourceCollectionInputOfRetailMediaSeller, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateSellersValidateBeforeCall(accountId, valueResourceCollectionInputOfRetailMediaSeller, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/api/AnalyticsApi.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/AnalyticsApi.java similarity index 77% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/api/AnalyticsApi.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/AnalyticsApi.java index 19802978..80fe0ef4 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/api/AnalyticsApi.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/AnalyticsApi.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,26 +11,27 @@ */ -package com.criteo.api.retailmedia.v2023_04.api; +package com.criteo.api.retailmedia.v2024_07.api; -import com.criteo.api.retailmedia.v2023_04.ApiCallback; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.ApiResponse; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.Pair; -import com.criteo.api.retailmedia.v2023_04.ProgressRequestBody; -import com.criteo.api.retailmedia.v2023_04.ProgressResponseBody; +import com.criteo.api.retailmedia.v2024_07.ApiCallback; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.ApiResponse; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.Pair; +import com.criteo.api.retailmedia.v2024_07.ProgressRequestBody; +import com.criteo.api.retailmedia.v2024_07.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; -import com.criteo.api.retailmedia.v2023_04.model.AsyncCampaignsReportRequest; -import com.criteo.api.retailmedia.v2023_04.model.AsyncLineItemsReportRequest; -import com.criteo.api.retailmedia.v2023_04.model.AsyncReportResponse; -import com.criteo.api.retailmedia.v2023_04.model.ReportOutcome; +import com.criteo.api.retailmedia.v2024_07.model.AsyncCampaignsReportRequest; +import com.criteo.api.retailmedia.v2024_07.model.AsyncLineItemsReportRequest; +import com.criteo.api.retailmedia.v2024_07.model.AsyncReportResponse; +import com.criteo.api.retailmedia.v2024_07.model.AsyncRevenueReportRequest; +import com.criteo.api.retailmedia.v2024_07.model.ReportOutcome; import java.lang.reflect.Type; import java.util.ArrayList; @@ -107,7 +108,7 @@ public okhttp3.Call generateAsyncCampaignsReportCall(AsyncCampaignsReportRequest Object localVarPostBody = asyncCampaignsReportRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/reports/campaigns"; + String localVarPath = "/2024-07/retail-media/reports/campaigns"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -243,7 +244,7 @@ public okhttp3.Call generateAsyncLineItemsReportCall(AsyncLineItemsReportRequest Object localVarPostBody = asyncLineItemsReportRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/reports/line-items"; + String localVarPath = "/2024-07/retail-media/reports/line-items"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -348,6 +349,142 @@ public okhttp3.Call generateAsyncLineItemsReportAsync(AsyncLineItemsReportReques localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for generateAsyncRevenueReport + * @param asyncRevenueReportRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
403 Forbidden -
+ */ + public okhttp3.Call generateAsyncRevenueReportCall(AsyncRevenueReportRequest asyncRevenueReportRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = asyncRevenueReportRequest; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/reports/revenue"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call generateAsyncRevenueReportValidateBeforeCall(AsyncRevenueReportRequest asyncRevenueReportRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'asyncRevenueReportRequest' is set + if (asyncRevenueReportRequest == null) { + throw new ApiException("Missing the required parameter 'asyncRevenueReportRequest' when calling generateAsyncRevenueReport(Async)"); + } + + return generateAsyncRevenueReportCall(asyncRevenueReportRequest, _callback); + + } + + /** + * + * Returns an asynchronous Revenue Report + * @param asyncRevenueReportRequest (required) + * @return AsyncReportResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
403 Forbidden -
+ */ + public AsyncReportResponse generateAsyncRevenueReport(AsyncRevenueReportRequest asyncRevenueReportRequest) throws ApiException { + ApiResponse localVarResp = generateAsyncRevenueReportWithHttpInfo(asyncRevenueReportRequest); + return localVarResp.getData(); + } + + /** + * + * Returns an asynchronous Revenue Report + * @param asyncRevenueReportRequest (required) + * @return ApiResponse<AsyncReportResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
403 Forbidden -
+ */ + public ApiResponse generateAsyncRevenueReportWithHttpInfo(AsyncRevenueReportRequest asyncRevenueReportRequest) throws ApiException { + okhttp3.Call localVarCall = generateAsyncRevenueReportValidateBeforeCall(asyncRevenueReportRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Returns an asynchronous Revenue Report + * @param asyncRevenueReportRequest (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
403 Forbidden -
+ */ + public okhttp3.Call generateAsyncRevenueReportAsync(AsyncRevenueReportRequest asyncRevenueReportRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = generateAsyncRevenueReportValidateBeforeCall(asyncRevenueReportRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getAsyncExportOutput * @param reportId The ID of the report to retrieve (required) @@ -379,7 +516,7 @@ public okhttp3.Call getAsyncExportOutputCall(String reportId, final ApiCallback Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/reports/{reportId}/output" + String localVarPath = "/2024-07/retail-media/reports/{reportId}/output" .replace("{" + "reportId" + "}", localVarApiClient.escapeString(reportId.toString())); List localVarQueryParams = new ArrayList(); @@ -512,7 +649,7 @@ public okhttp3.Call getAsyncExportStatusCall(String reportId, final ApiCallback Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/reports/{reportId}/status" + String localVarPath = "/2024-07/retail-media/reports/{reportId}/status" .replace("{" + "reportId" + "}", localVarApiClient.escapeString(reportId.toString())); List localVarQueryParams = new ArrayList(); diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/api/AudienceApi.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/AudienceApi.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/api/AudienceApi.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/AudienceApi.java index b0666530..8440c84c 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/api/AudienceApi.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/AudienceApi.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,28 +11,28 @@ */ -package com.criteo.api.retailmedia.v2023_04.api; +package com.criteo.api.retailmedia.v2024_07.api; -import com.criteo.api.retailmedia.v2023_04.ApiCallback; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.ApiResponse; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.Pair; -import com.criteo.api.retailmedia.v2023_04.ProgressRequestBody; -import com.criteo.api.retailmedia.v2023_04.ProgressResponseBody; +import com.criteo.api.retailmedia.v2024_07.ApiCallback; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.ApiResponse; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.Pair; +import com.criteo.api.retailmedia.v2024_07.ProgressRequestBody; +import com.criteo.api.retailmedia.v2024_07.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV1Response; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV2Response; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateInputEntityV1; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateInputEntityV2; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceGetEntityV1ListResponse; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceGetEntityV2ListResponse; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV1Response; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV2Response; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateInputEntityV1; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateInputEntityV2; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceGetEntityV1ListResponse; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceGetEntityV2ListResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -114,7 +114,7 @@ public okhttp3.Call legacyCreateAudienceV1Call(Long accountId, RmLegacyAudienceC Object localVarPostBody = rmLegacyAudienceCreateInputEntityV1; // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{accountId}/audiences" + String localVarPath = "/2024-07/retail-media/accounts/{accountId}/audiences" .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -276,7 +276,7 @@ public okhttp3.Call legacyGetAudienceV1Call(Long accountId, List limitT Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{accountId}/audiences" + String localVarPath = "/2024-07/retail-media/accounts/{accountId}/audiences" .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -437,7 +437,7 @@ public okhttp3.Call legacyGetAudienceV2Call(Long accountId, List limitT Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/v2/accounts/{accountId}/audiences" + String localVarPath = "/2024-07/retail-media/v2/accounts/{accountId}/audiences" .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -599,7 +599,7 @@ public okhttp3.Call legacyUpdateAudienceV2Call(Long accountId, RmLegacyAudienceC Object localVarPostBody = rmLegacyAudienceCreateInputEntityV2; // create path and map variables - String localVarPath = "/2023-04/retail-media/v2/accounts/{accountId}/audiences" + String localVarPath = "/2024-07/retail-media/v2/accounts/{accountId}/audiences" .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/BalanceApi.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/BalanceApi.java new file mode 100644 index 00000000..90863884 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/BalanceApi.java @@ -0,0 +1,1199 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.api; + +import com.criteo.api.retailmedia.v2024_07.ApiCallback; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.ApiResponse; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.Pair; +import com.criteo.api.retailmedia.v2024_07.ProgressRequestBody; +import com.criteo.api.retailmedia.v2024_07.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.criteo.api.retailmedia.v2024_07.model.AddFundsToBalanceRequest; +import com.criteo.api.retailmedia.v2024_07.model.BalanceCampaign202110PagedListResponse; +import com.criteo.api.retailmedia.v2024_07.model.BalanceResponse; +import com.criteo.api.retailmedia.v2024_07.model.BalanceResponsePagedListResponse; +import com.criteo.api.retailmedia.v2024_07.model.ChangeDatesOfBalanceRequest; +import com.criteo.api.retailmedia.v2024_07.model.CreateBalanceRequest; +import com.criteo.api.retailmedia.v2024_07.model.PageOfBalanceHistoryChangeDataCaptureV1; +import com.criteo.api.retailmedia.v2024_07.model.UpdateBalanceModelRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class BalanceApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public BalanceApi() { + this(Configuration.getDefaultApiClient()); + } + + public BalanceApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getApi202110ExternalBalanceCampaignsByBalanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/balances/{balance-id}/campaigns" + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling getApi202110ExternalBalanceCampaignsByBalanceId(Async)"); + } + + return getApi202110ExternalBalanceCampaignsByBalanceIdCall(balanceId, limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return BalanceCampaign202110PagedListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(balanceId, limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return ApiResponse<BalanceCampaign202110PagedListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets page of campaigns for the given balanceId + * @param balanceId The balance to get campaigns from (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdAsync(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiV1ExternalAccountBalancesByAccountId + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/balances" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountBalancesByAccountId(Async)"); + } + + return getApiV1ExternalAccountBalancesByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Get page of balances for the given accountId. + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return BalanceResponsePagedListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponsePagedListResponse getApiV1ExternalAccountBalancesByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Get page of balances for the given accountId. + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return ApiResponse<BalanceResponsePagedListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get page of balances for the given accountId. + * @param accountId The account to get page of balances for (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiV1ExternalAccountByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/balances/{balanceId}" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling getApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + return getApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, _callback); + + } + + /** + * + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse getApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId); + return localVarResp.getData(); + } + + /** + * + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getBalanceHistory + * @param balanceId Balance id. (required) + * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) + * @param limit The number of elements to be returned. (optional, default to 25) + * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getBalanceHistoryCall(String balanceId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/balances/{balanceId}/history" + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (limitToChangeTypes != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limitToChangeTypes", limitToChangeTypes)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getBalanceHistoryValidateBeforeCall(String balanceId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling getBalanceHistory(Async)"); + } + + return getBalanceHistoryCall(balanceId, offset, limit, limitToChangeTypes, _callback); + + } + + /** + * + * Gets the balance's historical change data. + * @param balanceId Balance id. (required) + * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) + * @param limit The number of elements to be returned. (optional, default to 25) + * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) + * @return PageOfBalanceHistoryChangeDataCaptureV1 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public PageOfBalanceHistoryChangeDataCaptureV1 getBalanceHistory(String balanceId, Integer offset, Integer limit, String limitToChangeTypes) throws ApiException { + ApiResponse localVarResp = getBalanceHistoryWithHttpInfo(balanceId, offset, limit, limitToChangeTypes); + return localVarResp.getData(); + } + + /** + * + * Gets the balance's historical change data. + * @param balanceId Balance id. (required) + * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) + * @param limit The number of elements to be returned. (optional, default to 25) + * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) + * @return ApiResponse<PageOfBalanceHistoryChangeDataCaptureV1> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getBalanceHistoryWithHttpInfo(String balanceId, Integer offset, Integer limit, String limitToChangeTypes) throws ApiException { + okhttp3.Call localVarCall = getBalanceHistoryValidateBeforeCall(balanceId, offset, limit, limitToChangeTypes, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets the balance's historical change data. + * @param balanceId Balance id. (required) + * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) + * @param limit The number of elements to be returned. (optional, default to 25) + * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getBalanceHistoryAsync(String balanceId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getBalanceHistoryValidateBeforeCall(balanceId, offset, limit, limitToChangeTypes, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for patchApiV1ExternalAccountByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateBalanceModelRequest; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/balances/{balanceId}" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling patchApiV1ExternalAccountByAccountIdAndBalanceId(Async)"); + } + + return patchApiV1ExternalAccountByAccountIdAndBalanceIdCall(accountId, balanceId, updateBalanceModelRequest, _callback); + + } + + /** + * + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse patchApiV1ExternalAccountByAccountIdAndBalanceId(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { + ApiResponse localVarResp = patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, updateBalanceModelRequest); + return localVarResp.getData(); + } + + /** + * + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse patchApiV1ExternalAccountByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest) throws ApiException { + okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call patchApiV1ExternalAccountByAccountIdAndBalanceIdAsync(String accountId, String balanceId, UpdateBalanceModelRequest updateBalanceModelRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = patchApiV1ExternalAccountByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = addFundsToBalanceRequest; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/balances/{balanceId}/add-funds" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(Async)"); + } + + return postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdCall(accountId, balanceId, addFundsToBalanceRequest, _callback); + + } + + /** + * + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceId(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, addFundsToBalanceRequest); + return localVarResp.getData(); + } + + /** + * + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdAsync(String accountId, String balanceId, AddFundsToBalanceRequest addFundsToBalanceRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV1ExternalAccountAddFundsByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV1ExternalAccountBalancesByAccountId + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createBalanceRequest; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/balances" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountBalancesByAccountId(Async)"); + } + + return postApiV1ExternalAccountBalancesByAccountIdCall(accountId, createBalanceRequest, _callback); + + } + + /** + * + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public BalanceResponse postApiV1ExternalAccountBalancesByAccountId(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, createBalanceRequest); + return localVarResp.getData(); + } + + /** + * + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public ApiResponse postApiV1ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, CreateBalanceRequest createBalanceRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountBalancesByAccountIdAsync(String accountId, CreateBalanceRequest createBalanceRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV1ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = changeDatesOfBalanceRequest; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/balances/{balanceId}/change-dates" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(Async)"); + } + + return postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); + + } + + /** + * + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @return BalanceResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceId(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(accountId, balanceId, changeDatesOfBalanceRequest); + return localVarResp.getData(); + } + + /** + * + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @return ApiResponse<BalanceResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdWithHttpInfo(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdAsync(String accountId, String balanceId, ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV1ExternalAccountChangeDatesByAccountIdAndBalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/api/CampaignApi.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/CampaignApi.java similarity index 94% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/api/CampaignApi.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/CampaignApi.java index 5f80bef5..777a20be 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/api/CampaignApi.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/CampaignApi.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,77 +11,79 @@ */ -package com.criteo.api.retailmedia.v2023_04.api; +package com.criteo.api.retailmedia.v2024_07.api; -import com.criteo.api.retailmedia.v2023_04.ApiCallback; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.ApiResponse; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.Pair; -import com.criteo.api.retailmedia.v2023_04.ProgressRequestBody; -import com.criteo.api.retailmedia.v2023_04.ProgressResponseBody; +import com.criteo.api.retailmedia.v2024_07.ApiCallback; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.ApiResponse; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.Pair; +import com.criteo.api.retailmedia.v2024_07.ProgressRequestBody; +import com.criteo.api.retailmedia.v2024_07.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; -import com.criteo.api.retailmedia.v2023_04.model.AddRemoveKeywordsModelRequest; -import com.criteo.api.retailmedia.v2023_04.model.AddToBasketIdsUpdateModel202110Request; -import com.criteo.api.retailmedia.v2023_04.model.AddToBasketTarget202110Request; -import com.criteo.api.retailmedia.v2023_04.model.AddToBasketTarget202110Response; -import com.criteo.api.retailmedia.v2023_04.model.AssetResponse; -import com.criteo.api.retailmedia.v2023_04.model.AuctionLineItemCreateModelRequest; -import com.criteo.api.retailmedia.v2023_04.model.AuctionLineItemPagedListResponse; -import com.criteo.api.retailmedia.v2023_04.model.AuctionLineItemResponse; -import com.criteo.api.retailmedia.v2023_04.model.AuctionLineItemUpdateModelRequest; -import com.criteo.api.retailmedia.v2023_04.model.AudienceIdsUpdateModel202110Request; -import com.criteo.api.retailmedia.v2023_04.model.AudienceTarget202110Request; -import com.criteo.api.retailmedia.v2023_04.model.AudienceTarget202110Response; -import com.criteo.api.retailmedia.v2023_04.model.Balance202110PagedListResponse; -import com.criteo.api.retailmedia.v2023_04.model.BalanceCampaign202110ListRequest; -import com.criteo.api.retailmedia.v2023_04.model.BalanceCampaign202110PagedListResponse; -import com.criteo.api.retailmedia.v2023_04.model.Category202204; -import com.criteo.api.retailmedia.v2023_04.model.Category202204ListResponse; -import com.criteo.api.retailmedia.v2023_04.model.CommonLineItemPagedListResponse; -import com.criteo.api.retailmedia.v2023_04.model.CommonLineItemResponse; -import com.criteo.api.retailmedia.v2023_04.model.Creative202110ListResponse; -import com.criteo.api.retailmedia.v2023_04.model.Creative202210ListResponse; -import com.criteo.api.retailmedia.v2023_04.model.Creative202210Response; -import com.criteo.api.retailmedia.v2023_04.model.CreativeCreateModel202207; -import com.criteo.api.retailmedia.v2023_04.model.CreativeUpdateModel202207; -import com.criteo.api.retailmedia.v2023_04.model.ExternalRetailerPages202110; +import com.criteo.api.retailmedia.v2024_07.model.AddRemoveKeywordsModelRequest; +import com.criteo.api.retailmedia.v2024_07.model.AddToBasketIdsUpdateModel202110Request; +import com.criteo.api.retailmedia.v2024_07.model.AddToBasketTarget202110Request; +import com.criteo.api.retailmedia.v2024_07.model.AddToBasketTarget202110Response; +import com.criteo.api.retailmedia.v2024_07.model.AssetResponse; +import com.criteo.api.retailmedia.v2024_07.model.AuctionLineItemCreateModelRequest; +import com.criteo.api.retailmedia.v2024_07.model.AuctionLineItemPagedListResponse; +import com.criteo.api.retailmedia.v2024_07.model.AuctionLineItemResponse; +import com.criteo.api.retailmedia.v2024_07.model.AuctionLineItemUpdateModelRequest; +import com.criteo.api.retailmedia.v2024_07.model.AudienceIdsUpdateModel202110Request; +import com.criteo.api.retailmedia.v2024_07.model.AudienceTarget202110Request; +import com.criteo.api.retailmedia.v2024_07.model.AudienceTarget202110Response; +import com.criteo.api.retailmedia.v2024_07.model.BalanceCampaign202110ListRequest; +import com.criteo.api.retailmedia.v2024_07.model.BalanceCampaign202110PagedListResponse; +import com.criteo.api.retailmedia.v2024_07.model.Category202204; +import com.criteo.api.retailmedia.v2024_07.model.Category202204ListResponse; +import com.criteo.api.retailmedia.v2024_07.model.CommonLineItemPagedListResponse; +import com.criteo.api.retailmedia.v2024_07.model.CommonLineItemResponse; +import com.criteo.api.retailmedia.v2024_07.model.Creative202110ListResponse; +import com.criteo.api.retailmedia.v2024_07.model.Creative202210ListResponse; +import com.criteo.api.retailmedia.v2024_07.model.Creative202210Response; +import com.criteo.api.retailmedia.v2024_07.model.CreativeCreateModel202207; +import com.criteo.api.retailmedia.v2024_07.model.CreativeUpdateModel202207; +import com.criteo.api.retailmedia.v2024_07.model.ExternalRetailerPages202110; import java.io.File; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiPageResponseOfAccount; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiPageResponseOfBrand; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiPageResponseOfCampaignV202301; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiPageResponseOfRetailer; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiRequestOfCatalogRequest; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiSingleResponseOfCampaignV202301; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiSingleResponseOfCatalogStatus; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiSingleResponseOfLineItemBidMultipliers; -import com.criteo.api.retailmedia.v2023_04.model.KeywordTarget202110Request; -import com.criteo.api.retailmedia.v2023_04.model.KeywordTarget202110Response; -import com.criteo.api.retailmedia.v2023_04.model.KeywordsModelResponse; -import com.criteo.api.retailmedia.v2023_04.model.LineItemBidMultipliersRequest; -import com.criteo.api.retailmedia.v2023_04.model.LineItemBidMultipliersResponse; -import com.criteo.api.retailmedia.v2023_04.model.PostCampaignV202301; -import com.criteo.api.retailmedia.v2023_04.model.PreferredLineItem202110PagedListResponse; -import com.criteo.api.retailmedia.v2023_04.model.PreferredLineItem202110Response; -import com.criteo.api.retailmedia.v2023_04.model.PreferredLineItemCreateModel202110Request; -import com.criteo.api.retailmedia.v2023_04.model.PreferredLineItemUpdateModel202110Request; -import com.criteo.api.retailmedia.v2023_04.model.PromotedProduct202110ListRequest; -import com.criteo.api.retailmedia.v2023_04.model.PromotedProduct202110PagedListResponse; -import com.criteo.api.retailmedia.v2023_04.model.ProposalStatusModelResponse; -import com.criteo.api.retailmedia.v2023_04.model.PutCampaignV202301; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOutcome; -import com.criteo.api.retailmedia.v2023_04.model.SetBidsModelRequest; -import com.criteo.api.retailmedia.v2023_04.model.StoreIdsUpdateModel202110Request; -import com.criteo.api.retailmedia.v2023_04.model.StoreTarget202110Request; -import com.criteo.api.retailmedia.v2023_04.model.StoreTarget202110Response; -import com.criteo.api.retailmedia.v2023_04.model.TemplateListResponse; -import com.criteo.api.retailmedia.v2023_04.model.TemplateResponse; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiPageResponseOfBrand; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiPageResponseOfCampaignV202301; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiPageResponseOfRetailer; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiRequestOfCatalogRequest; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiSingleResponseOfCampaignV202301; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiSingleResponseOfCatalogStatus; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiSingleResponseOfLineItemBidMultipliers; +import com.criteo.api.retailmedia.v2024_07.model.KeywordTarget202110Request; +import com.criteo.api.retailmedia.v2024_07.model.KeywordTarget202110Response; +import com.criteo.api.retailmedia.v2024_07.model.KeywordsModelResponse; +import com.criteo.api.retailmedia.v2024_07.model.LineItemBidMultipliersRequest; +import com.criteo.api.retailmedia.v2024_07.model.LineItemBidMultipliersResponse; +import com.criteo.api.retailmedia.v2024_07.model.PostCampaignV202301; +import com.criteo.api.retailmedia.v2024_07.model.PreferredLineItem202110PagedListResponse; +import com.criteo.api.retailmedia.v2024_07.model.PreferredLineItem202110Response; +import com.criteo.api.retailmedia.v2024_07.model.PreferredLineItemCreateModel202110Request; +import com.criteo.api.retailmedia.v2024_07.model.PreferredLineItemUpdateModel202110Request; +import com.criteo.api.retailmedia.v2024_07.model.PromotedProduct202110ListRequest; +import com.criteo.api.retailmedia.v2024_07.model.PromotedProduct202110PagedListResponse; +import com.criteo.api.retailmedia.v2024_07.model.ProposalStatusModelResponse; +import com.criteo.api.retailmedia.v2024_07.model.PutCampaignV202301; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOutcome; +import com.criteo.api.retailmedia.v2024_07.model.SetBidsModelRequest; +import com.criteo.api.retailmedia.v2024_07.model.StoreIdsUpdateModel202110Request; +import com.criteo.api.retailmedia.v2024_07.model.StoreTarget202110Request; +import com.criteo.api.retailmedia.v2024_07.model.StoreTarget202110Response; +import com.criteo.api.retailmedia.v2024_07.model.TemplateListResponse; +import com.criteo.api.retailmedia.v2024_07.model.TemplateResponse; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceInputOfCampaignBudgetOverrides; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceInputOfLineItemBudgetOverrides; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceOutcomeOfCampaignBudgetOverrides; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceOutcomeOfLineItemBudgetOverrides; import java.lang.reflect.Type; import java.util.ArrayList; @@ -158,7 +160,7 @@ public okhttp3.Call addRemoveKeywordsCall(String id, AddRemoveKeywordsModelReque Object localVarPostBody = addRemoveKeywordsModelRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/line-items/{id}/keywords/add-remove" + String localVarPath = "/2024-07/retail-media/line-items/{id}/keywords/add-remove" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -288,7 +290,7 @@ public okhttp3.Call createAssetCall(File assetFile, final ApiCallback _callback) Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/assets"; + String localVarPath = "/2024-07/retail-media/assets"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -418,7 +420,7 @@ public okhttp3.Call fetchKeywordsCall(String id, final ApiCallback _callback) th Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/line-items/{id}/keywords" + String localVarPath = "/2024-07/retail-media/line-items/{id}/keywords" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -546,7 +548,7 @@ public okhttp3.Call fetchProposalCall(String id, final ApiCallback _callback) th Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-deal-line-items/{id}/proposal" + String localVarPath = "/2024-07/retail-media/preferred-deal-line-items/{id}/proposal" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -646,153 +648,6 @@ public okhttp3.Call fetchProposalAsync(String id, final ApiCallback - Status Code Description Response Headers - 200 Success - - - */ - public okhttp3.Call getApi202110ExternalAccountBalancesByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{account-id}/balances" - .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApi202110ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling getApi202110ExternalAccountBalancesByAccountId(Async)"); - } - - return getApi202110ExternalAccountBalancesByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of balance objects for the given account id - * @param accountId The account to get balances for (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return Balance202110PagedListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public Balance202110PagedListResponse getApi202110ExternalAccountBalancesByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApi202110ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of balance objects for the given account id - * @param accountId The account to get balances for (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<Balance202110PagedListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApi202110ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApi202110ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of balance objects for the given account id - * @param accountId The account to get balances for (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApi202110ExternalAccountBalancesByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApi202110ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getApi202110ExternalAccountCreativesByAccountId * @param accountId External account id to retrieve creatives for (required) @@ -822,7 +677,7 @@ public okhttp3.Call getApi202110ExternalAccountCreativesByAccountIdCall(String a Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{account-id}/creatives" + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/creatives" .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -946,7 +801,7 @@ public okhttp3.Call getApi202110ExternalAuctionLineItemTargetingKeywordsByLineIt Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords" + String localVarPath = "/2024-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -1043,153 +898,6 @@ public okhttp3.Call getApi202110ExternalAuctionLineItemTargetingKeywordsByLineIt localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getApi202110ExternalBalanceCampaignsByBalanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-04/retail-media/balances/{balance-id}/campaigns" - .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'balanceId' is set - if (balanceId == null) { - throw new ApiException("Missing the required parameter 'balanceId' when calling getApi202110ExternalBalanceCampaignsByBalanceId(Async)"); - } - - return getApi202110ExternalBalanceCampaignsByBalanceIdCall(balanceId, limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return BalanceCampaign202110PagedListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public BalanceCampaign202110PagedListResponse getApi202110ExternalBalanceCampaignsByBalanceId(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(balanceId, limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<BalanceCampaign202110PagedListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApi202110ExternalBalanceCampaignsByBalanceIdWithHttpInfo(String balanceId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of campaigns for the given balanceId - * @param balanceId The balance to get campaigns from (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApi202110ExternalBalanceCampaignsByBalanceIdAsync(String balanceId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApi202110ExternalBalanceCampaignsByBalanceIdValidateBeforeCall(balanceId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getApi202110ExternalCampaignPreferredLineItemsByCampaignId * @param campaignId The given campaign id (required) @@ -1223,7 +931,7 @@ public okhttp3.Call getApi202110ExternalCampaignPreferredLineItemsByCampaignIdCa Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/campaigns/{campaign-id}/preferred-line-items" + String localVarPath = "/2024-07/retail-media/campaigns/{campaign-id}/preferred-line-items" .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); @@ -1373,7 +1081,7 @@ public okhttp3.Call getApi202110ExternalLineItemProductsByLineItemIdCall(String Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/line-items/{line-item-id}/products" + String localVarPath = "/2024-07/retail-media/line-items/{line-item-id}/products" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -1518,7 +1226,7 @@ public okhttp3.Call getApi202110ExternalPreferredLineItemByLineItemIdCall(String Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -1645,7 +1353,7 @@ public okhttp3.Call getApi202110ExternalPreferredLineItemTargetingAddToBasketByL Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -1772,7 +1480,7 @@ public okhttp3.Call getApi202110ExternalPreferredLineItemTargetingAudiencesByLin Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -1899,7 +1607,7 @@ public okhttp3.Call getApi202110ExternalPreferredLineItemTargetingStoresByLineIt Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -2025,7 +1733,7 @@ public okhttp3.Call getApi202110ExternalRetailerPagesByRetailerIdCall(Integer re Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/retailers/{retailerId}/pages" + String localVarPath = "/2024-07/retail-media/retailers/{retailerId}/pages" .replace("{" + "retailerId" + "}", localVarApiClient.escapeString(retailerId.toString())); List localVarQueryParams = new ArrayList(); @@ -2150,7 +1858,7 @@ public okhttp3.Call getApi202204ExternalCategorieByCategoryIdCall(Integer catego Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/categories/{categoryId}" + String localVarPath = "/2024-07/retail-media/categories/{categoryId}" .replace("{" + "categoryId" + "}", localVarApiClient.escapeString(categoryId.toString())); List localVarQueryParams = new ArrayList(); @@ -2282,7 +1990,7 @@ public okhttp3.Call getApi202204ExternalCategoriesCall(Integer retailerId, Strin Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/categories"; + String localVarPath = "/2024-07/retail-media/categories"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2425,7 +2133,7 @@ public okhttp3.Call getApi202207ExternalRetailerByRetailerIdTemplatestemplateIdC Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/retailers/{retailer-id}/templates/{template-id}" + String localVarPath = "/2024-07/retail-media/retailers/{retailer-id}/templates/{template-id}" .replace("{" + "retailer-id" + "}", localVarApiClient.escapeString(retailerId.toString())) .replace("{" + "template-id" + "}", localVarApiClient.escapeString(templateId.toString())); @@ -2557,7 +2265,7 @@ public okhttp3.Call getApi202207ExternalRetailerTemplatesByRetailerIdCall(Intege Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/retailers/{retailer-id}/templates" + String localVarPath = "/2024-07/retail-media/retailers/{retailer-id}/templates" .replace("{" + "retailer-id" + "}", localVarApiClient.escapeString(retailerId.toString())); List localVarQueryParams = new ArrayList(); @@ -2681,7 +2389,7 @@ public okhttp3.Call getApi202210ExternalAccountByAccountIdCreativescreativeIdCal Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{account-id}/creatives/{creative-id}" + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/creatives/{creative-id}" .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) .replace("{" + "creative-id" + "}", localVarApiClient.escapeString(creativeId.toString())); @@ -2816,7 +2524,7 @@ public okhttp3.Call getApi202301ExternalAccountCampaignsByAccountIdCall(String a Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{account-id}/campaigns" + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/campaigns" .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -2960,7 +2668,7 @@ public okhttp3.Call getApi202301ExternalCampaignByCampaignIdCall(String campaign Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/campaigns/{campaignId}" + String localVarPath = "/2024-07/retail-media/campaigns/{campaignId}" .replace("{" + "campaignId" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); @@ -3083,7 +2791,7 @@ public okhttp3.Call getApi202301ExternalLineItemBidMultipliersByLineItemIdCall(S Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/line-items/{line-item-id}/bid-multipliers" + String localVarPath = "/2024-07/retail-media/line-items/{line-item-id}/bid-multipliers" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -3183,8 +2891,8 @@ public okhttp3.Call getApi202301ExternalLineItemBidMultipliersByLineItemIdAsync( * Build call for getApiV1ExternalAccountBrandsByAccountId * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3211,7 +2919,7 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{accountId}/brands" + String localVarPath = "/2024-07/retail-media/accounts/{accountId}/brands" .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -3233,7 +2941,9 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountI } final String[] localVarAccepts = { - "application/json" + "text/plain", + "application/json", + "text/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3267,8 +2977,8 @@ private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall( * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @return JsonApiPageResponseOfBrand * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3287,8 +2997,8 @@ public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(Strin * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @return ApiResponse<JsonApiPageResponseOfBrand> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3308,8 +3018,8 @@ public ApiResponse getApiV1ExternalAccountBrandsByAc * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3330,8 +3040,8 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdAsync(String account * Build call for getApiV1ExternalAccountRetailersByAccountId * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3358,7 +3068,7 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accou Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{accountId}/retailers" + String localVarPath = "/2024-07/retail-media/accounts/{accountId}/retailers" .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -3380,7 +3090,9 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accou } final String[] localVarAccepts = { - "application/json" + "text/plain", + "application/json", + "text/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -3414,8 +3126,8 @@ private okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCa * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @return JsonApiPageResponseOfRetailer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3434,8 +3146,8 @@ public JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @return ApiResponse<JsonApiPageResponseOfRetailer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3455,8 +3167,8 @@ public ApiResponse getApiV1ExternalAccountRetaile * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -3473,143 +3185,6 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdAsync(String acco localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getApiV1ExternalAccounts - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - return getApiV1ExternalAccountsCall(limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of account objects that the current user can access - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return JsonApiPageResponseOfAccount - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountsWithHttpInfo(limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of account objects that the current user can access - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<JsonApiPageResponseOfAccount> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApiV1ExternalAccountsWithHttpInfo(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of account objects that the current user can access - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV1ExternalAccountsAsync(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getApiV1ExternalCatalogOutputByCatalogId * @param catalogId A catalog ID returned from an account catalog request. (required) @@ -3640,7 +3215,7 @@ public okhttp3.Call getApiV1ExternalCatalogOutputByCatalogIdCall(String catalogI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/catalogs/{catalogId}/output" + String localVarPath = "/2024-07/retail-media/catalogs/{catalogId}/output" .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); List localVarQueryParams = new ArrayList(); @@ -3767,7 +3342,7 @@ public okhttp3.Call getApiV1ExternalCatalogStatusByCatalogIdCall(String catalogI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/catalogs/{catalogId}/status" + String localVarPath = "/2024-07/retail-media/catalogs/{catalogId}/status" .replace("{" + "catalogId" + "}", localVarApiClient.escapeString(catalogId.toString())); List localVarQueryParams = new ArrayList(); @@ -3895,7 +3470,7 @@ public okhttp3.Call getApiV2ExternalAccountLineItemsByAccountIdCall(String accou Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{account-id}/line-items" + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/line-items" .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -4054,7 +3629,7 @@ public okhttp3.Call getApiV2ExternalAuctionLineItemByLineItemIdCall(String lineI Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/auction-line-items/{line-item-id}" + String localVarPath = "/2024-07/retail-media/auction-line-items/{line-item-id}" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -4184,7 +3759,7 @@ public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(Str Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/campaigns/{campaign-id}/auction-line-items" + String localVarPath = "/2024-07/retail-media/campaigns/{campaign-id}/auction-line-items" .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); @@ -4225,66 +3800,313 @@ public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(Str } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling getApiV2ExternalCampaignAuctionLineItemsByCampaignId(Async)"); + } + + return getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(campaignId, limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Gets page of auction line item objects for the given campaign id + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return AuctionLineItemPagedListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
+ */ + public AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(campaignId, limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Gets page of auction line item objects for the given campaign id + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @return ApiResponse<AuctionLineItemPagedListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
+ */ + public ApiResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets page of auction line item objects for the given campaign id + * @param campaignId The given campaign id (required) + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) + * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
+ */ + public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdAsync(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiV2ExternalLineItemByLineItemId + * @param lineItemId The given line item id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV2ExternalLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/line-items/{line-item-id}" + .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalLineItemByLineItemId(Async)"); + } + + return getApiV2ExternalLineItemByLineItemIdCall(lineItemId, _callback); + + } + + /** + * + * Gets the line item for the given line item id + * @param lineItemId The given line item id (required) + * @return CommonLineItemResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(String lineItemId) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalLineItemByLineItemIdWithHttpInfo(lineItemId); + return localVarResp.getData(); + } + + /** + * + * Gets the line item for the given line item id + * @param lineItemId The given line item id (required) + * @return ApiResponse<CommonLineItemResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV2ExternalLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets the line item for the given line item id + * @param lineItemId The given line item id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV2ExternalLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getCampaignBudgetOverrides + * @param campaignId External campaign id. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getCampaignBudgetOverridesCall(Long campaignId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/campaigns/{campaignId}/campaign-budget-overrides" + .replace("{" + "campaignId" + "}", localVarApiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCampaignBudgetOverridesValidateBeforeCall(Long campaignId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'campaignId' is set if (campaignId == null) { - throw new ApiException("Missing the required parameter 'campaignId' when calling getApiV2ExternalCampaignAuctionLineItemsByCampaignId(Async)"); + throw new ApiException("Missing the required parameter 'campaignId' when calling getCampaignBudgetOverrides(Async)"); } - return getApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(campaignId, limitToId, pageIndex, pageSize, _callback); + return getCampaignBudgetOverridesCall(campaignId, _callback); } /** * - * Gets page of auction line item objects for the given campaign id - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return AuctionLineItemPagedListResponse + * Get current campaign budget overrides by given external campaign id. + * @param campaignId External campaign id. (required) + * @return ValueResourceOutcomeOfCampaignBudgetOverrides * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public AuctionLineItemPagedListResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignId(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(campaignId, limitToId, pageIndex, pageSize); + public ValueResourceOutcomeOfCampaignBudgetOverrides getCampaignBudgetOverrides(Long campaignId) throws ApiException { + ApiResponse localVarResp = getCampaignBudgetOverridesWithHttpInfo(campaignId); return localVarResp.getData(); } /** * - * Gets page of auction line item objects for the given campaign id - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<AuctionLineItemPagedListResponse> + * Get current campaign budget overrides by given external campaign id. + * @param campaignId External campaign id. (required) + * @return ApiResponse<ValueResourceOutcomeOfCampaignBudgetOverrides> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public ApiResponse getApiV2ExternalCampaignAuctionLineItemsByCampaignIdWithHttpInfo(String campaignId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getCampaignBudgetOverridesWithHttpInfo(Long campaignId) throws ApiException { + okhttp3.Call localVarCall = getCampaignBudgetOverridesValidateBeforeCall(campaignId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Gets page of auction line item objects for the given campaign id - * @param campaignId The given campaign id (required) - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * Get current campaign budget overrides by given external campaign id. + * @param campaignId External campaign id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -4292,19 +4114,18 @@ public ApiResponse getApiV2ExternalCampaignAuc -
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ - public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdAsync(String campaignId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCampaignBudgetOverridesAsync(Long campaignId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalCampaignAuctionLineItemsByCampaignIdValidateBeforeCall(campaignId, limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getCampaignBudgetOverridesValidateBeforeCall(campaignId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getApiV2ExternalLineItemByLineItemId - * @param lineItemId The given line item id (required) + * Build call for getLineItemBudgetOverrides + * @param lineItemId The line item id to get budget overrides for. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -4314,7 +4135,7 @@ public okhttp3.Call getApiV2ExternalCampaignAuctionLineItemsByCampaignIdAsync(St 200 Success - */ - public okhttp3.Call getApiV2ExternalLineItemByLineItemIdCall(String lineItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLineItemBudgetOverridesCall(String lineItemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -4331,8 +4152,8 @@ public okhttp3.Call getApiV2ExternalLineItemByLineItemIdCall(String lineItemId, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/line-items/{line-item-id}" - .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); + String localVarPath = "/2024-07/retail-media/line-items/{lineItemId}/line-item-budget-overrides" + .replace("{" + "lineItemId" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4360,21 +4181,21 @@ public okhttp3.Call getApiV2ExternalLineItemByLineItemIdCall(String lineItemId, } @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getLineItemBudgetOverridesValidateBeforeCall(String lineItemId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'lineItemId' is set if (lineItemId == null) { - throw new ApiException("Missing the required parameter 'lineItemId' when calling getApiV2ExternalLineItemByLineItemId(Async)"); + throw new ApiException("Missing the required parameter 'lineItemId' when calling getLineItemBudgetOverrides(Async)"); } - return getApiV2ExternalLineItemByLineItemIdCall(lineItemId, _callback); + return getLineItemBudgetOverridesCall(lineItemId, _callback); } /** * - * Gets the line item for the given line item id - * @param lineItemId The given line item id (required) - * @return CommonLineItemResponse + * Gets a collection of monthly and daily budget overrides for the provided line item. + * @param lineItemId The line item id to get budget overrides for. (required) + * @return ValueResourceOutcomeOfLineItemBudgetOverrides * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4382,16 +4203,16 @@ private okhttp3.Call getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(Stri
200 Success -
*/ - public CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(String lineItemId) throws ApiException { - ApiResponse localVarResp = getApiV2ExternalLineItemByLineItemIdWithHttpInfo(lineItemId); + public ValueResourceOutcomeOfLineItemBudgetOverrides getLineItemBudgetOverrides(String lineItemId) throws ApiException { + ApiResponse localVarResp = getLineItemBudgetOverridesWithHttpInfo(lineItemId); return localVarResp.getData(); } /** * - * Gets the line item for the given line item id - * @param lineItemId The given line item id (required) - * @return ApiResponse<CommonLineItemResponse> + * Gets a collection of monthly and daily budget overrides for the provided line item. + * @param lineItemId The line item id to get budget overrides for. (required) + * @return ApiResponse<ValueResourceOutcomeOfLineItemBudgetOverrides> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -4399,16 +4220,16 @@ public CommonLineItemResponse getApiV2ExternalLineItemByLineItemId(String lineIt
200 Success -
*/ - public ApiResponse getApiV2ExternalLineItemByLineItemIdWithHttpInfo(String lineItemId) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getLineItemBudgetOverridesWithHttpInfo(String lineItemId) throws ApiException { + okhttp3.Call localVarCall = getLineItemBudgetOverridesValidateBeforeCall(lineItemId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Gets the line item for the given line item id - * @param lineItemId The given line item id (required) + * Gets a collection of monthly and daily budget overrides for the provided line item. + * @param lineItemId The line item id to get budget overrides for. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -4418,10 +4239,10 @@ public ApiResponse getApiV2ExternalLineItemByLineItemIdW 200 Success - */ - public okhttp3.Call getApiV2ExternalLineItemByLineItemIdAsync(String lineItemId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLineItemBudgetOverridesAsync(String lineItemId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getApiV2ExternalLineItemByLineItemIdValidateBeforeCall(lineItemId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getLineItemBudgetOverridesValidateBeforeCall(lineItemId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -4456,7 +4277,7 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsAppendB Object localVarPostBody = keywordTarget202110Request; // create path and map variables - String localVarPath = "/2023-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append" + String localVarPath = "/2024-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -4588,7 +4409,7 @@ public okhttp3.Call postApi202110ExternalAuctionLineItemTargetingKeywordsDeleteB Object localVarPostBody = keywordTarget202110Request; // create path and map variables - String localVarPath = "/2023-04/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete" + String localVarPath = "/2024-07/retail-media/auction-line-items/{line-item-id}/targeting/keywords/delete" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -4719,7 +4540,7 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsAppendByBalanceIdCall(S Object localVarPostBody = balanceCampaign202110ListRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/balances/{balance-id}/campaigns/append" + String localVarPath = "/2024-07/retail-media/balances/{balance-id}/campaigns/append" .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); List localVarQueryParams = new ArrayList(); @@ -4847,7 +4668,7 @@ public okhttp3.Call postApi202110ExternalBalanceCampaignsDeleteByBalanceIdCall(S Object localVarPostBody = balanceCampaign202110ListRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/balances/{balance-id}/campaigns/delete" + String localVarPath = "/2024-07/retail-media/balances/{balance-id}/campaigns/delete" .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); List localVarQueryParams = new ArrayList(); @@ -4976,7 +4797,7 @@ public okhttp3.Call postApi202110ExternalCampaignPreferredLineItemsByCampaignIdC Object localVarPostBody = preferredLineItemCreateModel202110Request; // create path and map variables - String localVarPath = "/2023-04/retail-media/campaigns/{campaign-id}/preferred-line-items" + String localVarPath = "/2024-07/retail-media/campaigns/{campaign-id}/preferred-line-items" .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); @@ -5107,7 +4928,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsAppendByLineItemIdCall( Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/line-items/{line-item-id}/products/append" + String localVarPath = "/2024-07/retail-media/line-items/{line-item-id}/products/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -5235,7 +5056,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsDeleteByLineItemIdCall( Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/line-items/{line-item-id}/products/delete" + String localVarPath = "/2024-07/retail-media/line-items/{line-item-id}/products/delete" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -5363,7 +5184,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsPauseByLineItemIdCall(S Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/line-items/{line-item-id}/products/pause" + String localVarPath = "/2024-07/retail-media/line-items/{line-item-id}/products/pause" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -5486,7 +5307,7 @@ public okhttp3.Call postApi202110ExternalLineItemProductsUnpauseByLineItemIdCall Object localVarPostBody = promotedProduct202110ListRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/line-items/{line-item-id}/products/unpause" + String localVarPath = "/2024-07/retail-media/line-items/{line-item-id}/products/unpause" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -5610,7 +5431,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketAp Object localVarPostBody = addToBasketIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -5742,7 +5563,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAddToBasketDe Object localVarPostBody = addToBasketIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket/delete" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -5874,7 +5695,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesAppe Object localVarPostBody = audienceIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6006,7 +5827,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingAudiencesDele Object localVarPostBody = audienceIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences/delete" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6138,7 +5959,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresAppendB Object localVarPostBody = storeIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores/append" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6270,7 +6091,7 @@ public okhttp3.Call postApi202110ExternalPreferredLineItemTargetingStoresDeleteB Object localVarPostBody = storeIdsUpdateModel202110Request; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores/delete" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -6401,7 +6222,7 @@ public okhttp3.Call postApi202210ExternalAccountCreativesByAccountIdCall(String Object localVarPostBody = creativeCreateModel202207; // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{account-id}/creatives" + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/creatives" .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -6529,7 +6350,7 @@ public okhttp3.Call postApi202210ExternalAccountCreativesSearchByAccountIdCall(S Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{account-id}/creatives/search" + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/creatives/search" .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -6660,7 +6481,7 @@ public okhttp3.Call postApi202301ExternalAccountCampaignsByAccountIdCall(String Object localVarPostBody = postCampaignV202301; // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{account-id}/campaigns" + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/campaigns" .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -6788,7 +6609,7 @@ public okhttp3.Call postApiV1ExternalAccountCatalogsByAccountIdCall(String accou Object localVarPostBody = jsonApiRequestOfCatalogRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{accountId}/catalogs" + String localVarPath = "/2024-07/retail-media/accounts/{accountId}/catalogs" .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -6917,7 +6738,7 @@ public okhttp3.Call postApiV2ExternalCampaignAuctionLineItemsByCampaignIdCall(St Object localVarPostBody = auctionLineItemCreateModelRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/campaigns/{campaign-id}/auction-line-items" + String localVarPath = "/2024-07/retail-media/campaigns/{campaign-id}/auction-line-items" .replace("{" + "campaign-id" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); @@ -7049,7 +6870,7 @@ public okhttp3.Call putApi202110ExternalPreferredLineItemByLineItemIdCall(String Object localVarPostBody = preferredLineItemUpdateModel202110Request; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -7181,7 +7002,7 @@ public okhttp3.Call putApi202110ExternalPreferredLineItemTargetingAddToBasketByL Object localVarPostBody = addToBasketTarget202110Request; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/add-to-basket" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -7313,7 +7134,7 @@ public okhttp3.Call putApi202110ExternalPreferredLineItemTargetingAudiencesByLin Object localVarPostBody = audienceTarget202110Request; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/audiences" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/audiences" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -7445,7 +7266,7 @@ public okhttp3.Call putApi202110ExternalPreferredLineItemTargetingStoresByLineIt Object localVarPostBody = storeTarget202110Request; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-line-items/{line-item-id}/targeting/stores" + String localVarPath = "/2024-07/retail-media/preferred-line-items/{line-item-id}/targeting/stores" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -7578,7 +7399,7 @@ public okhttp3.Call putApi202210ExternalAccountByAccountIdCreativescreativeIdCal Object localVarPostBody = creativeUpdateModel202207; // create path and map variables - String localVarPath = "/2023-04/retail-media/accounts/{account-id}/creatives/{creative-id}" + String localVarPath = "/2024-07/retail-media/accounts/{account-id}/creatives/{creative-id}" .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) .replace("{" + "creative-id" + "}", localVarApiClient.escapeString(creativeId.toString())); @@ -7718,7 +7539,7 @@ public okhttp3.Call putApi202301ExternalCampaignByCampaignIdCall(String campaign Object localVarPostBody = putCampaignV202301; // create path and map variables - String localVarPath = "/2023-04/retail-media/campaigns/{campaignId}" + String localVarPath = "/2024-07/retail-media/campaigns/{campaignId}" .replace("{" + "campaignId" + "}", localVarApiClient.escapeString(campaignId.toString())); List localVarQueryParams = new ArrayList(); @@ -7846,7 +7667,7 @@ public okhttp3.Call putApi202301ExternalLineItemBidMultipliersByLineItemIdCall(S Object localVarPostBody = lineItemBidMultipliersRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/line-items/{line-item-id}/bid-multipliers" + String localVarPath = "/2024-07/retail-media/line-items/{line-item-id}/bid-multipliers" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -7977,7 +7798,7 @@ public okhttp3.Call putApiV2ExternalAuctionLineItemByLineItemIdCall(String lineI Object localVarPostBody = auctionLineItemUpdateModelRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/auction-line-items/{line-item-id}" + String localVarPath = "/2024-07/retail-media/auction-line-items/{line-item-id}" .replace("{" + "line-item-id" + "}", localVarApiClient.escapeString(lineItemId.toString())); List localVarQueryParams = new ArrayList(); @@ -8109,7 +7930,7 @@ public okhttp3.Call setKeywordBidsCall(String id, SetBidsModelRequest setBidsMod Object localVarPostBody = setBidsModelRequest; // create path and map variables - String localVarPath = "/2023-04/retail-media/line-items/{id}/keywords/set-bid" + String localVarPath = "/2024-07/retail-media/line-items/{id}/keywords/set-bid" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -8241,7 +8062,7 @@ public okhttp3.Call submitProposalCall(String id, final ApiCallback _callback) t Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/preferred-deal-line-items/{id}/proposal/submit" + String localVarPath = "/2024-07/retail-media/preferred-deal-line-items/{id}/proposal/submit" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -8341,4 +8162,266 @@ public okhttp3.Call submitProposalAsync(String id, final ApiCallback + Status Code Description Response Headers + 201 Success - + + */ + public okhttp3.Call updateCampaignBudgetOverridesCall(Long campaignId, ValueResourceInputOfCampaignBudgetOverrides valueResourceInputOfCampaignBudgetOverrides, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = valueResourceInputOfCampaignBudgetOverrides; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/campaigns/{campaignId}/campaign-budget-overrides" + .replace("{" + "campaignId" + "}", localVarApiClient.escapeString(campaignId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateCampaignBudgetOverridesValidateBeforeCall(Long campaignId, ValueResourceInputOfCampaignBudgetOverrides valueResourceInputOfCampaignBudgetOverrides, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'campaignId' is set + if (campaignId == null) { + throw new ApiException("Missing the required parameter 'campaignId' when calling updateCampaignBudgetOverrides(Async)"); + } + + return updateCampaignBudgetOverridesCall(campaignId, valueResourceInputOfCampaignBudgetOverrides, _callback); + + } + + /** + * + * Update campaign budget overrides by given external campaign id and new campaign budget overrides settings. + * @param campaignId External campaign id. (required) + * @param valueResourceInputOfCampaignBudgetOverrides New campaign budget overrides settings value resource input. (optional) + * @return ValueResourceOutcomeOfCampaignBudgetOverrides + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public ValueResourceOutcomeOfCampaignBudgetOverrides updateCampaignBudgetOverrides(Long campaignId, ValueResourceInputOfCampaignBudgetOverrides valueResourceInputOfCampaignBudgetOverrides) throws ApiException { + ApiResponse localVarResp = updateCampaignBudgetOverridesWithHttpInfo(campaignId, valueResourceInputOfCampaignBudgetOverrides); + return localVarResp.getData(); + } + + /** + * + * Update campaign budget overrides by given external campaign id and new campaign budget overrides settings. + * @param campaignId External campaign id. (required) + * @param valueResourceInputOfCampaignBudgetOverrides New campaign budget overrides settings value resource input. (optional) + * @return ApiResponse<ValueResourceOutcomeOfCampaignBudgetOverrides> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public ApiResponse updateCampaignBudgetOverridesWithHttpInfo(Long campaignId, ValueResourceInputOfCampaignBudgetOverrides valueResourceInputOfCampaignBudgetOverrides) throws ApiException { + okhttp3.Call localVarCall = updateCampaignBudgetOverridesValidateBeforeCall(campaignId, valueResourceInputOfCampaignBudgetOverrides, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Update campaign budget overrides by given external campaign id and new campaign budget overrides settings. + * @param campaignId External campaign id. (required) + * @param valueResourceInputOfCampaignBudgetOverrides New campaign budget overrides settings value resource input. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call updateCampaignBudgetOverridesAsync(Long campaignId, ValueResourceInputOfCampaignBudgetOverrides valueResourceInputOfCampaignBudgetOverrides, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateCampaignBudgetOverridesValidateBeforeCall(campaignId, valueResourceInputOfCampaignBudgetOverrides, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateLineItemBudgetOverrides + * @param lineItemId Line item external id. (required) + * @param valueResourceInputOfLineItemBudgetOverrides New line item budget overrides settings value resource input. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call updateLineItemBudgetOverridesCall(String lineItemId, ValueResourceInputOfLineItemBudgetOverrides valueResourceInputOfLineItemBudgetOverrides, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = valueResourceInputOfLineItemBudgetOverrides; + + // create path and map variables + String localVarPath = "/2024-07/retail-media/line-items/{lineItemId}/line-item-budget-overrides" + .replace("{" + "lineItemId" + "}", localVarApiClient.escapeString(lineItemId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateLineItemBudgetOverridesValidateBeforeCall(String lineItemId, ValueResourceInputOfLineItemBudgetOverrides valueResourceInputOfLineItemBudgetOverrides, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'lineItemId' is set + if (lineItemId == null) { + throw new ApiException("Missing the required parameter 'lineItemId' when calling updateLineItemBudgetOverrides(Async)"); + } + + return updateLineItemBudgetOverridesCall(lineItemId, valueResourceInputOfLineItemBudgetOverrides, _callback); + + } + + /** + * + * Update line item budget overrides by given external line item id and new line item budget overrides settings. + * @param lineItemId Line item external id. (required) + * @param valueResourceInputOfLineItemBudgetOverrides New line item budget overrides settings value resource input. (optional) + * @return ValueResourceOutcomeOfLineItemBudgetOverrides + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public ValueResourceOutcomeOfLineItemBudgetOverrides updateLineItemBudgetOverrides(String lineItemId, ValueResourceInputOfLineItemBudgetOverrides valueResourceInputOfLineItemBudgetOverrides) throws ApiException { + ApiResponse localVarResp = updateLineItemBudgetOverridesWithHttpInfo(lineItemId, valueResourceInputOfLineItemBudgetOverrides); + return localVarResp.getData(); + } + + /** + * + * Update line item budget overrides by given external line item id and new line item budget overrides settings. + * @param lineItemId Line item external id. (required) + * @param valueResourceInputOfLineItemBudgetOverrides New line item budget overrides settings value resource input. (optional) + * @return ApiResponse<ValueResourceOutcomeOfLineItemBudgetOverrides> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public ApiResponse updateLineItemBudgetOverridesWithHttpInfo(String lineItemId, ValueResourceInputOfLineItemBudgetOverrides valueResourceInputOfLineItemBudgetOverrides) throws ApiException { + okhttp3.Call localVarCall = updateLineItemBudgetOverridesValidateBeforeCall(lineItemId, valueResourceInputOfLineItemBudgetOverrides, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Update line item budget overrides by given external line item id and new line item budget overrides settings. + * @param lineItemId Line item external id. (required) + * @param valueResourceInputOfLineItemBudgetOverrides New line item budget overrides settings value resource input. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call updateLineItemBudgetOverridesAsync(String lineItemId, ValueResourceInputOfLineItemBudgetOverrides valueResourceInputOfLineItemBudgetOverrides, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateLineItemBudgetOverridesValidateBeforeCall(lineItemId, valueResourceInputOfLineItemBudgetOverrides, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } } diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/api/GatewayApi.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/GatewayApi.java similarity index 90% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/api/GatewayApi.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/GatewayApi.java index 6300b515..84b44a1c 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/api/GatewayApi.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/api/GatewayApi.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,23 +11,23 @@ */ -package com.criteo.api.retailmedia.v2023_04.api; +package com.criteo.api.retailmedia.v2024_07.api; -import com.criteo.api.retailmedia.v2023_04.ApiCallback; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.ApiResponse; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.Pair; -import com.criteo.api.retailmedia.v2023_04.ProgressRequestBody; -import com.criteo.api.retailmedia.v2023_04.ProgressResponseBody; +import com.criteo.api.retailmedia.v2024_07.ApiCallback; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.ApiResponse; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.Pair; +import com.criteo.api.retailmedia.v2024_07.ProgressRequestBody; +import com.criteo.api.retailmedia.v2024_07.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; -import com.criteo.api.retailmedia.v2023_04.model.ApplicationSummaryModelResponse; +import com.criteo.api.retailmedia.v2024_07.model.ApplicationSummaryModelResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -102,7 +102,7 @@ public okhttp3.Call getCurrentApplicationCall(final ApiCallback _callback) throw Object localVarPostBody = null; // create path and map variables - String localVarPath = "/2023-04/retail-media/me"; + String localVarPath = "/2024-07/retail-media/me"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/ApiKeyAuth.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/ApiKeyAuth.java similarity index 89% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/ApiKeyAuth.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/ApiKeyAuth.java index dcdaa890..12350eb6 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/ApiKeyAuth.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/ApiKeyAuth.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,10 @@ */ -package com.criteo.api.retailmedia.v2023_04.auth; +package com.criteo.api.retailmedia.v2024_07.auth; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Pair; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Pair; import java.net.URI; import java.util.Map; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/Authentication.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/Authentication.java similarity index 81% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/Authentication.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/Authentication.java index 74310507..0ef76ab5 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/Authentication.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/Authentication.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,10 @@ */ -package com.criteo.api.retailmedia.v2023_04.auth; +package com.criteo.api.retailmedia.v2024_07.auth; -import com.criteo.api.retailmedia.v2023_04.Pair; -import com.criteo.api.retailmedia.v2023_04.ApiException; +import com.criteo.api.retailmedia.v2024_07.Pair; +import com.criteo.api.retailmedia.v2024_07.ApiException; import java.net.URI; import java.util.Map; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/HttpBasicAuth.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/HttpBasicAuth.java similarity index 86% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/HttpBasicAuth.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/HttpBasicAuth.java index 36f7a784..25a5fdf7 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/HttpBasicAuth.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/HttpBasicAuth.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,10 @@ */ -package com.criteo.api.retailmedia.v2023_04.auth; +package com.criteo.api.retailmedia.v2024_07.auth; -import com.criteo.api.retailmedia.v2023_04.Pair; -import com.criteo.api.retailmedia.v2023_04.ApiException; +import com.criteo.api.retailmedia.v2024_07.Pair; +import com.criteo.api.retailmedia.v2024_07.ApiException; import okhttp3.Credentials; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/HttpBearerAuth.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/HttpBearerAuth.java similarity index 88% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/HttpBearerAuth.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/HttpBearerAuth.java index 117e846b..39a07736 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/HttpBearerAuth.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/HttpBearerAuth.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,10 @@ */ -package com.criteo.api.retailmedia.v2023_04.auth; +package com.criteo.api.retailmedia.v2024_07.auth; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Pair; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Pair; import java.net.URI; import java.util.Map; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/OAuth.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/OAuth.java similarity index 82% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/OAuth.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/OAuth.java index f361bb06..b1e4d512 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/OAuth.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/OAuth.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,10 +11,10 @@ */ -package com.criteo.api.retailmedia.v2023_04.auth; +package com.criteo.api.retailmedia.v2024_07.auth; -import com.criteo.api.retailmedia.v2023_04.Pair; -import com.criteo.api.retailmedia.v2023_04.ApiException; +import com.criteo.api.retailmedia.v2024_07.Pair; +import com.criteo.api.retailmedia.v2024_07.ApiException; import java.net.URI; import java.util.Map; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/OAuthFlow.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/OAuthFlow.java similarity index 84% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/OAuthFlow.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/OAuthFlow.java index f0e07f06..a1a8a4be 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/OAuthFlow.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/OAuthFlow.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.auth; +package com.criteo.api.retailmedia.v2024_07.auth; /** * OAuth flows that are supported by this client diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/OAuthOkHttpClient.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/OAuthOkHttpClient.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/OAuthOkHttpClient.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/OAuthOkHttpClient.java index b9470dbb..292571c3 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/OAuthOkHttpClient.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/OAuthOkHttpClient.java @@ -1,4 +1,4 @@ -package com.criteo.api.retailmedia.v2023_04.auth; +package com.criteo.api.retailmedia.v2024_07.auth; import okhttp3.OkHttpClient; import okhttp3.MediaType; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/RetryingOAuth.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/RetryingOAuth.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/RetryingOAuth.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/RetryingOAuth.java index 819b3a5b..0eb4d31e 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/auth/RetryingOAuth.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/auth/RetryingOAuth.java @@ -1,7 +1,7 @@ -package com.criteo.api.retailmedia.v2023_04.auth; +package com.criteo.api.retailmedia.v2024_07.auth; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.Pair; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.Pair; import okhttp3.Interceptor; import okhttp3.OkHttpClient; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AbstractOpenApiSchema.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AbstractOpenApiSchema.java similarity index 96% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AbstractOpenApiSchema.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AbstractOpenApiSchema.java index ca557ab9..55fa05cb 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AbstractOpenApiSchema.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AbstractOpenApiSchema.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,9 +11,9 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; -import com.criteo.api.retailmedia.v2023_04.ApiException; +import com.criteo.api.retailmedia.v2024_07.ApiException; import java.util.Objects; import java.lang.reflect.Type; import java.util.Map; diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddFundsToBalanceRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddFundsToBalanceRequest.java new file mode 100644 index 00000000..67326b58 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddFundsToBalanceRequest.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfAddFundsToBalance; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Data model for an input resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AddFundsToBalanceRequest { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ResourceOfAddFundsToBalance data; + + public AddFundsToBalanceRequest() { + } + + public AddFundsToBalanceRequest data(ResourceOfAddFundsToBalance data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ResourceOfAddFundsToBalance getData() { + return data; + } + + + public void setData(ResourceOfAddFundsToBalance data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AddFundsToBalanceRequest instance itself + */ + public AddFundsToBalanceRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddFundsToBalanceRequest addFundsToBalanceRequest = (AddFundsToBalanceRequest) o; + return Objects.equals(this.data, addFundsToBalanceRequest.data)&& + Objects.equals(this.additionalProperties, addFundsToBalanceRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddFundsToBalanceRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AddFundsToBalanceRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AddFundsToBalanceRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AddFundsToBalanceRequest is not found in the empty JSON string", AddFundsToBalanceRequest.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ResourceOfAddFundsToBalance.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AddFundsToBalanceRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AddFundsToBalanceRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AddFundsToBalanceRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AddFundsToBalanceRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AddFundsToBalanceRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AddFundsToBalanceRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AddFundsToBalanceRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AddFundsToBalanceRequest + * @throws IOException if the JSON string is invalid with respect to AddFundsToBalanceRequest + */ + public static AddFundsToBalanceRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AddFundsToBalanceRequest.class); + } + + /** + * Convert an instance of AddFundsToBalanceRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordModel.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordModel.java index c0354bba..e3aae811 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.MatchTypeModel; +import com.criteo.api.retailmedia.v2024_07.model.MatchTypeModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A single keyword to be added or removed diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordsModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordsModel.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordsModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordsModel.java index b4c17a25..53ea7abc 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordsModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordsModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.AddRemoveKeywordModel; +import com.criteo.api.retailmedia.v2024_07.model.AddRemoveKeywordModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model containing keywords to be added or removed from a line item diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordsModelRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordsModelRequest.java similarity index 96% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordsModelRequest.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordsModelRequest.java index 090f903a..9428df30 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordsModelRequest.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordsModelRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.AddRemoveKeywordsModelResource; +import com.criteo.api.retailmedia.v2024_07.model.AddRemoveKeywordsModelResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Request object to add or remove keywords from a line item diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordsModelResource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordsModelResource.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordsModelResource.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordsModelResource.java index aa190cf9..551dc44b 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddRemoveKeywordsModelResource.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddRemoveKeywordsModelResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.AddRemoveKeywordsModel; +import com.criteo.api.retailmedia.v2024_07.model.AddRemoveKeywordsModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Resource object containing keywords to be added or removed from a line item diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddToBasketIdsUpdateModel202110Request.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddToBasketIdsUpdateModel202110Request.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddToBasketIdsUpdateModel202110Request.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddToBasketIdsUpdateModel202110Request.java index 3257b9d5..b8ec70f0 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddToBasketIdsUpdateModel202110Request.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddToBasketIdsUpdateModel202110Request.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfAddToBasketIdsUpdateModel202110; +import com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfAddToBasketIdsUpdateModel202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type input resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddToBasketTarget202110Request.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddToBasketTarget202110Request.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddToBasketTarget202110Request.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddToBasketTarget202110Request.java index 4ddf811d..8d7f0d15 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddToBasketTarget202110Request.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddToBasketTarget202110Request.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfAddToBasketTarget202110; +import com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfAddToBasketTarget202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type input resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddToBasketTarget202110Response.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddToBasketTarget202110Response.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddToBasketTarget202110Response.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddToBasketTarget202110Response.java index 18c325ac..b3b3e130 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AddToBasketTarget202110Response.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AddToBasketTarget202110Response.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfAddToBasketTarget202110; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfAddToBasketTarget202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type resource outcome diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApplicationSummaryModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApplicationSummaryModel.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApplicationSummaryModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApplicationSummaryModel.java index a6166665..e31ac624 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApplicationSummaryModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApplicationSummaryModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,10 +42,10 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** - * Model of ApplicationSummary + * Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModel { diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApplicationSummaryModelResource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApplicationSummaryModelResource.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApplicationSummaryModelResource.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApplicationSummaryModelResource.java index 63bd954e..8991b922 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApplicationSummaryModelResource.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApplicationSummaryModelResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ApplicationSummaryModel; +import com.criteo.api.retailmedia.v2024_07.model.ApplicationSummaryModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,10 +43,10 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** - * A class that represents a ValueType in a guild compliant way + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResource { diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApplicationSummaryModelResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApplicationSummaryModelResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApplicationSummaryModelResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApplicationSummaryModelResponse.java index 6b99f867..7ad90f96 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApplicationSummaryModelResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApplicationSummaryModelResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ApplicationSummaryModelResource; -import com.criteo.api.retailmedia.v2023_04.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.ApplicationSummaryModelResource; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,10 +46,10 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** - * Response of ApplicationSummaryModel + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResponse { diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApprovalStatusModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApprovalStatusModel.java similarity index 94% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApprovalStatusModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApprovalStatusModel.java index 24647a43..37a43443 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ApprovalStatusModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ApprovalStatusModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Asset.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Asset.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Asset.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Asset.java index 45d838ed..669c3e23 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Asset.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Asset.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Handles pointing towards binary content that advertisers can use later on, for example in their creatives. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AssetResource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AssetResource.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AssetResource.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AssetResource.java index dcc71541..8a35231d 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AssetResource.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AssetResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.Asset; +import com.criteo.api.retailmedia.v2024_07.model.Asset; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A class that represents an entity in a guild compliant way diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AssetResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AssetResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AssetResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AssetResponse.java index b22cc25b..729ac68a 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AssetResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AssetResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.AssetResource; -import com.criteo.api.retailmedia.v2023_04.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.AssetResource; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A class implementing the response of the Criteo API as described in API Guild Guidelines with a single entity as body diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncCampaignsReport.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncCampaignsReport.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncCampaignsReport.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncCampaignsReport.java index 18954a45..6e8bc2d4 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncCampaignsReport.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncCampaignsReport.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Async Campaigns report body request @@ -439,6 +439,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncCampaignsReportRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncCampaignsReportRequest.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncCampaignsReportRequest.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncCampaignsReportRequest.java index e9858525..1965a38b 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncCampaignsReportRequest.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncCampaignsReportRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.AsyncCampaignsReportResource; +import com.criteo.api.retailmedia.v2024_07.model.AsyncCampaignsReportResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API request for a single value diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncCampaignsReportResource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncCampaignsReportResource.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncCampaignsReportResource.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncCampaignsReportResource.java index a9425b77..76235f5d 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncCampaignsReportResource.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncCampaignsReportResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.AsyncCampaignsReport; +import com.criteo.api.retailmedia.v2024_07.model.AsyncCampaignsReport; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API response for a single value diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncLineItemsReport.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncLineItemsReport.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncLineItemsReport.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncLineItemsReport.java index b6f20687..834c4917 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncLineItemsReport.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncLineItemsReport.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Async Line Items report body request @@ -439,6 +439,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncLineItemsReportRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncLineItemsReportRequest.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncLineItemsReportRequest.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncLineItemsReportRequest.java index be79b467..470aac18 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncLineItemsReportRequest.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncLineItemsReportRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.AsyncLineItemsReportResource; +import com.criteo.api.retailmedia.v2024_07.model.AsyncLineItemsReportResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API request for a single value diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncLineItemsReportResource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncLineItemsReportResource.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncLineItemsReportResource.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncLineItemsReportResource.java index 8aa15220..c283f969 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncLineItemsReportResource.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncLineItemsReportResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.AsyncLineItemsReport; +import com.criteo.api.retailmedia.v2024_07.model.AsyncLineItemsReport; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API response for a single value diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncReportResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncReportResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncReportResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncReportResponse.java index 5612e902..844a5c5d 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AsyncReportResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncReportResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CommonProblem; -import com.criteo.api.retailmedia.v2023_04.model.StatusResponseResource; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.StatusResponseResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Async Report response format diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReport.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReport.java new file mode 100644 index 00000000..8f73ba67 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReport.java @@ -0,0 +1,1702 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Async Revenue report body request + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AsyncRevenueReport { + public static final String SERIALIZED_NAME_IDS = "ids"; + @SerializedName(SERIALIZED_NAME_IDS) + private List ids = null; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + /** + * Type of report + */ + @JsonAdapter(ReportTypeEnum.Adapter.class) + public enum ReportTypeEnum { + ADVERTISER("advertiser"), + + ENVIRONMENT("environment"), + + PAGETYPE("pageType"), + + PRODUCTCATEGORY("productCategory"), + + BRAND("brand"); + + private String value; + + ReportTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ReportTypeEnum fromValue(String value) { + for (ReportTypeEnum b : ReportTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ReportTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ReportTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ReportTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_REPORT_TYPE = "reportType"; + @SerializedName(SERIALIZED_NAME_REPORT_TYPE) + private ReportTypeEnum reportType; + + /** + * Type of revenue + */ + @JsonAdapter(RevenueTypeEnum.Adapter.class) + public enum RevenueTypeEnum { + AUCTION("auction"), + + PREFERRED("preferred"); + + private String value; + + RevenueTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static RevenueTypeEnum fromValue(String value) { + for (RevenueTypeEnum b : RevenueTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RevenueTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RevenueTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return RevenueTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_REVENUE_TYPE = "revenueType"; + @SerializedName(SERIALIZED_NAME_REVENUE_TYPE) + private RevenueTypeEnum revenueType; + + /** + * Filter on the seller: Indirect Sold, Direct Sold or Private Market + */ + @JsonAdapter(SoldByEnum.Adapter.class) + public enum SoldByEnum { + DIRECTSOLD("directSold"), + + INDIRECTSOLD("indirectSold"), + + PRIVATEMARKET("privateMarket"); + + private String value; + + SoldByEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SoldByEnum fromValue(String value) { + for (SoldByEnum b : SoldByEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SoldByEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SoldByEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SoldByEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_SOLD_BY = "soldBy"; + @SerializedName(SERIALIZED_NAME_SOLD_BY) + private SoldByEnum soldBy; + + /** + * Filter on buy type: Auction, Preferred Deals or Sponsorship + */ + @JsonAdapter(BuyTypeEnum.Adapter.class) + public enum BuyTypeEnum { + AUCTION("auction"), + + PREFERREDDEALS("preferredDeals"), + + SPONSORSHIP("sponsorship"); + + private String value; + + BuyTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BuyTypeEnum fromValue(String value) { + for (BuyTypeEnum b : BuyTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BuyTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BuyTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BuyTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_BUY_TYPE = "buyType"; + @SerializedName(SERIALIZED_NAME_BUY_TYPE) + private BuyTypeEnum buyType; + + /** + * Gets or Sets advertiserTypes + */ + @JsonAdapter(AdvertiserTypesEnum.Adapter.class) + public enum AdvertiserTypesEnum { + RETAILER("retailer"), + + BRAND("brand"), + + SELLER("seller"); + + private String value; + + AdvertiserTypesEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AdvertiserTypesEnum fromValue(String value) { + for (AdvertiserTypesEnum b : AdvertiserTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AdvertiserTypesEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AdvertiserTypesEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AdvertiserTypesEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_ADVERTISER_TYPES = "advertiserTypes"; + @SerializedName(SERIALIZED_NAME_ADVERTISER_TYPES) + private List advertiserTypes = null; + + /** + * Gets or Sets skuRelations + */ + @JsonAdapter(SkuRelationsEnum.Adapter.class) + public enum SkuRelationsEnum { + SAMESKU("sameSku"), + + SAMEPARENTSKU("sameParentSku"), + + SAMECATEGORY("sameCategory"), + + SAMEBRAND("sameBrand"), + + SAMESELLER("sameSeller"); + + private String value; + + SkuRelationsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SkuRelationsEnum fromValue(String value) { + for (SkuRelationsEnum b : SkuRelationsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SkuRelationsEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SkuRelationsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SkuRelationsEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_SKU_RELATIONS = "skuRelations"; + @SerializedName(SERIALIZED_NAME_SKU_RELATIONS) + private List skuRelations = null; + + /** + * Format of the output + */ + @JsonAdapter(FormatEnum.Adapter.class) + public enum FormatEnum { + JSON("json"), + + JSON_COMPACT("json-compact"), + + JSON_NEWLINE("json-newline"), + + CSV("csv"); + + private String value; + + FormatEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FormatEnum fromValue(String value) { + for (FormatEnum b : FormatEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final FormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FormatEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_FORMAT = "format"; + @SerializedName(SERIALIZED_NAME_FORMAT) + private FormatEnum format; + + /** + * Filter the type of campaigns to report on: sponsoredProducts or onSiteDisplays + */ + @JsonAdapter(CampaignTypeEnum.Adapter.class) + public enum CampaignTypeEnum { + ALL("all"), + + SPONSOREDPRODUCTS("sponsoredProducts"), + + ONSITEDISPLAYS("onSiteDisplays"); + + private String value; + + CampaignTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CampaignTypeEnum fromValue(String value) { + for (CampaignTypeEnum b : CampaignTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CampaignTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CampaignTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CampaignTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_CAMPAIGN_TYPE = "campaignType"; + @SerializedName(SERIALIZED_NAME_CAMPAIGN_TYPE) + private CampaignTypeEnum campaignType = CampaignTypeEnum.ALL; + + /** + * Filter on specific sales channel: offline or online + */ + @JsonAdapter(SalesChannelEnum.Adapter.class) + public enum SalesChannelEnum { + ALL("all"), + + OFFLINE("offline"), + + ONLINE("online"); + + private String value; + + SalesChannelEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SalesChannelEnum fromValue(String value) { + for (SalesChannelEnum b : SalesChannelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SalesChannelEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SalesChannelEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SalesChannelEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_SALES_CHANNEL = "salesChannel"; + @SerializedName(SERIALIZED_NAME_SALES_CHANNEL) + private SalesChannelEnum salesChannel = SalesChannelEnum.ALL; + + /** + * Click attribution window + */ + @JsonAdapter(ClickAttributionWindowEnum.Adapter.class) + public enum ClickAttributionWindowEnum { + NONE("none"), + + _7D("7D"), + + _14D("14D"), + + _30D("30D"); + + private String value; + + ClickAttributionWindowEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ClickAttributionWindowEnum fromValue(String value) { + for (ClickAttributionWindowEnum b : ClickAttributionWindowEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ClickAttributionWindowEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ClickAttributionWindowEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ClickAttributionWindowEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_CLICK_ATTRIBUTION_WINDOW = "clickAttributionWindow"; + @SerializedName(SERIALIZED_NAME_CLICK_ATTRIBUTION_WINDOW) + private ClickAttributionWindowEnum clickAttributionWindow = ClickAttributionWindowEnum.NONE; + + /** + * View attribution window + */ + @JsonAdapter(ViewAttributionWindowEnum.Adapter.class) + public enum ViewAttributionWindowEnum { + NONE("none"), + + _1D("1D"), + + _7D("7D"), + + _14D("14D"), + + _30D("30D"); + + private String value; + + ViewAttributionWindowEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ViewAttributionWindowEnum fromValue(String value) { + for (ViewAttributionWindowEnum b : ViewAttributionWindowEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ViewAttributionWindowEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ViewAttributionWindowEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ViewAttributionWindowEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_VIEW_ATTRIBUTION_WINDOW = "viewAttributionWindow"; + @SerializedName(SERIALIZED_NAME_VIEW_ATTRIBUTION_WINDOW) + private ViewAttributionWindowEnum viewAttributionWindow = ViewAttributionWindowEnum.NONE; + + /** + * Gets or Sets dimensions + */ + @JsonAdapter(DimensionsEnum.Adapter.class) + public enum DimensionsEnum { + DATE("date"), + + HOUR("hour"), + + PARENTACCOUNT("parentAccount"), + + ACCOUNTID("accountId"), + + ACCOUNTNAME("accountName"), + + ACCOUNTTYPENAME("accountTypeName"), + + ADVERTISERTYPE("advertiserType"), + + CAMPAIGNID("campaignId"), + + CAMPAIGNNAME("campaignName"), + + CAMPAIGNTYPENAME("campaignTypeName"), + + CAMPAIGNSTARTDATE("campaignStartDate"), + + CAMPAIGNENDDATE("campaignEndDate"), + + LINEITEMID("lineItemId"), + + LINEITEMNAME("lineItemName"), + + LINEITEMSTARTDATE("lineItemStartDate"), + + LINEITEMENDDATE("lineItemEndDate"), + + LINEITEMSTATUS("lineItemStatus"), + + RETAILERID("retailerId"), + + RETAILERNAME("retailerName"), + + BRANDID("brandId"), + + BRANDNAME("brandName"), + + PLACEMENTID("placementId"), + + PLACEMENTNAME("placementName"), + + PAGETYPENAME("pageTypeName"), + + ENVIRONMENT("environment"), + + PAGECATEGORY("pageCategory"), + + ADVPRODUCTID("advProductId"), + + ADVPRODUCTNAME("advProductName"), + + ADVPRODUCTGTIN("advProductGtin"), + + ADVPRODUCTMPN("advProductMpn"), + + BUYTYPE("buyType"), + + SOLDBY("soldBy"), + + SALECHANNEL("saleChannel"), + + ATTRIBUTIONSETTINGS("attributionSettings"), + + ACTIVITYTYPE("activityType"), + + KEYWORD("keyword"), + + SKURELATION("skuRelation"), + + RETAILERCATEGORYID("retailerCategoryId"), + + RETAILERCATEGORYNAME("retailerCategoryName"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + + TAXONOMY1ID("taxonomy1Id"), + + TAXONOMY1NAME("taxonomy1Name"), + + TAXONOMY2ID("taxonomy2Id"), + + TAXONOMY2NAME("taxonomy2Name"), + + TAXONOMY3ID("taxonomy3Id"), + + TAXONOMY3NAME("taxonomy3Name"), + + TAXONOMY4ID("taxonomy4Id"), + + TAXONOMY4NAME("taxonomy4Name"), + + TAXONOMY5ID("taxonomy5Id"), + + TAXONOMY5NAME("taxonomy5Name"), + + TAXONOMY6ID("taxonomy6Id"), + + TAXONOMY6NAME("taxonomy6Name"), + + TAXONOMY7ID("taxonomy7Id"), + + TAXONOMY7NAME("taxonomy7Name"); + + private String value; + + DimensionsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DimensionsEnum fromValue(String value) { + for (DimensionsEnum b : DimensionsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DimensionsEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DimensionsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DimensionsEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_DIMENSIONS = "dimensions"; + @SerializedName(SERIALIZED_NAME_DIMENSIONS) + private List dimensions = null; + + /** + * Gets or Sets metrics + */ + @JsonAdapter(MetricsEnum.Adapter.class) + public enum MetricsEnum { + NUMBEROFCAMPAIGNS("numberOfCampaigns"), + + NUMBEROFLINEITEMS("numberOfLineItems"), + + NUMBEROFSKUS("numberOfSkus"), + + SKUPRICE("skuPrice"), + + PAGEVIEWS("pageViews"), + + IMPRESSIONS("impressions"), + + PRODUCTCLICKS("productClicks"), + + PLACEMENTCLICKS("placementClicks"), + + CLICKS("clicks"), + + SALES("sales"), + + UNITS("units"), + + TRANSACTIONS("transactions"), + + ASSISTEDSALES("assistedSales"), + + ASSISTEDUNITS("assistedUnits"), + + REVENUE("revenue"), + + OPENAUCTIONREVENUE("openAuctionRevenue"), + + PREFERREDDEALSREVENUE("preferredDealsRevenue"), + + CTR("ctr"), + + CR("cr"), + + CPC("cpc"), + + CPM("cpm"), + + ROAS("roas"), + + WORKINGMEDIA("workingMedia"), + + NETREVENUE("netRevenue"), + + VIDEOVIEWS("videoViews"), + + VIDEOSSTARTED("videosStarted"), + + VIDEOSPLAYEDTO25("videosPlayedTo25"), + + VIDEOSPLAYEDTO50("videosPlayedTo50"), + + VIDEOSPLAYEDTO75("videosPlayedTo75"), + + VIDEOSPLAYEDTO100("videosPlayedTo100"), + + VIDEOPLAYINGRATE("videoPlayingRate"), + + VIDEOCOMPLETIONRATE("videoCompletionRate"), + + UNIQUEVISITORS("uniqueVisitors"), + + FREQUENCY("frequency"); + + private String value; + + MetricsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MetricsEnum fromValue(String value) { + for (MetricsEnum b : MetricsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MetricsEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MetricsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MetricsEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_METRICS = "metrics"; + @SerializedName(SERIALIZED_NAME_METRICS) + private List metrics = null; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private OffsetDateTime startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private OffsetDateTime endDate; + + public static final String SERIALIZED_NAME_TIMEZONE = "timezone"; + @SerializedName(SERIALIZED_NAME_TIMEZONE) + private String timezone = "UTC"; + + public AsyncRevenueReport() { + } + + public AsyncRevenueReport ids(List ids) { + + this.ids = ids; + return this; + } + + public AsyncRevenueReport addIdsItem(String idsItem) { + if (this.ids == null) { + this.ids = null; + } + this.ids.add(idsItem); + return this; + } + + /** + * Supply account ids to report on + * @return ids + **/ + @javax.annotation.Nullable + + public List getIds() { + return ids; + } + + + public void setIds(List ids) { + this.ids = ids; + } + + + public AsyncRevenueReport id(String id) { + + this.id = id; + return this; + } + + /** + * Supply account id to report on + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public AsyncRevenueReport reportType(ReportTypeEnum reportType) { + + this.reportType = reportType; + return this; + } + + /** + * Type of report + * @return reportType + **/ + @javax.annotation.Nullable + + public ReportTypeEnum getReportType() { + return reportType; + } + + + public void setReportType(ReportTypeEnum reportType) { + this.reportType = reportType; + } + + + public AsyncRevenueReport revenueType(RevenueTypeEnum revenueType) { + + this.revenueType = revenueType; + return this; + } + + /** + * Type of revenue + * @return revenueType + **/ + @javax.annotation.Nullable + + public RevenueTypeEnum getRevenueType() { + return revenueType; + } + + + public void setRevenueType(RevenueTypeEnum revenueType) { + this.revenueType = revenueType; + } + + + public AsyncRevenueReport soldBy(SoldByEnum soldBy) { + + this.soldBy = soldBy; + return this; + } + + /** + * Filter on the seller: Indirect Sold, Direct Sold or Private Market + * @return soldBy + **/ + @javax.annotation.Nullable + + public SoldByEnum getSoldBy() { + return soldBy; + } + + + public void setSoldBy(SoldByEnum soldBy) { + this.soldBy = soldBy; + } + + + public AsyncRevenueReport buyType(BuyTypeEnum buyType) { + + this.buyType = buyType; + return this; + } + + /** + * Filter on buy type: Auction, Preferred Deals or Sponsorship + * @return buyType + **/ + @javax.annotation.Nullable + + public BuyTypeEnum getBuyType() { + return buyType; + } + + + public void setBuyType(BuyTypeEnum buyType) { + this.buyType = buyType; + } + + + public AsyncRevenueReport advertiserTypes(List advertiserTypes) { + + this.advertiserTypes = advertiserTypes; + return this; + } + + public AsyncRevenueReport addAdvertiserTypesItem(AdvertiserTypesEnum advertiserTypesItem) { + if (this.advertiserTypes == null) { + this.advertiserTypes = null; + } + this.advertiserTypes.add(advertiserTypesItem); + return this; + } + + /** + * Filter on the type of advertiser: retailer, brand, seller + * @return advertiserTypes + **/ + @javax.annotation.Nullable + + public List getAdvertiserTypes() { + return advertiserTypes; + } + + + public void setAdvertiserTypes(List advertiserTypes) { + this.advertiserTypes = advertiserTypes; + } + + + public AsyncRevenueReport skuRelations(List skuRelations) { + + this.skuRelations = skuRelations; + return this; + } + + public AsyncRevenueReport addSkuRelationsItem(SkuRelationsEnum skuRelationsItem) { + if (this.skuRelations == null) { + this.skuRelations = null; + } + this.skuRelations.add(skuRelationsItem); + return this; + } + + /** + * Filter on sku relations: Same SKU, Same Parent SKU, Same Category, Same Brand or Same Seller + * @return skuRelations + **/ + @javax.annotation.Nullable + + public List getSkuRelations() { + return skuRelations; + } + + + public void setSkuRelations(List skuRelations) { + this.skuRelations = skuRelations; + } + + + public AsyncRevenueReport format(FormatEnum format) { + + this.format = format; + return this; + } + + /** + * Format of the output + * @return format + **/ + @javax.annotation.Nullable + + public FormatEnum getFormat() { + return format; + } + + + public void setFormat(FormatEnum format) { + this.format = format; + } + + + public AsyncRevenueReport campaignType(CampaignTypeEnum campaignType) { + + this.campaignType = campaignType; + return this; + } + + /** + * Filter the type of campaigns to report on: sponsoredProducts or onSiteDisplays + * @return campaignType + **/ + @javax.annotation.Nullable + + public CampaignTypeEnum getCampaignType() { + return campaignType; + } + + + public void setCampaignType(CampaignTypeEnum campaignType) { + this.campaignType = campaignType; + } + + + public AsyncRevenueReport salesChannel(SalesChannelEnum salesChannel) { + + this.salesChannel = salesChannel; + return this; + } + + /** + * Filter on specific sales channel: offline or online + * @return salesChannel + **/ + @javax.annotation.Nullable + + public SalesChannelEnum getSalesChannel() { + return salesChannel; + } + + + public void setSalesChannel(SalesChannelEnum salesChannel) { + this.salesChannel = salesChannel; + } + + + public AsyncRevenueReport clickAttributionWindow(ClickAttributionWindowEnum clickAttributionWindow) { + + this.clickAttributionWindow = clickAttributionWindow; + return this; + } + + /** + * Click attribution window + * @return clickAttributionWindow + **/ + @javax.annotation.Nullable + + public ClickAttributionWindowEnum getClickAttributionWindow() { + return clickAttributionWindow; + } + + + public void setClickAttributionWindow(ClickAttributionWindowEnum clickAttributionWindow) { + this.clickAttributionWindow = clickAttributionWindow; + } + + + public AsyncRevenueReport viewAttributionWindow(ViewAttributionWindowEnum viewAttributionWindow) { + + this.viewAttributionWindow = viewAttributionWindow; + return this; + } + + /** + * View attribution window + * @return viewAttributionWindow + **/ + @javax.annotation.Nullable + + public ViewAttributionWindowEnum getViewAttributionWindow() { + return viewAttributionWindow; + } + + + public void setViewAttributionWindow(ViewAttributionWindowEnum viewAttributionWindow) { + this.viewAttributionWindow = viewAttributionWindow; + } + + + public AsyncRevenueReport dimensions(List dimensions) { + + this.dimensions = dimensions; + return this; + } + + public AsyncRevenueReport addDimensionsItem(DimensionsEnum dimensionsItem) { + if (this.dimensions == null) { + this.dimensions = null; + } + this.dimensions.add(dimensionsItem); + return this; + } + + /** + * List of dimensions to report on + * @return dimensions + **/ + @javax.annotation.Nullable + + public List getDimensions() { + return dimensions; + } + + + public void setDimensions(List dimensions) { + this.dimensions = dimensions; + } + + + public AsyncRevenueReport metrics(List metrics) { + + this.metrics = metrics; + return this; + } + + public AsyncRevenueReport addMetricsItem(MetricsEnum metricsItem) { + if (this.metrics == null) { + this.metrics = null; + } + this.metrics.add(metricsItem); + return this; + } + + /** + * List of metrics to report on + * @return metrics + **/ + @javax.annotation.Nullable + + public List getMetrics() { + return metrics; + } + + + public void setMetrics(List metrics) { + this.metrics = metrics; + } + + + public AsyncRevenueReport startDate(OffsetDateTime startDate) { + + this.startDate = startDate; + return this; + } + + /** + * Start date + * @return startDate + **/ + @javax.annotation.Nonnull + + public OffsetDateTime getStartDate() { + return startDate; + } + + + public void setStartDate(OffsetDateTime startDate) { + this.startDate = startDate; + } + + + public AsyncRevenueReport endDate(OffsetDateTime endDate) { + + this.endDate = endDate; + return this; + } + + /** + * End date + * @return endDate + **/ + @javax.annotation.Nonnull + + public OffsetDateTime getEndDate() { + return endDate; + } + + + public void setEndDate(OffsetDateTime endDate) { + this.endDate = endDate; + } + + + public AsyncRevenueReport timezone(String timezone) { + + this.timezone = timezone; + return this; + } + + /** + * Time zone : see criteo developer portal for supported time zones + * @return timezone + **/ + @javax.annotation.Nullable + + public String getTimezone() { + return timezone; + } + + + public void setTimezone(String timezone) { + this.timezone = timezone; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AsyncRevenueReport instance itself + */ + public AsyncRevenueReport putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AsyncRevenueReport asyncRevenueReport = (AsyncRevenueReport) o; + return Objects.equals(this.ids, asyncRevenueReport.ids) && + Objects.equals(this.id, asyncRevenueReport.id) && + Objects.equals(this.reportType, asyncRevenueReport.reportType) && + Objects.equals(this.revenueType, asyncRevenueReport.revenueType) && + Objects.equals(this.soldBy, asyncRevenueReport.soldBy) && + Objects.equals(this.buyType, asyncRevenueReport.buyType) && + Objects.equals(this.advertiserTypes, asyncRevenueReport.advertiserTypes) && + Objects.equals(this.skuRelations, asyncRevenueReport.skuRelations) && + Objects.equals(this.format, asyncRevenueReport.format) && + Objects.equals(this.campaignType, asyncRevenueReport.campaignType) && + Objects.equals(this.salesChannel, asyncRevenueReport.salesChannel) && + Objects.equals(this.clickAttributionWindow, asyncRevenueReport.clickAttributionWindow) && + Objects.equals(this.viewAttributionWindow, asyncRevenueReport.viewAttributionWindow) && + Objects.equals(this.dimensions, asyncRevenueReport.dimensions) && + Objects.equals(this.metrics, asyncRevenueReport.metrics) && + Objects.equals(this.startDate, asyncRevenueReport.startDate) && + Objects.equals(this.endDate, asyncRevenueReport.endDate) && + Objects.equals(this.timezone, asyncRevenueReport.timezone)&& + Objects.equals(this.additionalProperties, asyncRevenueReport.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(ids, id, reportType, revenueType, soldBy, buyType, advertiserTypes, skuRelations, format, campaignType, salesChannel, clickAttributionWindow, viewAttributionWindow, dimensions, metrics, startDate, endDate, timezone, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AsyncRevenueReport {\n"); + sb.append(" ids: ").append(toIndentedString(ids)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" reportType: ").append(toIndentedString(reportType)).append("\n"); + sb.append(" revenueType: ").append(toIndentedString(revenueType)).append("\n"); + sb.append(" soldBy: ").append(toIndentedString(soldBy)).append("\n"); + sb.append(" buyType: ").append(toIndentedString(buyType)).append("\n"); + sb.append(" advertiserTypes: ").append(toIndentedString(advertiserTypes)).append("\n"); + sb.append(" skuRelations: ").append(toIndentedString(skuRelations)).append("\n"); + sb.append(" format: ").append(toIndentedString(format)).append("\n"); + sb.append(" campaignType: ").append(toIndentedString(campaignType)).append("\n"); + sb.append(" salesChannel: ").append(toIndentedString(salesChannel)).append("\n"); + sb.append(" clickAttributionWindow: ").append(toIndentedString(clickAttributionWindow)).append("\n"); + sb.append(" viewAttributionWindow: ").append(toIndentedString(viewAttributionWindow)).append("\n"); + sb.append(" dimensions: ").append(toIndentedString(dimensions)).append("\n"); + sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("ids"); + openapiFields.add("id"); + openapiFields.add("reportType"); + openapiFields.add("revenueType"); + openapiFields.add("soldBy"); + openapiFields.add("buyType"); + openapiFields.add("advertiserTypes"); + openapiFields.add("skuRelations"); + openapiFields.add("format"); + openapiFields.add("campaignType"); + openapiFields.add("salesChannel"); + openapiFields.add("clickAttributionWindow"); + openapiFields.add("viewAttributionWindow"); + openapiFields.add("dimensions"); + openapiFields.add("metrics"); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + openapiFields.add("timezone"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("startDate"); + openapiRequiredFields.add("endDate"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AsyncRevenueReport + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AsyncRevenueReport.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AsyncRevenueReport is not found in the empty JSON string", AsyncRevenueReport.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AsyncRevenueReport.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("ids") != null && !jsonObj.get("ids").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `ids` to be an array in the JSON string but got `%s`", jsonObj.get("ids").toString())); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("reportType") != null && !jsonObj.get("reportType").isJsonNull()) && !jsonObj.get("reportType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `reportType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reportType").toString())); + } + if ((jsonObj.get("revenueType") != null && !jsonObj.get("revenueType").isJsonNull()) && !jsonObj.get("revenueType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `revenueType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("revenueType").toString())); + } + if ((jsonObj.get("soldBy") != null && !jsonObj.get("soldBy").isJsonNull()) && !jsonObj.get("soldBy").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `soldBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("soldBy").toString())); + } + if ((jsonObj.get("buyType") != null && !jsonObj.get("buyType").isJsonNull()) && !jsonObj.get("buyType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `buyType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("buyType").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("advertiserTypes") != null && !jsonObj.get("advertiserTypes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `advertiserTypes` to be an array in the JSON string but got `%s`", jsonObj.get("advertiserTypes").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("skuRelations") != null && !jsonObj.get("skuRelations").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `skuRelations` to be an array in the JSON string but got `%s`", jsonObj.get("skuRelations").toString())); + } + if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); + } + if ((jsonObj.get("campaignType") != null && !jsonObj.get("campaignType").isJsonNull()) && !jsonObj.get("campaignType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `campaignType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignType").toString())); + } + if ((jsonObj.get("salesChannel") != null && !jsonObj.get("salesChannel").isJsonNull()) && !jsonObj.get("salesChannel").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `salesChannel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("salesChannel").toString())); + } + if ((jsonObj.get("clickAttributionWindow") != null && !jsonObj.get("clickAttributionWindow").isJsonNull()) && !jsonObj.get("clickAttributionWindow").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `clickAttributionWindow` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clickAttributionWindow").toString())); + } + if ((jsonObj.get("viewAttributionWindow") != null && !jsonObj.get("viewAttributionWindow").isJsonNull()) && !jsonObj.get("viewAttributionWindow").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `viewAttributionWindow` to be a primitive type in the JSON string but got `%s`", jsonObj.get("viewAttributionWindow").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("dimensions") != null && !jsonObj.get("dimensions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `dimensions` to be an array in the JSON string but got `%s`", jsonObj.get("dimensions").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("metrics") != null && !jsonObj.get("metrics").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `metrics` to be an array in the JSON string but got `%s`", jsonObj.get("metrics").toString())); + } + if ((jsonObj.get("timezone") != null && !jsonObj.get("timezone").isJsonNull()) && !jsonObj.get("timezone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `timezone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("timezone").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AsyncRevenueReport.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AsyncRevenueReport' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AsyncRevenueReport.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AsyncRevenueReport value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AsyncRevenueReport read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AsyncRevenueReport instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AsyncRevenueReport given an JSON string + * + * @param jsonString JSON string + * @return An instance of AsyncRevenueReport + * @throws IOException if the JSON string is invalid with respect to AsyncRevenueReport + */ + public static AsyncRevenueReport fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AsyncRevenueReport.class); + } + + /** + * Convert an instance of AsyncRevenueReport to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReportRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReportRequest.java new file mode 100644 index 00000000..0cb31245 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReportRequest.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.AsyncRevenueReportResource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API request for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AsyncRevenueReportRequest { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private AsyncRevenueReportResource data; + + public AsyncRevenueReportRequest() { + } + + public AsyncRevenueReportRequest data(AsyncRevenueReportResource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public AsyncRevenueReportResource getData() { + return data; + } + + + public void setData(AsyncRevenueReportResource data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AsyncRevenueReportRequest instance itself + */ + public AsyncRevenueReportRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AsyncRevenueReportRequest asyncRevenueReportRequest = (AsyncRevenueReportRequest) o; + return Objects.equals(this.data, asyncRevenueReportRequest.data)&& + Objects.equals(this.additionalProperties, asyncRevenueReportRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AsyncRevenueReportRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AsyncRevenueReportRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AsyncRevenueReportRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AsyncRevenueReportRequest is not found in the empty JSON string", AsyncRevenueReportRequest.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + AsyncRevenueReportResource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AsyncRevenueReportRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AsyncRevenueReportRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AsyncRevenueReportRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AsyncRevenueReportRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AsyncRevenueReportRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AsyncRevenueReportRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AsyncRevenueReportRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AsyncRevenueReportRequest + * @throws IOException if the JSON string is invalid with respect to AsyncRevenueReportRequest + */ + public static AsyncRevenueReportRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AsyncRevenueReportRequest.class); + } + + /** + * Convert an instance of AsyncRevenueReportRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReportResource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReportResource.java new file mode 100644 index 00000000..04b21175 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AsyncRevenueReportResource.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.AsyncRevenueReport; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AsyncRevenueReportResource { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AsyncRevenueReport attributes; + + public AsyncRevenueReportResource() { + } + + public AsyncRevenueReportResource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public AsyncRevenueReportResource attributes(AsyncRevenueReport attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AsyncRevenueReport getAttributes() { + return attributes; + } + + + public void setAttributes(AsyncRevenueReport attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AsyncRevenueReportResource instance itself + */ + public AsyncRevenueReportResource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AsyncRevenueReportResource asyncRevenueReportResource = (AsyncRevenueReportResource) o; + return Objects.equals(this.type, asyncRevenueReportResource.type) && + Objects.equals(this.attributes, asyncRevenueReportResource.attributes)&& + Objects.equals(this.additionalProperties, asyncRevenueReportResource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AsyncRevenueReportResource {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AsyncRevenueReportResource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AsyncRevenueReportResource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AsyncRevenueReportResource is not found in the empty JSON string", AsyncRevenueReportResource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AsyncRevenueReport.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AsyncRevenueReportResource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AsyncRevenueReportResource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AsyncRevenueReportResource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AsyncRevenueReportResource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AsyncRevenueReportResource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AsyncRevenueReportResource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AsyncRevenueReportResource given an JSON string + * + * @param jsonString JSON string + * @return An instance of AsyncRevenueReportResource + * @throws IOException if the JSON string is invalid with respect to AsyncRevenueReportResource + */ + public static AsyncRevenueReportResource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AsyncRevenueReportResource.class); + } + + /** + * Convert an instance of AsyncRevenueReportResource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemCreateModelRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemCreateModelRequest.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemCreateModelRequest.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemCreateModelRequest.java index 2534089d..96ef503b 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemCreateModelRequest.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemCreateModelRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.InputResourceOfAuctionLineItemCreateModel; +import com.criteo.api.retailmedia.v2024_07.model.InputResourceOfAuctionLineItemCreateModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a create input resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemPagedListResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemPagedListResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemPagedListResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemPagedListResponse.java index c3eea6f2..be52f241 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemPagedListResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemPagedListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.PageMetadata; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfAuctionLineItem; +import com.criteo.api.retailmedia.v2024_07.model.PageMetadata; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfAuctionLineItem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a paged list of response resources diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemResponse.java index adba3fb2..9c779880 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfAuctionLineItem; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfAuctionLineItem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for response resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemUpdateModelRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemUpdateModelRequest.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemUpdateModelRequest.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemUpdateModelRequest.java index 4b600656..24e28b02 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AuctionLineItemUpdateModelRequest.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AuctionLineItemUpdateModelRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfAuctionLineItemUpdateModel; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfAuctionLineItemUpdateModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for an input resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AudienceIdsUpdateModel202110Request.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AudienceIdsUpdateModel202110Request.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AudienceIdsUpdateModel202110Request.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AudienceIdsUpdateModel202110Request.java index e26db12a..f001e9d9 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AudienceIdsUpdateModel202110Request.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AudienceIdsUpdateModel202110Request.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfAudienceIdsUpdateModel202110; +import com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfAudienceIdsUpdateModel202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type input resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AudienceTarget202110Request.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AudienceTarget202110Request.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AudienceTarget202110Request.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AudienceTarget202110Request.java index cebff9c8..53b4c9c2 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AudienceTarget202110Request.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AudienceTarget202110Request.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfAudienceTarget202110; +import com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfAudienceTarget202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type input resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AudienceTarget202110Response.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AudienceTarget202110Response.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AudienceTarget202110Response.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AudienceTarget202110Response.java index 0f3496fd..0122da7c 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/AudienceTarget202110Response.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/AudienceTarget202110Response.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfAudienceTarget202110; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfAudienceTarget202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type resource outcome diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/BalanceCampaign202110ListRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceCampaign202110ListRequest.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/BalanceCampaign202110ListRequest.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceCampaign202110ListRequest.java index b5fd0d55..9850beaf 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/BalanceCampaign202110ListRequest.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceCampaign202110ListRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfBalanceCampaign202110; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfBalanceCampaign202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A class implementing the request of the Criteo API as described in API Guild Guidelines with a collection of entities as body https://criteo.atlassian.net/wiki/spaces/GUA/pages/1564541212/Response+Body+Guidelines diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/BalanceCampaign202110PagedListResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceCampaign202110PagedListResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/BalanceCampaign202110PagedListResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceCampaign202110PagedListResponse.java index f5c9191e..cad5e5b2 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/BalanceCampaign202110PagedListResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceCampaign202110PagedListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.PageMetadata; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfBalanceCampaign202110; +import com.criteo.api.retailmedia.v2024_07.model.PageMetadata; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfBalanceCampaign202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a paged list of response resources diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceHistoryChangeDataCaptureV1.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceHistoryChangeDataCaptureV1.java new file mode 100644 index 00000000..b6d5f723 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceHistoryChangeDataCaptureV1.java @@ -0,0 +1,419 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.ChangeDetailsV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Data model represents the data change capture of balance history. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BalanceHistoryChangeDataCaptureV1 { + public static final String SERIALIZED_NAME_DATE_OF_MODIFICATION = "dateOfModification"; + @SerializedName(SERIALIZED_NAME_DATE_OF_MODIFICATION) + private OffsetDateTime dateOfModification; + + public static final String SERIALIZED_NAME_MODIFIED_BY_USER = "modifiedByUser"; + @SerializedName(SERIALIZED_NAME_MODIFIED_BY_USER) + private String modifiedByUser; + + /** + * Represent the type of change states of the history. + */ + @JsonAdapter(ChangeTypeEnum.Adapter.class) + public enum ChangeTypeEnum { + BALANCECREATED("BalanceCreated"), + + BALANCEADDED("BalanceAdded"), + + BALANCEREMOVED("BalanceRemoved"), + + BALANCEUNCAPPED("BalanceUncapped"), + + BALANCECAPPED("BalanceCapped"), + + ENDDATE("EndDate"), + + STARTDATE("StartDate"), + + BALANCENAME("BalanceName"), + + PONUMBER("PoNumber"), + + VALUEADD("ValueAdd"), + + UNKNOWN("Unknown"); + + private String value; + + ChangeTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ChangeTypeEnum fromValue(String value) { + for (ChangeTypeEnum b : ChangeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ChangeTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ChangeTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ChangeTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_CHANGE_TYPE = "changeType"; + @SerializedName(SERIALIZED_NAME_CHANGE_TYPE) + private ChangeTypeEnum changeType; + + public static final String SERIALIZED_NAME_CHANGE_DETAILS = "changeDetails"; + @SerializedName(SERIALIZED_NAME_CHANGE_DETAILS) + private ChangeDetailsV1 changeDetails; + + public static final String SERIALIZED_NAME_MEMO = "memo"; + @SerializedName(SERIALIZED_NAME_MEMO) + private String memo; + + public BalanceHistoryChangeDataCaptureV1() { + } + + public BalanceHistoryChangeDataCaptureV1 dateOfModification(OffsetDateTime dateOfModification) { + + this.dateOfModification = dateOfModification; + return this; + } + + /** + * Date when data change has occured. + * @return dateOfModification + **/ + @javax.annotation.Nonnull + + public OffsetDateTime getDateOfModification() { + return dateOfModification; + } + + + public void setDateOfModification(OffsetDateTime dateOfModification) { + this.dateOfModification = dateOfModification; + } + + + public BalanceHistoryChangeDataCaptureV1 modifiedByUser(String modifiedByUser) { + + this.modifiedByUser = modifiedByUser; + return this; + } + + /** + * Username who modified the insertion order. + * @return modifiedByUser + **/ + @javax.annotation.Nonnull + + public String getModifiedByUser() { + return modifiedByUser; + } + + + public void setModifiedByUser(String modifiedByUser) { + this.modifiedByUser = modifiedByUser; + } + + + public BalanceHistoryChangeDataCaptureV1 changeType(ChangeTypeEnum changeType) { + + this.changeType = changeType; + return this; + } + + /** + * Represent the type of change states of the history. + * @return changeType + **/ + @javax.annotation.Nonnull + + public ChangeTypeEnum getChangeType() { + return changeType; + } + + + public void setChangeType(ChangeTypeEnum changeType) { + this.changeType = changeType; + } + + + public BalanceHistoryChangeDataCaptureV1 changeDetails(ChangeDetailsV1 changeDetails) { + + this.changeDetails = changeDetails; + return this; + } + + /** + * Get changeDetails + * @return changeDetails + **/ + @javax.annotation.Nonnull + + public ChangeDetailsV1 getChangeDetails() { + return changeDetails; + } + + + public void setChangeDetails(ChangeDetailsV1 changeDetails) { + this.changeDetails = changeDetails; + } + + + public BalanceHistoryChangeDataCaptureV1 memo(String memo) { + + this.memo = memo; + return this; + } + + /** + * Memo associate with the insertion order modification. + * @return memo + **/ + @javax.annotation.Nullable + + public String getMemo() { + return memo; + } + + + public void setMemo(String memo) { + this.memo = memo; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceHistoryChangeDataCaptureV1 balanceHistoryChangeDataCaptureV1 = (BalanceHistoryChangeDataCaptureV1) o; + return Objects.equals(this.dateOfModification, balanceHistoryChangeDataCaptureV1.dateOfModification) && + Objects.equals(this.modifiedByUser, balanceHistoryChangeDataCaptureV1.modifiedByUser) && + Objects.equals(this.changeType, balanceHistoryChangeDataCaptureV1.changeType) && + Objects.equals(this.changeDetails, balanceHistoryChangeDataCaptureV1.changeDetails) && + Objects.equals(this.memo, balanceHistoryChangeDataCaptureV1.memo); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(dateOfModification, modifiedByUser, changeType, changeDetails, memo); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceHistoryChangeDataCaptureV1 {\n"); + sb.append(" dateOfModification: ").append(toIndentedString(dateOfModification)).append("\n"); + sb.append(" modifiedByUser: ").append(toIndentedString(modifiedByUser)).append("\n"); + sb.append(" changeType: ").append(toIndentedString(changeType)).append("\n"); + sb.append(" changeDetails: ").append(toIndentedString(changeDetails)).append("\n"); + sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("dateOfModification"); + openapiFields.add("modifiedByUser"); + openapiFields.add("changeType"); + openapiFields.add("changeDetails"); + openapiFields.add("memo"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("dateOfModification"); + openapiRequiredFields.add("modifiedByUser"); + openapiRequiredFields.add("changeType"); + openapiRequiredFields.add("changeDetails"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to BalanceHistoryChangeDataCaptureV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!BalanceHistoryChangeDataCaptureV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BalanceHistoryChangeDataCaptureV1 is not found in the empty JSON string", BalanceHistoryChangeDataCaptureV1.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!BalanceHistoryChangeDataCaptureV1.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BalanceHistoryChangeDataCaptureV1` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : BalanceHistoryChangeDataCaptureV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("modifiedByUser").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `modifiedByUser` to be a primitive type in the JSON string but got `%s`", jsonObj.get("modifiedByUser").toString())); + } + if (!jsonObj.get("changeType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `changeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("changeType").toString())); + } + // validate the required field `changeDetails` + ChangeDetailsV1.validateJsonObject(jsonObj.getAsJsonObject("changeDetails")); + if ((jsonObj.get("memo") != null && !jsonObj.get("memo").isJsonNull()) && !jsonObj.get("memo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BalanceHistoryChangeDataCaptureV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BalanceHistoryChangeDataCaptureV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BalanceHistoryChangeDataCaptureV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BalanceHistoryChangeDataCaptureV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BalanceHistoryChangeDataCaptureV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BalanceHistoryChangeDataCaptureV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalanceHistoryChangeDataCaptureV1 + * @throws IOException if the JSON string is invalid with respect to BalanceHistoryChangeDataCaptureV1 + */ + public static BalanceHistoryChangeDataCaptureV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BalanceHistoryChangeDataCaptureV1.class); + } + + /** + * Convert an instance of BalanceHistoryChangeDataCaptureV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceResponse.java new file mode 100644 index 00000000..e1e2543d --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceResponse.java @@ -0,0 +1,363 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfBalanceResponse; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Data model for response resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BalanceResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ResourceOfBalanceResponse data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public BalanceResponse() { + } + + + public BalanceResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public BalanceResponse data(ResourceOfBalanceResponse data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ResourceOfBalanceResponse getData() { + return data; + } + + + public void setData(ResourceOfBalanceResponse data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the BalanceResponse instance itself + */ + public BalanceResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceResponse balanceResponse = (BalanceResponse) o; + return Objects.equals(this.data, balanceResponse.data) && + Objects.equals(this.warnings, balanceResponse.warnings) && + Objects.equals(this.errors, balanceResponse.errors)&& + Objects.equals(this.additionalProperties, balanceResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to BalanceResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!BalanceResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BalanceResponse is not found in the empty JSON string", BalanceResponse.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ResourceOfBalanceResponse.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BalanceResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BalanceResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BalanceResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BalanceResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public BalanceResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + BalanceResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BalanceResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalanceResponse + * @throws IOException if the JSON string is invalid with respect to BalanceResponse + */ + public static BalanceResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BalanceResponse.class); + } + + /** + * Convert an instance of BalanceResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Balance202110PagedListResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceResponsePagedListResponse.java similarity index 75% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Balance202110PagedListResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceResponsePagedListResponse.java index 49d9fa96..66d34db3 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Balance202110PagedListResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/BalanceResponsePagedListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.PageMetadata; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfBalance202110; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.PageMetadata; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfBalanceResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,43 +46,43 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a paged list of response resources */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Balance202110PagedListResponse { +public class BalanceResponsePagedListResponse { public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) private PageMetadata metadata; public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = null; + private List data = null; public static final String SERIALIZED_NAME_WARNINGS = "warnings"; @SerializedName(SERIALIZED_NAME_WARNINGS) - private List warnings = null; + private List warnings = null; public static final String SERIALIZED_NAME_ERRORS = "errors"; @SerializedName(SERIALIZED_NAME_ERRORS) - private List errors = null; + private List errors = null; - public Balance202110PagedListResponse() { + public BalanceResponsePagedListResponse() { } - public Balance202110PagedListResponse( - List warnings, - List errors + public BalanceResponsePagedListResponse( + List warnings, + List errors ) { this(); this.warnings = warnings; this.errors = errors; } - public Balance202110PagedListResponse metadata(PageMetadata metadata) { + public BalanceResponsePagedListResponse metadata(PageMetadata metadata) { this.metadata = metadata; return this; @@ -104,13 +104,13 @@ public void setMetadata(PageMetadata metadata) { } - public Balance202110PagedListResponse data(List data) { + public BalanceResponsePagedListResponse data(List data) { this.data = data; return this; } - public Balance202110PagedListResponse addDataItem(ResourceOfBalance202110 dataItem) { + public BalanceResponsePagedListResponse addDataItem(ResourceOfBalanceResponse dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -124,12 +124,12 @@ public Balance202110PagedListResponse addDataItem(ResourceOfBalance202110 dataIt **/ @javax.annotation.Nullable - public List getData() { + public List getData() { return data; } - public void setData(List data) { + public void setData(List data) { this.data = data; } @@ -140,7 +140,7 @@ public void setData(List data) { **/ @javax.annotation.Nullable - public List getWarnings() { + public List getWarnings() { return warnings; } @@ -153,7 +153,7 @@ public List getWarnings() { **/ @javax.annotation.Nullable - public List getErrors() { + public List getErrors() { return errors; } @@ -172,9 +172,9 @@ public List getErrors() { * * @param key name of the property * @param value value of the property - * @return the Balance202110PagedListResponse instance itself + * @return the BalanceResponsePagedListResponse instance itself */ - public Balance202110PagedListResponse putAdditionalProperty(String key, Object value) { + public BalanceResponsePagedListResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -213,12 +213,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Balance202110PagedListResponse balance202110PagedListResponse = (Balance202110PagedListResponse) o; - return Objects.equals(this.metadata, balance202110PagedListResponse.metadata) && - Objects.equals(this.data, balance202110PagedListResponse.data) && - Objects.equals(this.warnings, balance202110PagedListResponse.warnings) && - Objects.equals(this.errors, balance202110PagedListResponse.errors)&& - Objects.equals(this.additionalProperties, balance202110PagedListResponse.additionalProperties); + BalanceResponsePagedListResponse balanceResponsePagedListResponse = (BalanceResponsePagedListResponse) o; + return Objects.equals(this.metadata, balanceResponsePagedListResponse.metadata) && + Objects.equals(this.data, balanceResponsePagedListResponse.data) && + Objects.equals(this.warnings, balanceResponsePagedListResponse.warnings) && + Objects.equals(this.errors, balanceResponsePagedListResponse.errors)&& + Objects.equals(this.additionalProperties, balanceResponsePagedListResponse.additionalProperties); } @Override @@ -229,7 +229,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Balance202110PagedListResponse {\n"); + sb.append("class BalanceResponsePagedListResponse {\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); @@ -270,12 +270,12 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Balance202110PagedListResponse + * @throws IOException if the JSON Object is invalid with respect to BalanceResponsePagedListResponse */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!Balance202110PagedListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Balance202110PagedListResponse is not found in the empty JSON string", Balance202110PagedListResponse.openapiRequiredFields.toString())); + if (!BalanceResponsePagedListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BalanceResponsePagedListResponse is not found in the empty JSON string", BalanceResponsePagedListResponse.openapiRequiredFields.toString())); } } // validate the optional field `metadata` @@ -292,7 +292,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `data` (array) for (int i = 0; i < jsonArraydata.size(); i++) { - ResourceOfBalance202110.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + ResourceOfBalanceResponse.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); }; } } @@ -306,7 +306,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `warnings` (array) for (int i = 0; i < jsonArraywarnings.size(); i++) { - ProblemDetails.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); }; } } @@ -320,7 +320,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { // validate the optional field `errors` (array) for (int i = 0; i < jsonArrayerrors.size(); i++) { - ProblemDetails.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); }; } } @@ -330,16 +330,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!Balance202110PagedListResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Balance202110PagedListResponse' and its subtypes + if (!BalanceResponsePagedListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BalanceResponsePagedListResponse' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Balance202110PagedListResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BalanceResponsePagedListResponse.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, Balance202110PagedListResponse value) throws IOException { + public void write(JsonWriter out, BalanceResponsePagedListResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -362,11 +362,11 @@ else if (entry.getValue() instanceof Character) } @Override - public Balance202110PagedListResponse read(JsonReader in) throws IOException { + public BalanceResponsePagedListResponse read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - Balance202110PagedListResponse instance = thisAdapter.fromJsonTree(jsonObj); + BalanceResponsePagedListResponse instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -393,18 +393,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of Balance202110PagedListResponse given an JSON string + * Create an instance of BalanceResponsePagedListResponse given an JSON string * * @param jsonString JSON string - * @return An instance of Balance202110PagedListResponse - * @throws IOException if the JSON string is invalid with respect to Balance202110PagedListResponse + * @return An instance of BalanceResponsePagedListResponse + * @throws IOException if the JSON string is invalid with respect to BalanceResponsePagedListResponse */ - public static Balance202110PagedListResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Balance202110PagedListResponse.class); + public static BalanceResponsePagedListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BalanceResponsePagedListResponse.class); } /** - * Convert an instance of Balance202110PagedListResponse to an JSON string + * Convert an instance of BalanceResponsePagedListResponse to an JSON string * * @return JSON string */ diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CampaignAttributesV202301.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignAttributesV202301.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CampaignAttributesV202301.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignAttributesV202301.java index 791556aa..f1bd6409 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CampaignAttributesV202301.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignAttributesV202301.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * An object that represents the available options to set when creating a Retail Media Campaign diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignBudgetOverrides.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignBudgetOverrides.java new file mode 100644 index 00000000..b9dbed48 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignBudgetOverrides.java @@ -0,0 +1,274 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.CampaignDailyBudgetOverride; +import com.criteo.api.retailmedia.v2024_07.model.CampaignMonthlyBudgetOverride; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Campaign budget overrides including Monthly and Daily budget overrides. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CampaignBudgetOverrides { + public static final String SERIALIZED_NAME_MONTHLY_BUDGET_OVERRIDES = "monthlyBudgetOverrides"; + @SerializedName(SERIALIZED_NAME_MONTHLY_BUDGET_OVERRIDES) + private List monthlyBudgetOverrides = new ArrayList<>(); + + public static final String SERIALIZED_NAME_DAILY_BUDGET_OVERRIDES = "dailyBudgetOverrides"; + @SerializedName(SERIALIZED_NAME_DAILY_BUDGET_OVERRIDES) + private List dailyBudgetOverrides = new ArrayList<>(); + + public CampaignBudgetOverrides() { + } + + public CampaignBudgetOverrides monthlyBudgetOverrides(List monthlyBudgetOverrides) { + + this.monthlyBudgetOverrides = monthlyBudgetOverrides; + return this; + } + + public CampaignBudgetOverrides addMonthlyBudgetOverridesItem(CampaignMonthlyBudgetOverride monthlyBudgetOverridesItem) { + this.monthlyBudgetOverrides.add(monthlyBudgetOverridesItem); + return this; + } + + /** + * Campaign budget override monthly part, chronological order restricted. + * @return monthlyBudgetOverrides + **/ + @javax.annotation.Nonnull + + public List getMonthlyBudgetOverrides() { + return monthlyBudgetOverrides; + } + + + public void setMonthlyBudgetOverrides(List monthlyBudgetOverrides) { + this.monthlyBudgetOverrides = monthlyBudgetOverrides; + } + + + public CampaignBudgetOverrides dailyBudgetOverrides(List dailyBudgetOverrides) { + + this.dailyBudgetOverrides = dailyBudgetOverrides; + return this; + } + + public CampaignBudgetOverrides addDailyBudgetOverridesItem(CampaignDailyBudgetOverride dailyBudgetOverridesItem) { + this.dailyBudgetOverrides.add(dailyBudgetOverridesItem); + return this; + } + + /** + * Campaign budget override daily part, chronological order restricted. + * @return dailyBudgetOverrides + **/ + @javax.annotation.Nonnull + + public List getDailyBudgetOverrides() { + return dailyBudgetOverrides; + } + + + public void setDailyBudgetOverrides(List dailyBudgetOverrides) { + this.dailyBudgetOverrides = dailyBudgetOverrides; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CampaignBudgetOverrides campaignBudgetOverrides = (CampaignBudgetOverrides) o; + return Objects.equals(this.monthlyBudgetOverrides, campaignBudgetOverrides.monthlyBudgetOverrides) && + Objects.equals(this.dailyBudgetOverrides, campaignBudgetOverrides.dailyBudgetOverrides); + } + + @Override + public int hashCode() { + return Objects.hash(monthlyBudgetOverrides, dailyBudgetOverrides); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CampaignBudgetOverrides {\n"); + sb.append(" monthlyBudgetOverrides: ").append(toIndentedString(monthlyBudgetOverrides)).append("\n"); + sb.append(" dailyBudgetOverrides: ").append(toIndentedString(dailyBudgetOverrides)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("monthlyBudgetOverrides"); + openapiFields.add("dailyBudgetOverrides"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("monthlyBudgetOverrides"); + openapiRequiredFields.add("dailyBudgetOverrides"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CampaignBudgetOverrides + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CampaignBudgetOverrides.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignBudgetOverrides is not found in the empty JSON string", CampaignBudgetOverrides.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!CampaignBudgetOverrides.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CampaignBudgetOverrides` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CampaignBudgetOverrides.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the json data is an array + if (!jsonObj.get("monthlyBudgetOverrides").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `monthlyBudgetOverrides` to be an array in the JSON string but got `%s`", jsonObj.get("monthlyBudgetOverrides").toString())); + } + + JsonArray jsonArraymonthlyBudgetOverrides = jsonObj.getAsJsonArray("monthlyBudgetOverrides"); + // validate the required field `monthlyBudgetOverrides` (array) + for (int i = 0; i < jsonArraymonthlyBudgetOverrides.size(); i++) { + CampaignMonthlyBudgetOverride.validateJsonObject(jsonArraymonthlyBudgetOverrides.get(i).getAsJsonObject()); + }; + // ensure the json data is an array + if (!jsonObj.get("dailyBudgetOverrides").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `dailyBudgetOverrides` to be an array in the JSON string but got `%s`", jsonObj.get("dailyBudgetOverrides").toString())); + } + + JsonArray jsonArraydailyBudgetOverrides = jsonObj.getAsJsonArray("dailyBudgetOverrides"); + // validate the required field `dailyBudgetOverrides` (array) + for (int i = 0; i < jsonArraydailyBudgetOverrides.size(); i++) { + CampaignDailyBudgetOverride.validateJsonObject(jsonArraydailyBudgetOverrides.get(i).getAsJsonObject()); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CampaignBudgetOverrides.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CampaignBudgetOverrides' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CampaignBudgetOverrides.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CampaignBudgetOverrides value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CampaignBudgetOverrides read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CampaignBudgetOverrides given an JSON string + * + * @param jsonString JSON string + * @return An instance of CampaignBudgetOverrides + * @throws IOException if the JSON string is invalid with respect to CampaignBudgetOverrides + */ + public static CampaignBudgetOverrides fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CampaignBudgetOverrides.class); + } + + /** + * Convert an instance of CampaignBudgetOverrides to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignDailyBudgetOverride.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignDailyBudgetOverride.java new file mode 100644 index 00000000..0562ecd3 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignDailyBudgetOverride.java @@ -0,0 +1,366 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Campaign daily budget override. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CampaignDailyBudgetOverride { + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private OffsetDateTime startDate; + + public static final String SERIALIZED_NAME_DURATION = "duration"; + @SerializedName(SERIALIZED_NAME_DURATION) + private String duration; + + public static final String SERIALIZED_NAME_MAX_DAILY_SPEND = "maxDailySpend"; + @SerializedName(SERIALIZED_NAME_MAX_DAILY_SPEND) + private Double maxDailySpend; + + /** + * Daily budget override computed status. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + EXPIRED("Expired"), + + ACTIVE("Active"), + + UPCOMING("Upcoming"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + public CampaignDailyBudgetOverride() { + } + + public CampaignDailyBudgetOverride startDate(OffsetDateTime startDate) { + + this.startDate = startDate; + return this; + } + + /** + * Daily budget override start date, format \"yyyy-MM-dd\". If it is null, the StartDate would be the following date of the last item in the override sequence. + * @return startDate + **/ + @javax.annotation.Nullable + + public OffsetDateTime getStartDate() { + return startDate; + } + + + public void setStartDate(OffsetDateTime startDate) { + this.startDate = startDate; + } + + + public CampaignDailyBudgetOverride duration(String duration) { + + this.duration = duration; + return this; + } + + /** + * The number of DAYs that the override is active from StartDate, e.g. \"1D\". Must end with 'D' or 'd'. + * @return duration + **/ + @javax.annotation.Nonnull + + public String getDuration() { + return duration; + } + + + public void setDuration(String duration) { + this.duration = duration; + } + + + public CampaignDailyBudgetOverride maxDailySpend(Double maxDailySpend) { + + this.maxDailySpend = maxDailySpend; + return this; + } + + /** + * Daily budget override maximum daily spend amount. + * @return maxDailySpend + **/ + @javax.annotation.Nonnull + + public Double getMaxDailySpend() { + return maxDailySpend; + } + + + public void setMaxDailySpend(Double maxDailySpend) { + this.maxDailySpend = maxDailySpend; + } + + + public CampaignDailyBudgetOverride status(StatusEnum status) { + + this.status = status; + return this; + } + + /** + * Daily budget override computed status. + * @return status + **/ + @javax.annotation.Nullable + + public StatusEnum getStatus() { + return status; + } + + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CampaignDailyBudgetOverride campaignDailyBudgetOverride = (CampaignDailyBudgetOverride) o; + return Objects.equals(this.startDate, campaignDailyBudgetOverride.startDate) && + Objects.equals(this.duration, campaignDailyBudgetOverride.duration) && + Objects.equals(this.maxDailySpend, campaignDailyBudgetOverride.maxDailySpend) && + Objects.equals(this.status, campaignDailyBudgetOverride.status); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(startDate, duration, maxDailySpend, status); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CampaignDailyBudgetOverride {\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" maxDailySpend: ").append(toIndentedString(maxDailySpend)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startDate"); + openapiFields.add("duration"); + openapiFields.add("maxDailySpend"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("duration"); + openapiRequiredFields.add("maxDailySpend"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CampaignDailyBudgetOverride + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CampaignDailyBudgetOverride.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignDailyBudgetOverride is not found in the empty JSON string", CampaignDailyBudgetOverride.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!CampaignDailyBudgetOverride.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CampaignDailyBudgetOverride` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CampaignDailyBudgetOverride.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("duration").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CampaignDailyBudgetOverride.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CampaignDailyBudgetOverride' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CampaignDailyBudgetOverride.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CampaignDailyBudgetOverride value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CampaignDailyBudgetOverride read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CampaignDailyBudgetOverride given an JSON string + * + * @param jsonString JSON string + * @return An instance of CampaignDailyBudgetOverride + * @throws IOException if the JSON string is invalid with respect to CampaignDailyBudgetOverride + */ + public static CampaignDailyBudgetOverride fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CampaignDailyBudgetOverride.class); + } + + /** + * Convert an instance of CampaignDailyBudgetOverride to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignMonthlyBudgetOverride.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignMonthlyBudgetOverride.java new file mode 100644 index 00000000..4f67a04c --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignMonthlyBudgetOverride.java @@ -0,0 +1,366 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Campaign monthly budget override. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CampaignMonthlyBudgetOverride { + public static final String SERIALIZED_NAME_START_MONTH = "startMonth"; + @SerializedName(SERIALIZED_NAME_START_MONTH) + private OffsetDateTime startMonth; + + public static final String SERIALIZED_NAME_DURATION = "duration"; + @SerializedName(SERIALIZED_NAME_DURATION) + private String duration; + + public static final String SERIALIZED_NAME_MAX_MONTHLY_SPEND = "maxMonthlySpend"; + @SerializedName(SERIALIZED_NAME_MAX_MONTHLY_SPEND) + private Double maxMonthlySpend; + + /** + * Monthly budget override computed status. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + EXPIRED("Expired"), + + ACTIVE("Active"), + + UPCOMING("Upcoming"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + public CampaignMonthlyBudgetOverride() { + } + + public CampaignMonthlyBudgetOverride startMonth(OffsetDateTime startMonth) { + + this.startMonth = startMonth; + return this; + } + + /** + * Monthly budget override start month, format \"yyyy-MM\". If it is null, the StartMonth would be the following month of the last item in the override sequence. + * @return startMonth + **/ + @javax.annotation.Nullable + + public OffsetDateTime getStartMonth() { + return startMonth; + } + + + public void setStartMonth(OffsetDateTime startMonth) { + this.startMonth = startMonth; + } + + + public CampaignMonthlyBudgetOverride duration(String duration) { + + this.duration = duration; + return this; + } + + /** + * The number of MONTHs that the override is active from StartMonth, e.g. \"1M\". Must end with 'M' or 'm'. + * @return duration + **/ + @javax.annotation.Nonnull + + public String getDuration() { + return duration; + } + + + public void setDuration(String duration) { + this.duration = duration; + } + + + public CampaignMonthlyBudgetOverride maxMonthlySpend(Double maxMonthlySpend) { + + this.maxMonthlySpend = maxMonthlySpend; + return this; + } + + /** + * Monthly budget override maximum monthly spend amount. + * @return maxMonthlySpend + **/ + @javax.annotation.Nonnull + + public Double getMaxMonthlySpend() { + return maxMonthlySpend; + } + + + public void setMaxMonthlySpend(Double maxMonthlySpend) { + this.maxMonthlySpend = maxMonthlySpend; + } + + + public CampaignMonthlyBudgetOverride status(StatusEnum status) { + + this.status = status; + return this; + } + + /** + * Monthly budget override computed status. + * @return status + **/ + @javax.annotation.Nullable + + public StatusEnum getStatus() { + return status; + } + + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CampaignMonthlyBudgetOverride campaignMonthlyBudgetOverride = (CampaignMonthlyBudgetOverride) o; + return Objects.equals(this.startMonth, campaignMonthlyBudgetOverride.startMonth) && + Objects.equals(this.duration, campaignMonthlyBudgetOverride.duration) && + Objects.equals(this.maxMonthlySpend, campaignMonthlyBudgetOverride.maxMonthlySpend) && + Objects.equals(this.status, campaignMonthlyBudgetOverride.status); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(startMonth, duration, maxMonthlySpend, status); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CampaignMonthlyBudgetOverride {\n"); + sb.append(" startMonth: ").append(toIndentedString(startMonth)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" maxMonthlySpend: ").append(toIndentedString(maxMonthlySpend)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startMonth"); + openapiFields.add("duration"); + openapiFields.add("maxMonthlySpend"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("duration"); + openapiRequiredFields.add("maxMonthlySpend"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CampaignMonthlyBudgetOverride + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CampaignMonthlyBudgetOverride.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CampaignMonthlyBudgetOverride is not found in the empty JSON string", CampaignMonthlyBudgetOverride.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!CampaignMonthlyBudgetOverride.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CampaignMonthlyBudgetOverride` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CampaignMonthlyBudgetOverride.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("duration").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CampaignMonthlyBudgetOverride.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CampaignMonthlyBudgetOverride' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CampaignMonthlyBudgetOverride.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CampaignMonthlyBudgetOverride value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CampaignMonthlyBudgetOverride read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CampaignMonthlyBudgetOverride given an JSON string + * + * @param jsonString JSON string + * @return An instance of CampaignMonthlyBudgetOverride + * @throws IOException if the JSON string is invalid with respect to CampaignMonthlyBudgetOverride + */ + public static CampaignMonthlyBudgetOverride fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CampaignMonthlyBudgetOverride.class); + } + + /** + * Convert an instance of CampaignMonthlyBudgetOverride to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CampaignV202301.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignV202301.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CampaignV202301.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignV202301.java index 318893df..54eac34e 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CampaignV202301.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CampaignV202301.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A Retail Media Campaign used to represent an advertiser's marketing objective diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Category202204.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Category202204.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Category202204.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Category202204.java index cfdc8fa6..d5eebcdf 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Category202204.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Category202204.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -41,7 +41,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * List of retailer's categories, including the full hierarchy of categories and their parent category ID diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Category202204ListResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Category202204ListResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Category202204ListResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Category202204ListResponse.java index 05bfb368..a68c819b 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Category202204ListResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Category202204ListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfCategory202204; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfCategory202204; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a list of response resources diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChangeDatesOfBalanceRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChangeDatesOfBalanceRequest.java new file mode 100644 index 00000000..3ef71c51 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChangeDatesOfBalanceRequest.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfChangeDatesOfBalance; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Data model for an input resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ChangeDatesOfBalanceRequest { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ResourceOfChangeDatesOfBalance data; + + public ChangeDatesOfBalanceRequest() { + } + + public ChangeDatesOfBalanceRequest data(ResourceOfChangeDatesOfBalance data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ResourceOfChangeDatesOfBalance getData() { + return data; + } + + + public void setData(ResourceOfChangeDatesOfBalance data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChangeDatesOfBalanceRequest instance itself + */ + public ChangeDatesOfBalanceRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChangeDatesOfBalanceRequest changeDatesOfBalanceRequest = (ChangeDatesOfBalanceRequest) o; + return Objects.equals(this.data, changeDatesOfBalanceRequest.data)&& + Objects.equals(this.additionalProperties, changeDatesOfBalanceRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChangeDatesOfBalanceRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ChangeDatesOfBalanceRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ChangeDatesOfBalanceRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ChangeDatesOfBalanceRequest is not found in the empty JSON string", ChangeDatesOfBalanceRequest.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ResourceOfChangeDatesOfBalance.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChangeDatesOfBalanceRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChangeDatesOfBalanceRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ChangeDatesOfBalanceRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ChangeDatesOfBalanceRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChangeDatesOfBalanceRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ChangeDatesOfBalanceRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ChangeDatesOfBalanceRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChangeDatesOfBalanceRequest + * @throws IOException if the JSON string is invalid with respect to ChangeDatesOfBalanceRequest + */ + public static ChangeDatesOfBalanceRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChangeDatesOfBalanceRequest.class); + } + + /** + * Convert an instance of ChangeDatesOfBalanceRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChangeDetailsV1.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChangeDetailsV1.java new file mode 100644 index 00000000..3e3504ae --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChangeDetailsV1.java @@ -0,0 +1,279 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Change details of a property of the balance. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ChangeDetailsV1 { + public static final String SERIALIZED_NAME_PREVIOUS_VALUE = "previousValue"; + @SerializedName(SERIALIZED_NAME_PREVIOUS_VALUE) + private String previousValue; + + public static final String SERIALIZED_NAME_CURRENT_VALUE = "currentValue"; + @SerializedName(SERIALIZED_NAME_CURRENT_VALUE) + private String currentValue; + + public static final String SERIALIZED_NAME_CHANGE_VALUE = "changeValue"; + @SerializedName(SERIALIZED_NAME_CHANGE_VALUE) + private String changeValue; + + public ChangeDetailsV1() { + } + + public ChangeDetailsV1 previousValue(String previousValue) { + + this.previousValue = previousValue; + return this; + } + + /** + * Previous value of a property of the insertion order. + * @return previousValue + **/ + @javax.annotation.Nullable + + public String getPreviousValue() { + return previousValue; + } + + + public void setPreviousValue(String previousValue) { + this.previousValue = previousValue; + } + + + public ChangeDetailsV1 currentValue(String currentValue) { + + this.currentValue = currentValue; + return this; + } + + /** + * Current value of a property of the insertion order. + * @return currentValue + **/ + @javax.annotation.Nullable + + public String getCurrentValue() { + return currentValue; + } + + + public void setCurrentValue(String currentValue) { + this.currentValue = currentValue; + } + + + public ChangeDetailsV1 changeValue(String changeValue) { + + this.changeValue = changeValue; + return this; + } + + /** + * Change detail of a property of the insertion order. + * @return changeValue + **/ + @javax.annotation.Nullable + + public String getChangeValue() { + return changeValue; + } + + + public void setChangeValue(String changeValue) { + this.changeValue = changeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChangeDetailsV1 changeDetailsV1 = (ChangeDetailsV1) o; + return Objects.equals(this.previousValue, changeDetailsV1.previousValue) && + Objects.equals(this.currentValue, changeDetailsV1.currentValue) && + Objects.equals(this.changeValue, changeDetailsV1.changeValue); + } + + @Override + public int hashCode() { + return Objects.hash(previousValue, currentValue, changeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChangeDetailsV1 {\n"); + sb.append(" previousValue: ").append(toIndentedString(previousValue)).append("\n"); + sb.append(" currentValue: ").append(toIndentedString(currentValue)).append("\n"); + sb.append(" changeValue: ").append(toIndentedString(changeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("previousValue"); + openapiFields.add("currentValue"); + openapiFields.add("changeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("previousValue"); + openapiRequiredFields.add("currentValue"); + openapiRequiredFields.add("changeValue"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ChangeDetailsV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ChangeDetailsV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ChangeDetailsV1 is not found in the empty JSON string", ChangeDetailsV1.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!ChangeDetailsV1.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChangeDetailsV1` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ChangeDetailsV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("previousValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `previousValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previousValue").toString())); + } + if (!jsonObj.get("currentValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currentValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentValue").toString())); + } + if (!jsonObj.get("changeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `changeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("changeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChangeDetailsV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChangeDetailsV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ChangeDetailsV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ChangeDetailsV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ChangeDetailsV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ChangeDetailsV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChangeDetailsV1 + * @throws IOException if the JSON string is invalid with respect to ChangeDetailsV1 + */ + public static ChangeDetailsV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChangeDetailsV1.class); + } + + /** + * Convert an instance of ChangeDetailsV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ChoiceOption.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChoiceOption.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ChoiceOption.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChoiceOption.java index 59ff071a..8598b22d 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ChoiceOption.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChoiceOption.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.TemplateVariable; +import com.criteo.api.retailmedia.v2024_07.model.TemplateVariable; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * An option given in a choice diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ChoiceVariableSpecification.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChoiceVariableSpecification.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ChoiceVariableSpecification.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChoiceVariableSpecification.java index fa10ca95..e5b8c382 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ChoiceVariableSpecification.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChoiceVariableSpecification.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ChoiceOption; +import com.criteo.api.retailmedia.v2024_07.model.ChoiceOption; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Specification of choice variable diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ChoiceVariableValue.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChoiceVariableValue.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ChoiceVariableValue.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChoiceVariableValue.java index 52cd20bd..eae5b6f2 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ChoiceVariableValue.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ChoiceVariableValue.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A value of a template choice variable (among different accepted options) diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ColorVariableValue.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ColorVariableValue.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ColorVariableValue.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ColorVariableValue.java index e37ac2da..1ac9acc4 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ColorVariableValue.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ColorVariableValue.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -41,7 +41,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A value of a template color variable diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonError.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonError.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonError.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonError.java index a5ba8c59..3f649c0d 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonError.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonError.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A JSON:API Common error structure diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonLineItemPagedListResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonLineItemPagedListResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonLineItemPagedListResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonLineItemPagedListResponse.java index 9c1d2c18..e17bdfa3 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonLineItemPagedListResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonLineItemPagedListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.PageMetadata; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfCommonLineItem; +import com.criteo.api.retailmedia.v2024_07.model.PageMetadata; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfCommonLineItem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a paged list of response resources diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonLineItemResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonLineItemResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonLineItemResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonLineItemResponse.java index d9c99641..e93ec208 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonLineItemResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonLineItemResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfCommonLineItem; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfCommonLineItem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for response resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonProblem.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonProblem.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonProblem.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonProblem.java index d09fc689..bd0dae63 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonProblem.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonProblem.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,10 +44,10 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** - * Common problem object. Can be specialized as needed. + * Common problem object. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CommonProblem { @@ -222,7 +222,7 @@ public CommonProblem code(String code) { } /** - * A machine-readable error code, expressed as a string value. + * A machine-readable error code, expressed as a string value. * @return code **/ @javax.annotation.Nullable diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonWarning.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonWarning.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonWarning.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonWarning.java index 989f22e1..46fe07d9 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CommonWarning.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CommonWarning.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A JSON:API Base common warning diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CreateBalanceRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CreateBalanceRequest.java new file mode 100644 index 00000000..d666f157 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CreateBalanceRequest.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfCreateBalance; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Data model for an input resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBalanceRequest { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ResourceOfCreateBalance data; + + public CreateBalanceRequest() { + } + + public CreateBalanceRequest data(ResourceOfCreateBalance data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ResourceOfCreateBalance getData() { + return data; + } + + + public void setData(ResourceOfCreateBalance data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateBalanceRequest instance itself + */ + public CreateBalanceRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBalanceRequest createBalanceRequest = (CreateBalanceRequest) o; + return Objects.equals(this.data, createBalanceRequest.data)&& + Objects.equals(this.additionalProperties, createBalanceRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBalanceRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateBalanceRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateBalanceRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBalanceRequest is not found in the empty JSON string", CreateBalanceRequest.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ResourceOfCreateBalance.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateBalanceRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateBalanceRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateBalanceRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateBalanceRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateBalanceRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateBalanceRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateBalanceRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateBalanceRequest + * @throws IOException if the JSON string is invalid with respect to CreateBalanceRequest + */ + public static CreateBalanceRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateBalanceRequest.class); + } + + /** + * Convert an instance of CreateBalanceRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202110.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202110.java index 24c92ccc..57a462a4 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Metadata and usage info of a preferred deals creative diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202110ListResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202110ListResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202110ListResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202110ListResponse.java index 5ee14bf5..3531d78b 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202110ListResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202110ListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfCreative202110; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfCreative202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a list of response resources diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202210.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202210.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202210.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202210.java index 378451e2..c9976b96 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202210.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202210.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.PageTypeEnvironment; -import com.criteo.api.retailmedia.v2023_04.model.TemplateVariableValue; +import com.criteo.api.retailmedia.v2024_07.model.PageTypeEnvironment; +import com.criteo.api.retailmedia.v2024_07.model.TemplateVariableValue; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -47,7 +47,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A creative entity diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202210ListResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202210ListResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202210ListResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202210ListResponse.java index 6b6cb717..450b93bf 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202210ListResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202210ListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfCreative202210; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfCreative202210; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a list of response resources diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202210Response.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202210Response.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202210Response.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202210Response.java index 8c9002e5..d5a9850f 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Creative202210Response.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Creative202210Response.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfCreative202210; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfCreative202210; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for response resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CreativeCreateModel202207.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CreativeCreateModel202207.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CreativeCreateModel202207.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CreativeCreateModel202207.java index cfd39036..1235036e 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CreativeCreateModel202207.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CreativeCreateModel202207.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.TemplateVariableValue; +import com.criteo.api.retailmedia.v2024_07.model.TemplateVariableValue; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Create model of a creative diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CreativeUpdateModel202207.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CreativeUpdateModel202207.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CreativeUpdateModel202207.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CreativeUpdateModel202207.java index ff0571d7..14d35af3 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/CreativeUpdateModel202207.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/CreativeUpdateModel202207.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.TemplateVariableValue; +import com.criteo.api.retailmedia.v2024_07.model.TemplateVariableValue; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Update model of a creative diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/DailyLineItemBudgetOverride.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/DailyLineItemBudgetOverride.java new file mode 100644 index 00000000..f1807263 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/DailyLineItemBudgetOverride.java @@ -0,0 +1,365 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * The details for a daily budget override + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DailyLineItemBudgetOverride { + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private OffsetDateTime startDate; + + public static final String SERIALIZED_NAME_DURATION = "duration"; + @SerializedName(SERIALIZED_NAME_DURATION) + private String duration; + + public static final String SERIALIZED_NAME_MAX_DAILY_SPEND = "maxDailySpend"; + @SerializedName(SERIALIZED_NAME_MAX_DAILY_SPEND) + private Double maxDailySpend; + + /** + * Daily budget override computed status. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + EXPIRED("Expired"), + + ACTIVE("Active"), + + UPCOMING("Upcoming"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + public DailyLineItemBudgetOverride() { + } + + public DailyLineItemBudgetOverride startDate(OffsetDateTime startDate) { + + this.startDate = startDate; + return this; + } + + /** + * Daily budget override start date, format \"yyyy-MM-dd\". If it is null, the StartDate would be the following date of the last item in the override sequence. + * @return startDate + **/ + @javax.annotation.Nullable + + public OffsetDateTime getStartDate() { + return startDate; + } + + + public void setStartDate(OffsetDateTime startDate) { + this.startDate = startDate; + } + + + public DailyLineItemBudgetOverride duration(String duration) { + + this.duration = duration; + return this; + } + + /** + * The number of DAYs that the override is active from StartDate, e.g. \"1D\". Must end with 'D' or 'd'. + * @return duration + **/ + @javax.annotation.Nonnull + + public String getDuration() { + return duration; + } + + + public void setDuration(String duration) { + this.duration = duration; + } + + + public DailyLineItemBudgetOverride maxDailySpend(Double maxDailySpend) { + + this.maxDailySpend = maxDailySpend; + return this; + } + + /** + * Daily budget override maximum daily spend amount. + * @return maxDailySpend + **/ + @javax.annotation.Nullable + + public Double getMaxDailySpend() { + return maxDailySpend; + } + + + public void setMaxDailySpend(Double maxDailySpend) { + this.maxDailySpend = maxDailySpend; + } + + + public DailyLineItemBudgetOverride status(StatusEnum status) { + + this.status = status; + return this; + } + + /** + * Daily budget override computed status. + * @return status + **/ + @javax.annotation.Nullable + + public StatusEnum getStatus() { + return status; + } + + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DailyLineItemBudgetOverride dailyLineItemBudgetOverride = (DailyLineItemBudgetOverride) o; + return Objects.equals(this.startDate, dailyLineItemBudgetOverride.startDate) && + Objects.equals(this.duration, dailyLineItemBudgetOverride.duration) && + Objects.equals(this.maxDailySpend, dailyLineItemBudgetOverride.maxDailySpend) && + Objects.equals(this.status, dailyLineItemBudgetOverride.status); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(startDate, duration, maxDailySpend, status); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DailyLineItemBudgetOverride {\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" maxDailySpend: ").append(toIndentedString(maxDailySpend)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startDate"); + openapiFields.add("duration"); + openapiFields.add("maxDailySpend"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("duration"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to DailyLineItemBudgetOverride + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!DailyLineItemBudgetOverride.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in DailyLineItemBudgetOverride is not found in the empty JSON string", DailyLineItemBudgetOverride.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!DailyLineItemBudgetOverride.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DailyLineItemBudgetOverride` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DailyLineItemBudgetOverride.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("duration").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DailyLineItemBudgetOverride.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DailyLineItemBudgetOverride' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DailyLineItemBudgetOverride.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, DailyLineItemBudgetOverride value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public DailyLineItemBudgetOverride read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of DailyLineItemBudgetOverride given an JSON string + * + * @param jsonString JSON string + * @return An instance of DailyLineItemBudgetOverride + * @throws IOException if the JSON string is invalid with respect to DailyLineItemBudgetOverride + */ + public static DailyLineItemBudgetOverride fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DailyLineItemBudgetOverride.class); + } + + /** + * Convert an instance of DailyLineItemBudgetOverride to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/EditableCampaignAttributesV202301.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/EditableCampaignAttributesV202301.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/EditableCampaignAttributesV202301.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/EditableCampaignAttributesV202301.java index 3014bbd6..08990a8b 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/EditableCampaignAttributesV202301.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/EditableCampaignAttributesV202301.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * An object that represents the available options to set when editing a Retail Media Campaign diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAccount.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAccount.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAccount.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAccount.java index 2178a22d..7739550c 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAccount.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAccount.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A Retail Media Account used to launch campaigns and line items diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAddFundsToBalance.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAddFundsToBalance.java new file mode 100644 index 00000000..6cf63048 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAddFundsToBalance.java @@ -0,0 +1,350 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * An object that represents the available options of adding funds to a balance. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExternalAddFundsToBalance { + public static final String SERIALIZED_NAME_DELTA_AMOUNT = "deltaAmount"; + @SerializedName(SERIALIZED_NAME_DELTA_AMOUNT) + private Double deltaAmount; + + public static final String SERIALIZED_NAME_PO_NUMBER = "poNumber"; + @SerializedName(SERIALIZED_NAME_PO_NUMBER) + private String poNumber; + + public static final String SERIALIZED_NAME_MEMO = "memo"; + @SerializedName(SERIALIZED_NAME_MEMO) + private String memo; + + public ExternalAddFundsToBalance() { + } + + public ExternalAddFundsToBalance deltaAmount(Double deltaAmount) { + + this.deltaAmount = deltaAmount; + return this; + } + + /** + * Amount of billable funds to be added / decreased allotted to the balance. + * @return deltaAmount + **/ + @javax.annotation.Nonnull + + public Double getDeltaAmount() { + return deltaAmount; + } + + + public void setDeltaAmount(Double deltaAmount) { + this.deltaAmount = deltaAmount; + } + + + public ExternalAddFundsToBalance poNumber(String poNumber) { + + this.poNumber = poNumber; + return this; + } + + /** + * Purchase Order number. + * @return poNumber + **/ + @javax.annotation.Nullable + + public String getPoNumber() { + return poNumber; + } + + + public void setPoNumber(String poNumber) { + this.poNumber = poNumber; + } + + + public ExternalAddFundsToBalance memo(String memo) { + + this.memo = memo; + return this; + } + + /** + * Memo + * @return memo + **/ + @javax.annotation.Nonnull + + public String getMemo() { + return memo; + } + + + public void setMemo(String memo) { + this.memo = memo; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExternalAddFundsToBalance instance itself + */ + public ExternalAddFundsToBalance putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExternalAddFundsToBalance externalAddFundsToBalance = (ExternalAddFundsToBalance) o; + return Objects.equals(this.deltaAmount, externalAddFundsToBalance.deltaAmount) && + Objects.equals(this.poNumber, externalAddFundsToBalance.poNumber) && + Objects.equals(this.memo, externalAddFundsToBalance.memo)&& + Objects.equals(this.additionalProperties, externalAddFundsToBalance.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(deltaAmount, poNumber, memo, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalAddFundsToBalance {\n"); + sb.append(" deltaAmount: ").append(toIndentedString(deltaAmount)).append("\n"); + sb.append(" poNumber: ").append(toIndentedString(poNumber)).append("\n"); + sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("deltaAmount"); + openapiFields.add("poNumber"); + openapiFields.add("memo"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("deltaAmount"); + openapiRequiredFields.add("memo"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ExternalAddFundsToBalance + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ExternalAddFundsToBalance.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExternalAddFundsToBalance is not found in the empty JSON string", ExternalAddFundsToBalance.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExternalAddFundsToBalance.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if ((jsonObj.get("poNumber") != null && !jsonObj.get("poNumber").isJsonNull()) && !jsonObj.get("poNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `poNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("poNumber").toString())); + } + if (!jsonObj.get("memo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExternalAddFundsToBalance.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExternalAddFundsToBalance' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExternalAddFundsToBalance.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExternalAddFundsToBalance value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExternalAddFundsToBalance read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ExternalAddFundsToBalance instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExternalAddFundsToBalance given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExternalAddFundsToBalance + * @throws IOException if the JSON string is invalid with respect to ExternalAddFundsToBalance + */ + public static ExternalAddFundsToBalance fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExternalAddFundsToBalance.class); + } + + /** + * Convert an instance of ExternalAddFundsToBalance to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAddToBasketIdsUpdateModel202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAddToBasketIdsUpdateModel202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAddToBasketIdsUpdateModel202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAddToBasketIdsUpdateModel202110.java index 1d3d664b..4b48bd42 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAddToBasketIdsUpdateModel202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAddToBasketIdsUpdateModel202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Update model for updating add to basket target ids diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAddToBasketTarget202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAddToBasketTarget202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAddToBasketTarget202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAddToBasketTarget202110.java index b8774924..bd911fc6 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAddToBasketTarget202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAddToBasketTarget202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Identifies add to basket targeting for a line item diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAuctionLineItem.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAuctionLineItem.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAuctionLineItem.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAuctionLineItem.java index e0b4b1bf..97d207bb 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAuctionLineItem.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAuctionLineItem.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A Retail Media Auction Line Item used to hold bid settings for one or many promoted products on a single retailer diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAuctionLineItemCreateModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAuctionLineItemCreateModel.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAuctionLineItemCreateModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAuctionLineItemCreateModel.java index 94c5ccef..1640be86 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAuctionLineItemCreateModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAuctionLineItemCreateModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Model to create a retail media auction line item diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAuctionLineItemUpdateModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAuctionLineItemUpdateModel.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAuctionLineItemUpdateModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAuctionLineItemUpdateModel.java index 9528e7aa..8ff44e0d 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAuctionLineItemUpdateModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAuctionLineItemUpdateModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Model to update a retail media auction line item diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAudienceIdsUpdateModel202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAudienceIdsUpdateModel202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAudienceIdsUpdateModel202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAudienceIdsUpdateModel202110.java index 4adcd891..4871a643 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAudienceIdsUpdateModel202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAudienceIdsUpdateModel202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Update model for updating audience target ids diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAudienceTarget202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAudienceTarget202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAudienceTarget202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAudienceTarget202110.java index 7f68a985..be5776ba 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalAudienceTarget202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalAudienceTarget202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Identifies audience targeting for a line item diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalBalanceResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalBalanceResponse.java new file mode 100644 index 00000000..cebf1682 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalBalanceResponse.java @@ -0,0 +1,932 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * A Retail Media Balance used to determine the funds available for any or all campaigns in an account + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExternalBalanceResponse { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_PO_NUMBER = "poNumber"; + @SerializedName(SERIALIZED_NAME_PO_NUMBER) + private String poNumber; + + public static final String SERIALIZED_NAME_MEMO = "memo"; + @SerializedName(SERIALIZED_NAME_MEMO) + private String memo; + + public static final String SERIALIZED_NAME_DEPOSITED = "deposited"; + @SerializedName(SERIALIZED_NAME_DEPOSITED) + private BigDecimal deposited; + + public static final String SERIALIZED_NAME_SPENT = "spent"; + @SerializedName(SERIALIZED_NAME_SPENT) + private BigDecimal spent; + + public static final String SERIALIZED_NAME_REMAINING = "remaining"; + @SerializedName(SERIALIZED_NAME_REMAINING) + private BigDecimal remaining; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private LocalDate startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private LocalDate endDate; + + /** + * Gets or Sets status + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + UNKNOWN("unknown"), + + SCHEDULED("scheduled"), + + ACTIVE("active"), + + ENDED("ended"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; + + /** + * Type of the balance + */ + @JsonAdapter(BalanceTypeEnum.Adapter.class) + public enum BalanceTypeEnum { + UNKNOWN("unknown"), + + CAPPED("capped"), + + UNCAPPED("uncapped"); + + private String value; + + BalanceTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BalanceTypeEnum fromValue(String value) { + for (BalanceTypeEnum b : BalanceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BalanceTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BalanceTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BalanceTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_BALANCE_TYPE = "balanceType"; + @SerializedName(SERIALIZED_NAME_BALANCE_TYPE) + private BalanceTypeEnum balanceType; + + public static final String SERIALIZED_NAME_SALES_FORCE_ID = "salesForceId"; + @SerializedName(SERIALIZED_NAME_SALES_FORCE_ID) + private String salesForceId; + + /** + * Spend Type of the balance. + */ + @JsonAdapter(SpendTypeEnum.Adapter.class) + public enum SpendTypeEnum { + ONSITE("Onsite"), + + OFFSITE("Offsite"), + + OFFSITEAWARENESS("OffsiteAwareness"); + + private String value; + + SpendTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SpendTypeEnum fromValue(String value) { + for (SpendTypeEnum b : SpendTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SpendTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SpendTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SpendTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_SPEND_TYPE = "spendType"; + @SerializedName(SERIALIZED_NAME_SPEND_TYPE) + private SpendTypeEnum spendType; + + /** + * Billing type for Private Market. + */ + @JsonAdapter(PrivateMarketBillingTypeEnum.Adapter.class) + public enum PrivateMarketBillingTypeEnum { + NOTAPPLICABLE("NotApplicable"), + + BILLBYRETAILER("BillByRetailer"), + + BILLBYCRITEO("BillByCriteo"), + + UNKNOWN("Unknown"); + + private String value; + + PrivateMarketBillingTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivateMarketBillingTypeEnum fromValue(String value) { + for (PrivateMarketBillingTypeEnum b : PrivateMarketBillingTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivateMarketBillingTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivateMarketBillingTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivateMarketBillingTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_PRIVATE_MARKET_BILLING_TYPE = "privateMarketBillingType"; + @SerializedName(SERIALIZED_NAME_PRIVATE_MARKET_BILLING_TYPE) + private PrivateMarketBillingTypeEnum privateMarketBillingType; + + public ExternalBalanceResponse() { + } + + public ExternalBalanceResponse name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the balance. + * @return name + **/ + @javax.annotation.Nonnull + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public ExternalBalanceResponse poNumber(String poNumber) { + + this.poNumber = poNumber; + return this; + } + + /** + * Purchase Order number. + * @return poNumber + **/ + @javax.annotation.Nonnull + + public String getPoNumber() { + return poNumber; + } + + + public void setPoNumber(String poNumber) { + this.poNumber = poNumber; + } + + + public ExternalBalanceResponse memo(String memo) { + + this.memo = memo; + return this; + } + + /** + * Memo + * @return memo + **/ + @javax.annotation.Nonnull + + public String getMemo() { + return memo; + } + + + public void setMemo(String memo) { + this.memo = memo; + } + + + public ExternalBalanceResponse deposited(BigDecimal deposited) { + + this.deposited = deposited; + return this; + } + + /** + * Amount of billable funds allotted to the balance. + * @return deposited + **/ + @javax.annotation.Nullable + + public BigDecimal getDeposited() { + return deposited; + } + + + public void setDeposited(BigDecimal deposited) { + this.deposited = deposited; + } + + + public ExternalBalanceResponse spent(BigDecimal spent) { + + this.spent = spent; + return this; + } + + /** + * Get spent + * @return spent + **/ + @javax.annotation.Nullable + + public BigDecimal getSpent() { + return spent; + } + + + public void setSpent(BigDecimal spent) { + this.spent = spent; + } + + + public ExternalBalanceResponse remaining(BigDecimal remaining) { + + this.remaining = remaining; + return this; + } + + /** + * Get remaining + * @return remaining + **/ + @javax.annotation.Nullable + + public BigDecimal getRemaining() { + return remaining; + } + + + public void setRemaining(BigDecimal remaining) { + this.remaining = remaining; + } + + + public ExternalBalanceResponse startDate(LocalDate startDate) { + + this.startDate = startDate; + return this; + } + + /** + * Represents the Date as a year, month, and day in the format YYYY-MM-DD + * @return startDate + **/ + @javax.annotation.Nonnull + + public LocalDate getStartDate() { + return startDate; + } + + + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + + public ExternalBalanceResponse endDate(LocalDate endDate) { + + this.endDate = endDate; + return this; + } + + /** + * Represents the Date as a year, month, and day in the format YYYY-MM-DD + * @return endDate + **/ + @javax.annotation.Nonnull + + public LocalDate getEndDate() { + return endDate; + } + + + public void setEndDate(LocalDate endDate) { + this.endDate = endDate; + } + + + public ExternalBalanceResponse status(StatusEnum status) { + + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nonnull + + public StatusEnum getStatus() { + return status; + } + + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public ExternalBalanceResponse createdAt(OffsetDateTime createdAt) { + + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @javax.annotation.Nonnull + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ExternalBalanceResponse updatedAt(OffsetDateTime updatedAt) { + + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @javax.annotation.Nonnull + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public ExternalBalanceResponse balanceType(BalanceTypeEnum balanceType) { + + this.balanceType = balanceType; + return this; + } + + /** + * Type of the balance + * @return balanceType + **/ + @javax.annotation.Nonnull + + public BalanceTypeEnum getBalanceType() { + return balanceType; + } + + + public void setBalanceType(BalanceTypeEnum balanceType) { + this.balanceType = balanceType; + } + + + public ExternalBalanceResponse salesForceId(String salesForceId) { + + this.salesForceId = salesForceId; + return this; + } + + /** + * SalesForceId the balance is linked to. + * @return salesForceId + **/ + @javax.annotation.Nonnull + + public String getSalesForceId() { + return salesForceId; + } + + + public void setSalesForceId(String salesForceId) { + this.salesForceId = salesForceId; + } + + + public ExternalBalanceResponse spendType(SpendTypeEnum spendType) { + + this.spendType = spendType; + return this; + } + + /** + * Spend Type of the balance. + * @return spendType + **/ + @javax.annotation.Nonnull + + public SpendTypeEnum getSpendType() { + return spendType; + } + + + public void setSpendType(SpendTypeEnum spendType) { + this.spendType = spendType; + } + + + public ExternalBalanceResponse privateMarketBillingType(PrivateMarketBillingTypeEnum privateMarketBillingType) { + + this.privateMarketBillingType = privateMarketBillingType; + return this; + } + + /** + * Billing type for Private Market. + * @return privateMarketBillingType + **/ + @javax.annotation.Nonnull + + public PrivateMarketBillingTypeEnum getPrivateMarketBillingType() { + return privateMarketBillingType; + } + + + public void setPrivateMarketBillingType(PrivateMarketBillingTypeEnum privateMarketBillingType) { + this.privateMarketBillingType = privateMarketBillingType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExternalBalanceResponse instance itself + */ + public ExternalBalanceResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExternalBalanceResponse externalBalanceResponse = (ExternalBalanceResponse) o; + return Objects.equals(this.name, externalBalanceResponse.name) && + Objects.equals(this.poNumber, externalBalanceResponse.poNumber) && + Objects.equals(this.memo, externalBalanceResponse.memo) && + Objects.equals(this.deposited, externalBalanceResponse.deposited) && + Objects.equals(this.spent, externalBalanceResponse.spent) && + Objects.equals(this.remaining, externalBalanceResponse.remaining) && + Objects.equals(this.startDate, externalBalanceResponse.startDate) && + Objects.equals(this.endDate, externalBalanceResponse.endDate) && + Objects.equals(this.status, externalBalanceResponse.status) && + Objects.equals(this.createdAt, externalBalanceResponse.createdAt) && + Objects.equals(this.updatedAt, externalBalanceResponse.updatedAt) && + Objects.equals(this.balanceType, externalBalanceResponse.balanceType) && + Objects.equals(this.salesForceId, externalBalanceResponse.salesForceId) && + Objects.equals(this.spendType, externalBalanceResponse.spendType) && + Objects.equals(this.privateMarketBillingType, externalBalanceResponse.privateMarketBillingType)&& + Objects.equals(this.additionalProperties, externalBalanceResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, poNumber, memo, deposited, spent, remaining, startDate, endDate, status, createdAt, updatedAt, balanceType, salesForceId, spendType, privateMarketBillingType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalBalanceResponse {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" poNumber: ").append(toIndentedString(poNumber)).append("\n"); + sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); + sb.append(" deposited: ").append(toIndentedString(deposited)).append("\n"); + sb.append(" spent: ").append(toIndentedString(spent)).append("\n"); + sb.append(" remaining: ").append(toIndentedString(remaining)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" balanceType: ").append(toIndentedString(balanceType)).append("\n"); + sb.append(" salesForceId: ").append(toIndentedString(salesForceId)).append("\n"); + sb.append(" spendType: ").append(toIndentedString(spendType)).append("\n"); + sb.append(" privateMarketBillingType: ").append(toIndentedString(privateMarketBillingType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("poNumber"); + openapiFields.add("memo"); + openapiFields.add("deposited"); + openapiFields.add("spent"); + openapiFields.add("remaining"); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + openapiFields.add("status"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("balanceType"); + openapiFields.add("salesForceId"); + openapiFields.add("spendType"); + openapiFields.add("privateMarketBillingType"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("poNumber"); + openapiRequiredFields.add("memo"); + openapiRequiredFields.add("deposited"); + openapiRequiredFields.add("spent"); + openapiRequiredFields.add("remaining"); + openapiRequiredFields.add("startDate"); + openapiRequiredFields.add("endDate"); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("createdAt"); + openapiRequiredFields.add("updatedAt"); + openapiRequiredFields.add("balanceType"); + openapiRequiredFields.add("salesForceId"); + openapiRequiredFields.add("spendType"); + openapiRequiredFields.add("privateMarketBillingType"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ExternalBalanceResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ExternalBalanceResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExternalBalanceResponse is not found in the empty JSON string", ExternalBalanceResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExternalBalanceResponse.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("poNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `poNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("poNumber").toString())); + } + if (!jsonObj.get("memo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (!jsonObj.get("balanceType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `balanceType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("balanceType").toString())); + } + if (!jsonObj.get("salesForceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `salesForceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("salesForceId").toString())); + } + if (!jsonObj.get("spendType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `spendType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("spendType").toString())); + } + if (!jsonObj.get("privateMarketBillingType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `privateMarketBillingType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privateMarketBillingType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExternalBalanceResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExternalBalanceResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExternalBalanceResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExternalBalanceResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExternalBalanceResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ExternalBalanceResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExternalBalanceResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExternalBalanceResponse + * @throws IOException if the JSON string is invalid with respect to ExternalBalanceResponse + */ + public static ExternalBalanceResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExternalBalanceResponse.class); + } + + /** + * Convert an instance of ExternalBalanceResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalBrand.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalBrand.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalBrand.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalBrand.java index 29899f99..15f6258c 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalBrand.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalBrand.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -41,7 +41,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A Retail Media Brand used to represent a collection of products sold under the same umbrella name diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalCatalogRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCatalogRequest.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalCatalogRequest.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCatalogRequest.java index 1997150e..cd0c2e37 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalCatalogRequest.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCatalogRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A request for a catalog under the specified format. Currently \"json-newline\" is supported. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalCatalogStatus.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCatalogStatus.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalCatalogStatus.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCatalogStatus.java index 81f76e35..2d6ceb07 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalCatalogStatus.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCatalogStatus.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * The status of an asynchronous request to generate a catalog diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalChangeDatesOfBalance.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalChangeDatesOfBalance.java new file mode 100644 index 00000000..f57be99e --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalChangeDatesOfBalance.java @@ -0,0 +1,349 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * An object that represents the available options to modify schedule of a balance. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExternalChangeDatesOfBalance { + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private LocalDate startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private LocalDate endDate; + + public static final String SERIALIZED_NAME_MEMO = "memo"; + @SerializedName(SERIALIZED_NAME_MEMO) + private String memo; + + public ExternalChangeDatesOfBalance() { + } + + public ExternalChangeDatesOfBalance startDate(LocalDate startDate) { + + this.startDate = startDate; + return this; + } + + /** + * Represents the Date as a year, month, and day in the format YYYY-MM-DD + * @return startDate + **/ + @javax.annotation.Nonnull + + public LocalDate getStartDate() { + return startDate; + } + + + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + + public ExternalChangeDatesOfBalance endDate(LocalDate endDate) { + + this.endDate = endDate; + return this; + } + + /** + * Represents the Date as a year, month, and day in the format YYYY-MM-DD + * @return endDate + **/ + @javax.annotation.Nonnull + + public LocalDate getEndDate() { + return endDate; + } + + + public void setEndDate(LocalDate endDate) { + this.endDate = endDate; + } + + + public ExternalChangeDatesOfBalance memo(String memo) { + + this.memo = memo; + return this; + } + + /** + * Memo + * @return memo + **/ + @javax.annotation.Nonnull + + public String getMemo() { + return memo; + } + + + public void setMemo(String memo) { + this.memo = memo; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExternalChangeDatesOfBalance instance itself + */ + public ExternalChangeDatesOfBalance putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExternalChangeDatesOfBalance externalChangeDatesOfBalance = (ExternalChangeDatesOfBalance) o; + return Objects.equals(this.startDate, externalChangeDatesOfBalance.startDate) && + Objects.equals(this.endDate, externalChangeDatesOfBalance.endDate) && + Objects.equals(this.memo, externalChangeDatesOfBalance.memo)&& + Objects.equals(this.additionalProperties, externalChangeDatesOfBalance.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(startDate, endDate, memo, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalChangeDatesOfBalance {\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + openapiFields.add("memo"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("startDate"); + openapiRequiredFields.add("endDate"); + openapiRequiredFields.add("memo"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ExternalChangeDatesOfBalance + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ExternalChangeDatesOfBalance.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExternalChangeDatesOfBalance is not found in the empty JSON string", ExternalChangeDatesOfBalance.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExternalChangeDatesOfBalance.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("memo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExternalChangeDatesOfBalance.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExternalChangeDatesOfBalance' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExternalChangeDatesOfBalance.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExternalChangeDatesOfBalance value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExternalChangeDatesOfBalance read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ExternalChangeDatesOfBalance instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExternalChangeDatesOfBalance given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExternalChangeDatesOfBalance + * @throws IOException if the JSON string is invalid with respect to ExternalChangeDatesOfBalance + */ + public static ExternalChangeDatesOfBalance fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExternalChangeDatesOfBalance.class); + } + + /** + * Convert an instance of ExternalChangeDatesOfBalance to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalCommonLineItem.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCommonLineItem.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalCommonLineItem.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCommonLineItem.java index 577c1e19..b32abfd9 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalCommonLineItem.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCommonLineItem.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A common line item to hold line item information shared between preferred and auction line items diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalBalance202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCreateBalance.java similarity index 62% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalBalance202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCreateBalance.java index a3598ab1..e108ea21 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalBalance202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalCreateBalance.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -23,8 +23,6 @@ import java.io.IOException; import java.math.BigDecimal; import java.time.LocalDate; -import java.time.OffsetDateTime; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -45,13 +43,13 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** - * A Retail Media Balance used to determine the funds available for any or all campaigns in an account + * An object that represents the available options to set when creating a Retail Media Balance */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExternalBalance202110 { +public class ExternalCreateBalance { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -60,22 +58,10 @@ public class ExternalBalance202110 { @SerializedName(SERIALIZED_NAME_PO_NUMBER) private String poNumber; - public static final String SERIALIZED_NAME_MEMO = "memo"; - @SerializedName(SERIALIZED_NAME_MEMO) - private String memo; - public static final String SERIALIZED_NAME_DEPOSITED = "deposited"; @SerializedName(SERIALIZED_NAME_DEPOSITED) private BigDecimal deposited; - public static final String SERIALIZED_NAME_SPENT = "spent"; - @SerializedName(SERIALIZED_NAME_SPENT) - private BigDecimal spent; - - public static final String SERIALIZED_NAME_REMAINING = "remaining"; - @SerializedName(SERIALIZED_NAME_REMAINING) - private BigDecimal remaining; - public static final String SERIALIZED_NAME_START_DATE = "startDate"; @SerializedName(SERIALIZED_NAME_START_DATE) private LocalDate startDate; @@ -85,21 +71,19 @@ public class ExternalBalance202110 { private LocalDate endDate; /** - * Gets or Sets status + * Type of the balance spend. */ - @JsonAdapter(StatusEnum.Adapter.class) - public enum StatusEnum { - UNKNOWN("unknown"), - - SCHEDULED("scheduled"), + @JsonAdapter(SpendTypeEnum.Adapter.class) + public enum SpendTypeEnum { + ONSITE("Onsite"), - ACTIVE("active"), + OFFSITE("Offsite"), - ENDED("ended"); + OFFSITEAWARENESS("OffsiteAwareness"); private String value; - StatusEnum(String value) { + SpendTypeEnum(String value) { this.value = value; } @@ -112,8 +96,8 @@ public String toString() { return String.valueOf(value); } - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { + public static SpendTypeEnum fromValue(String value) { + for (SpendTypeEnum b : SpendTypeEnum.values()) { if (b.value.equals(value)) { return b; } @@ -121,43 +105,43 @@ public static StatusEnum fromValue(String value) { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static class Adapter extends TypeAdapter { + public static class Adapter extends TypeAdapter { @Override - public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + public void write(final JsonWriter jsonWriter, final SpendTypeEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override - public StatusEnum read(final JsonReader jsonReader) throws IOException { + public SpendTypeEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); - return StatusEnum.fromValue(value); + return SpendTypeEnum.fromValue(value); } } } - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; + public static final String SERIALIZED_NAME_SPEND_TYPE = "spendType"; + @SerializedName(SERIALIZED_NAME_SPEND_TYPE) + private SpendTypeEnum spendType; - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_MEMO = "memo"; + @SerializedName(SERIALIZED_NAME_MEMO) + private String memo; - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + public static final String SERIALIZED_NAME_SALES_FORCE_ID = "salesForceId"; + @SerializedName(SERIALIZED_NAME_SALES_FORCE_ID) + private String salesForceId; - public ExternalBalance202110() { + public ExternalCreateBalance() { } - public ExternalBalance202110 name(String name) { + public ExternalCreateBalance name(String name) { this.name = name; return this; } /** - * Get name + * Name of the balance. * @return name **/ @javax.annotation.Nonnull @@ -172,17 +156,17 @@ public void setName(String name) { } - public ExternalBalance202110 poNumber(String poNumber) { + public ExternalCreateBalance poNumber(String poNumber) { this.poNumber = poNumber; return this; } /** - * Get poNumber + * Purchase Order number. * @return poNumber **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getPoNumber() { return poNumber; @@ -194,36 +178,14 @@ public void setPoNumber(String poNumber) { } - public ExternalBalance202110 memo(String memo) { - - this.memo = memo; - return this; - } - - /** - * Get memo - * @return memo - **/ - @javax.annotation.Nonnull - - public String getMemo() { - return memo; - } - - - public void setMemo(String memo) { - this.memo = memo; - } - - - public ExternalBalance202110 deposited(BigDecimal deposited) { + public ExternalCreateBalance deposited(BigDecimal deposited) { this.deposited = deposited; return this; } /** - * Get deposited + * Amount of billable funds allotted to the balance. * @return deposited **/ @javax.annotation.Nullable @@ -238,51 +200,7 @@ public void setDeposited(BigDecimal deposited) { } - public ExternalBalance202110 spent(BigDecimal spent) { - - this.spent = spent; - return this; - } - - /** - * Get spent - * @return spent - **/ - @javax.annotation.Nullable - - public BigDecimal getSpent() { - return spent; - } - - - public void setSpent(BigDecimal spent) { - this.spent = spent; - } - - - public ExternalBalance202110 remaining(BigDecimal remaining) { - - this.remaining = remaining; - return this; - } - - /** - * Get remaining - * @return remaining - **/ - @javax.annotation.Nullable - - public BigDecimal getRemaining() { - return remaining; - } - - - public void setRemaining(BigDecimal remaining) { - this.remaining = remaining; - } - - - public ExternalBalance202110 startDate(LocalDate startDate) { + public ExternalCreateBalance startDate(LocalDate startDate) { this.startDate = startDate; return this; @@ -304,7 +222,7 @@ public void setStartDate(LocalDate startDate) { } - public ExternalBalance202110 endDate(LocalDate endDate) { + public ExternalCreateBalance endDate(LocalDate endDate) { this.endDate = endDate; return this; @@ -314,7 +232,7 @@ public ExternalBalance202110 endDate(LocalDate endDate) { * Represents the Date as a year, month, and day in the format YYYY-MM-DD * @return endDate **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public LocalDate getEndDate() { return endDate; @@ -326,69 +244,69 @@ public void setEndDate(LocalDate endDate) { } - public ExternalBalance202110 status(StatusEnum status) { + public ExternalCreateBalance spendType(SpendTypeEnum spendType) { - this.status = status; + this.spendType = spendType; return this; } /** - * Get status - * @return status + * Type of the balance spend. + * @return spendType **/ @javax.annotation.Nonnull - public StatusEnum getStatus() { - return status; + public SpendTypeEnum getSpendType() { + return spendType; } - public void setStatus(StatusEnum status) { - this.status = status; + public void setSpendType(SpendTypeEnum spendType) { + this.spendType = spendType; } - public ExternalBalance202110 createdAt(OffsetDateTime createdAt) { + public ExternalCreateBalance memo(String memo) { - this.createdAt = createdAt; + this.memo = memo; return this; } /** - * Get createdAt - * @return createdAt + * Memo + * @return memo **/ @javax.annotation.Nonnull - public OffsetDateTime getCreatedAt() { - return createdAt; + public String getMemo() { + return memo; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; + public void setMemo(String memo) { + this.memo = memo; } - public ExternalBalance202110 updatedAt(OffsetDateTime updatedAt) { + public ExternalCreateBalance salesForceId(String salesForceId) { - this.updatedAt = updatedAt; + this.salesForceId = salesForceId; return this; } /** - * Get updatedAt - * @return updatedAt + * SalesForceId the balance is linked to. + * @return salesForceId **/ @javax.annotation.Nonnull - public OffsetDateTime getUpdatedAt() { - return updatedAt; + public String getSalesForceId() { + return salesForceId; } - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; + public void setSalesForceId(String salesForceId) { + this.salesForceId = salesForceId; } /** @@ -404,9 +322,9 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { * * @param key name of the property * @param value value of the property - * @return the ExternalBalance202110 instance itself + * @return the ExternalCreateBalance instance itself */ - public ExternalBalance202110 putAdditionalProperty(String key, Object value) { + public ExternalCreateBalance putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -445,52 +363,35 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExternalBalance202110 externalBalance202110 = (ExternalBalance202110) o; - return Objects.equals(this.name, externalBalance202110.name) && - Objects.equals(this.poNumber, externalBalance202110.poNumber) && - Objects.equals(this.memo, externalBalance202110.memo) && - Objects.equals(this.deposited, externalBalance202110.deposited) && - Objects.equals(this.spent, externalBalance202110.spent) && - Objects.equals(this.remaining, externalBalance202110.remaining) && - Objects.equals(this.startDate, externalBalance202110.startDate) && - Objects.equals(this.endDate, externalBalance202110.endDate) && - Objects.equals(this.status, externalBalance202110.status) && - Objects.equals(this.createdAt, externalBalance202110.createdAt) && - Objects.equals(this.updatedAt, externalBalance202110.updatedAt)&& - Objects.equals(this.additionalProperties, externalBalance202110.additionalProperties); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + ExternalCreateBalance externalCreateBalance = (ExternalCreateBalance) o; + return Objects.equals(this.name, externalCreateBalance.name) && + Objects.equals(this.poNumber, externalCreateBalance.poNumber) && + Objects.equals(this.deposited, externalCreateBalance.deposited) && + Objects.equals(this.startDate, externalCreateBalance.startDate) && + Objects.equals(this.endDate, externalCreateBalance.endDate) && + Objects.equals(this.spendType, externalCreateBalance.spendType) && + Objects.equals(this.memo, externalCreateBalance.memo) && + Objects.equals(this.salesForceId, externalCreateBalance.salesForceId)&& + Objects.equals(this.additionalProperties, externalCreateBalance.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name, poNumber, memo, deposited, spent, remaining, startDate, endDate, status, createdAt, updatedAt, additionalProperties); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + return Objects.hash(name, poNumber, deposited, startDate, endDate, spendType, memo, salesForceId, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ExternalBalance202110 {\n"); + sb.append("class ExternalCreateBalance {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" poNumber: ").append(toIndentedString(poNumber)).append("\n"); - sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); sb.append(" deposited: ").append(toIndentedString(deposited)).append("\n"); - sb.append(" spent: ").append(toIndentedString(spent)).append("\n"); - sb.append(" remaining: ").append(toIndentedString(remaining)).append("\n"); sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" spendType: ").append(toIndentedString(spendType)).append("\n"); + sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); + sb.append(" salesForceId: ").append(toIndentedString(salesForceId)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -516,45 +417,39 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("name"); openapiFields.add("poNumber"); - openapiFields.add("memo"); openapiFields.add("deposited"); - openapiFields.add("spent"); - openapiFields.add("remaining"); openapiFields.add("startDate"); openapiFields.add("endDate"); - openapiFields.add("status"); - openapiFields.add("createdAt"); - openapiFields.add("updatedAt"); + openapiFields.add("spendType"); + openapiFields.add("memo"); + openapiFields.add("salesForceId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("name"); - openapiRequiredFields.add("poNumber"); - openapiRequiredFields.add("memo"); openapiRequiredFields.add("deposited"); - openapiRequiredFields.add("spent"); - openapiRequiredFields.add("remaining"); openapiRequiredFields.add("startDate"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("createdAt"); - openapiRequiredFields.add("updatedAt"); + openapiRequiredFields.add("endDate"); + openapiRequiredFields.add("spendType"); + openapiRequiredFields.add("memo"); + openapiRequiredFields.add("salesForceId"); } /** * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ExternalBalance202110 + * @throws IOException if the JSON Object is invalid with respect to ExternalCreateBalance */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!ExternalBalance202110.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExternalBalance202110 is not found in the empty JSON string", ExternalBalance202110.openapiRequiredFields.toString())); + if (!ExternalCreateBalance.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExternalCreateBalance is not found in the empty JSON string", ExternalCreateBalance.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ExternalBalance202110.openapiRequiredFields) { + for (String requiredField : ExternalCreateBalance.openapiRequiredFields) { if (jsonObj.get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } @@ -562,14 +457,17 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if (!jsonObj.get("poNumber").isJsonPrimitive()) { + if ((jsonObj.get("poNumber") != null && !jsonObj.get("poNumber").isJsonNull()) && !jsonObj.get("poNumber").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `poNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("poNumber").toString())); } + if (!jsonObj.get("spendType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `spendType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("spendType").toString())); + } if (!jsonObj.get("memo").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); } - if (!jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + if (!jsonObj.get("salesForceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `salesForceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("salesForceId").toString())); } } @@ -577,16 +475,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExternalBalance202110.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExternalBalance202110' and its subtypes + if (!ExternalCreateBalance.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExternalCreateBalance' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExternalBalance202110.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExternalCreateBalance.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ExternalBalance202110 value) throws IOException { + public void write(JsonWriter out, ExternalCreateBalance value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -609,11 +507,11 @@ else if (entry.getValue() instanceof Character) } @Override - public ExternalBalance202110 read(JsonReader in) throws IOException { + public ExternalCreateBalance read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - ExternalBalance202110 instance = thisAdapter.fromJsonTree(jsonObj); + ExternalCreateBalance instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -640,18 +538,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ExternalBalance202110 given an JSON string + * Create an instance of ExternalCreateBalance given an JSON string * * @param jsonString JSON string - * @return An instance of ExternalBalance202110 - * @throws IOException if the JSON string is invalid with respect to ExternalBalance202110 + * @return An instance of ExternalCreateBalance + * @throws IOException if the JSON string is invalid with respect to ExternalCreateBalance */ - public static ExternalBalance202110 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExternalBalance202110.class); + public static ExternalCreateBalance fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExternalCreateBalance.class); } /** - * Convert an instance of ExternalBalance202110 to an JSON string + * Convert an instance of ExternalCreateBalance to an JSON string * * @return JSON string */ diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalKeywordTarget202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalKeywordTarget202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalKeywordTarget202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalKeywordTarget202110.java index d20830be..b0f5109b 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalKeywordTarget202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalKeywordTarget202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Identifies keyword targeting for a line item diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalLineItemCapping202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalLineItemCapping202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalLineItemCapping202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalLineItemCapping202110.java index 98598914..b9e31cd4 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalLineItemCapping202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalLineItemCapping202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -41,7 +41,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Frequency capping for a preferred line item diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalLineItemPage202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalLineItemPage202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalLineItemPage202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalLineItemPage202110.java index ff06f236..63be2cbf 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalLineItemPage202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalLineItemPage202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalLineItemPageCategory202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalLineItemPageCategory202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Page information for a preferred line item diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalLineItemPageCategory202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalLineItemPageCategory202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalLineItemPageCategory202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalLineItemPageCategory202110.java index a3aa7e80..05803e9f 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalLineItemPageCategory202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalLineItemPageCategory202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -41,7 +41,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Category information for a preferred line item page diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPreferredLineItem202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPreferredLineItem202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPreferredLineItem202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPreferredLineItem202110.java index d5f58e76..29913f93 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPreferredLineItem202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPreferredLineItem202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalLineItemCapping202110; -import com.criteo.api.retailmedia.v2023_04.model.ExternalLineItemPage202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalLineItemCapping202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalLineItemPage202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A Retail Media Preferred Line Item used to hold bid settings for one or many promoted products on a single retailer diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPreferredLineItemCreateModel202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPreferredLineItemCreateModel202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPreferredLineItemCreateModel202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPreferredLineItemCreateModel202110.java index 4e47b5af..43890d16 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPreferredLineItemCreateModel202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPreferredLineItemCreateModel202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalLineItemCapping202110; -import com.criteo.api.retailmedia.v2023_04.model.ExternalLineItemPage202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalLineItemCapping202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalLineItemPage202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Model used to create a preferred line item diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPreferredLineItemUpdateModel202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPreferredLineItemUpdateModel202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPreferredLineItemUpdateModel202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPreferredLineItemUpdateModel202110.java index 1d65c42f..9137140c 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPreferredLineItemUpdateModel202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPreferredLineItemUpdateModel202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalLineItemCapping202110; -import com.criteo.api.retailmedia.v2023_04.model.ExternalLineItemPage202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalLineItemCapping202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalLineItemPage202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Model used to update a preferred line item diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPromotedProduct202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPromotedProduct202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPromotedProduct202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPromotedProduct202110.java index 6ff920b2..db51672f 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalPromotedProduct202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalPromotedProduct202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * identifies a promoted product diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalRetailer.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalRetailer.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalRetailer.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalRetailer.java index b685543b..30b4e99c 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalRetailer.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalRetailer.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A Retail Media Retailer used to represent a selection of products from multiple brands diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalRetailerPages202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalRetailerPages202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalRetailerPages202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalRetailerPages202110.java index f2745ac6..e93f17a5 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalRetailerPages202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalRetailerPages202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Wraps a list of valid pages for a retailer diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalStoreIdsUpdateModel202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalStoreIdsUpdateModel202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalStoreIdsUpdateModel202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalStoreIdsUpdateModel202110.java index dce1308e..a95a7209 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalStoreIdsUpdateModel202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalStoreIdsUpdateModel202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Update model for updating store target ids diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalStoreTarget202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalStoreTarget202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalStoreTarget202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalStoreTarget202110.java index fdecc496..442a60ea 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ExternalStoreTarget202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalStoreTarget202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Identifies store targeting for a line item diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalUpdateBalanceModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalUpdateBalanceModel.java new file mode 100644 index 00000000..4dea8603 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ExternalUpdateBalanceModel.java @@ -0,0 +1,447 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * An object that represents the available options to set when updating a Retail Media Balance + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExternalUpdateBalanceModel { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_PO_NUMBER = "poNumber"; + @SerializedName(SERIALIZED_NAME_PO_NUMBER) + private String poNumber; + + public static final String SERIALIZED_NAME_SALES_FORCE_ID = "salesForceId"; + @SerializedName(SERIALIZED_NAME_SALES_FORCE_ID) + private String salesForceId; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private LocalDate startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private LocalDate endDate; + + public static final String SERIALIZED_NAME_MEMO = "memo"; + @SerializedName(SERIALIZED_NAME_MEMO) + private String memo; + + public ExternalUpdateBalanceModel() { + } + + public ExternalUpdateBalanceModel name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the balance. + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public ExternalUpdateBalanceModel poNumber(String poNumber) { + + this.poNumber = poNumber; + return this; + } + + /** + * Purchase Order number. + * @return poNumber + **/ + @javax.annotation.Nullable + + public String getPoNumber() { + return poNumber; + } + + + public void setPoNumber(String poNumber) { + this.poNumber = poNumber; + } + + + public ExternalUpdateBalanceModel salesForceId(String salesForceId) { + + this.salesForceId = salesForceId; + return this; + } + + /** + * SalesForceId the balance is linked to. + * @return salesForceId + **/ + @javax.annotation.Nullable + + public String getSalesForceId() { + return salesForceId; + } + + + public void setSalesForceId(String salesForceId) { + this.salesForceId = salesForceId; + } + + + public ExternalUpdateBalanceModel startDate(LocalDate startDate) { + + this.startDate = startDate; + return this; + } + + /** + * Represents the Date as a year, month, and day in the format YYYY-MM-DD + * @return startDate + **/ + @javax.annotation.Nullable + + public LocalDate getStartDate() { + return startDate; + } + + + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + + public ExternalUpdateBalanceModel endDate(LocalDate endDate) { + + this.endDate = endDate; + return this; + } + + /** + * Represents the Date as a year, month, and day in the format YYYY-MM-DD + * @return endDate + **/ + @javax.annotation.Nullable + + public LocalDate getEndDate() { + return endDate; + } + + + public void setEndDate(LocalDate endDate) { + this.endDate = endDate; + } + + + public ExternalUpdateBalanceModel memo(String memo) { + + this.memo = memo; + return this; + } + + /** + * Memo + * @return memo + **/ + @javax.annotation.Nullable + + public String getMemo() { + return memo; + } + + + public void setMemo(String memo) { + this.memo = memo; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExternalUpdateBalanceModel instance itself + */ + public ExternalUpdateBalanceModel putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExternalUpdateBalanceModel externalUpdateBalanceModel = (ExternalUpdateBalanceModel) o; + return Objects.equals(this.name, externalUpdateBalanceModel.name) && + Objects.equals(this.poNumber, externalUpdateBalanceModel.poNumber) && + Objects.equals(this.salesForceId, externalUpdateBalanceModel.salesForceId) && + Objects.equals(this.startDate, externalUpdateBalanceModel.startDate) && + Objects.equals(this.endDate, externalUpdateBalanceModel.endDate) && + Objects.equals(this.memo, externalUpdateBalanceModel.memo)&& + Objects.equals(this.additionalProperties, externalUpdateBalanceModel.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, poNumber, salesForceId, startDate, endDate, memo, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalUpdateBalanceModel {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" poNumber: ").append(toIndentedString(poNumber)).append("\n"); + sb.append(" salesForceId: ").append(toIndentedString(salesForceId)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("poNumber"); + openapiFields.add("salesForceId"); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + openapiFields.add("memo"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ExternalUpdateBalanceModel + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ExternalUpdateBalanceModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExternalUpdateBalanceModel is not found in the empty JSON string", ExternalUpdateBalanceModel.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("poNumber") != null && !jsonObj.get("poNumber").isJsonNull()) && !jsonObj.get("poNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `poNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("poNumber").toString())); + } + if ((jsonObj.get("salesForceId") != null && !jsonObj.get("salesForceId").isJsonNull()) && !jsonObj.get("salesForceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `salesForceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("salesForceId").toString())); + } + if ((jsonObj.get("memo") != null && !jsonObj.get("memo").isJsonNull()) && !jsonObj.get("memo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExternalUpdateBalanceModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExternalUpdateBalanceModel' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExternalUpdateBalanceModel.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExternalUpdateBalanceModel value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExternalUpdateBalanceModel read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ExternalUpdateBalanceModel instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExternalUpdateBalanceModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExternalUpdateBalanceModel + * @throws IOException if the JSON string is invalid with respect to ExternalUpdateBalanceModel + */ + public static ExternalUpdateBalanceModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExternalUpdateBalanceModel.class); + } + + /** + * Convert an instance of ExternalUpdateBalanceModel to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/FilesVariableValue.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/FilesVariableValue.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/FilesVariableValue.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/FilesVariableValue.java index ff59e465..d771c74c 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/FilesVariableValue.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/FilesVariableValue.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A value of a template file variable (one or several files), like images in a creative diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/FilesVariablesSpecification.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/FilesVariablesSpecification.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/FilesVariablesSpecification.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/FilesVariablesSpecification.java index 8d3dfafb..80619d21 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/FilesVariablesSpecification.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/FilesVariablesSpecification.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Specification of a file variable diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/HyperlinkVariableValue.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/HyperlinkVariableValue.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/HyperlinkVariableValue.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/HyperlinkVariableValue.java index c6f5d629..6e8ebba2 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/HyperlinkVariableValue.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/HyperlinkVariableValue.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -41,7 +41,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A value of a template hyperlink variable diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/InputKeywordsModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/InputKeywordsModel.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/InputKeywordsModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/InputKeywordsModel.java index 643b5ac0..579a8513 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/InputKeywordsModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/InputKeywordsModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * The keywords to be added or removed from a line item. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/InputResourceOfAuctionLineItemCreateModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/InputResourceOfAuctionLineItemCreateModel.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/InputResourceOfAuctionLineItemCreateModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/InputResourceOfAuctionLineItemCreateModel.java index 3cd13a9f..cff1e076 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/InputResourceOfAuctionLineItemCreateModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/InputResourceOfAuctionLineItemCreateModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalAuctionLineItemCreateModel; +import com.criteo.api.retailmedia.v2024_07.model.ExternalAuctionLineItemCreateModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/InputResourceOfPreferredLineItemCreateModel202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/InputResourceOfPreferredLineItemCreateModel202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/InputResourceOfPreferredLineItemCreateModel202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/InputResourceOfPreferredLineItemCreateModel202110.java index 3cb3721c..aee1fb76 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/InputResourceOfPreferredLineItemCreateModel202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/InputResourceOfPreferredLineItemCreateModel202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalPreferredLineItemCreateModel202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalPreferredLineItemCreateModel202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.java index 07337930..1f94c58d 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.EditableCampaignAttributesV202301; +import com.criteo.api.retailmedia.v2024_07.model.EditableCampaignAttributesV202301; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A JSON:API wrapper class to format a <typeparamref name=\"TAttributes\" /> with external Id, Type, and Attributes properties diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndAccountAndAccount.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndAccountAndAccount.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndAccountAndAccount.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndAccountAndAccount.java index 95a19457..3bb9357a 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndAccountAndAccount.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndAccountAndAccount.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalAccount; +import com.criteo.api.retailmedia.v2024_07.model.ExternalAccount; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A JSON:API wrapper class to format a <typeparamref name=\"TAttributes\" /> with external Id, Type, and Attributes properties diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndBrandAndBrand.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndBrandAndBrand.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndBrandAndBrand.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndBrandAndBrand.java index 767a7edc..78f8fed5 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndBrandAndBrand.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndBrandAndBrand.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalBrand; +import com.criteo.api.retailmedia.v2024_07.model.ExternalBrand; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A JSON:API wrapper class to format a <typeparamref name=\"TAttributes\" /> with external Id, Type, and Attributes properties diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.java index 6e5ea8df..786d149e 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CampaignV202301; +import com.criteo.api.retailmedia.v2024_07.model.CampaignV202301; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A JSON:API wrapper class to format a <typeparamref name=\"TAttributes\" /> with external Id, Type, and Attributes properties diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java index 2b18434b..e5400ff2 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalCatalogStatus; +import com.criteo.api.retailmedia.v2024_07.model.ExternalCatalogStatus; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A JSON:API wrapper class to format a <typeparamref name=\"TAttributes\" /> with external Id, Type, and Attributes properties diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.java index b2533fa3..2ef73505 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.LineItemBidMultipliers; +import com.criteo.api.retailmedia.v2024_07.model.LineItemBidMultipliers; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Response object for line item bid multiplier calls diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.java index d648f6ad..6a04d798 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalRetailer; +import com.criteo.api.retailmedia.v2024_07.model.ExternalRetailer; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A JSON:API wrapper class to format a <typeparamref name=\"TAttributes\" /> with external Id, Type, and Attributes properties diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.java index affd111d..f235788d 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CampaignAttributesV202301; +import com.criteo.api.retailmedia.v2024_07.model.CampaignAttributesV202301; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A JSON:API wrapper class to format a <typeparamref name=\"TAttributes\" /> with Type, and Attributes properties diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.java index 96831622..5c40e276 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalCatalogRequest; +import com.criteo.api.retailmedia.v2024_07.model.ExternalCatalogRequest; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A JSON:API wrapper class to format a <typeparamref name=\"TAttributes\" /> with Type, and Attributes properties diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfAccount.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfAccount.java similarity index 95% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfAccount.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfAccount.java index f23d8b46..bda5facc 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfAccount.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfAccount.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,14 +11,14 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CommonError; -import com.criteo.api.retailmedia.v2023_04.model.CommonWarning; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithIdOfInt64AndAccountAndAccount; -import com.criteo.api.retailmedia.v2023_04.model.PageMetadata; +import com.criteo.api.retailmedia.v2024_07.model.CommonError; +import com.criteo.api.retailmedia.v2024_07.model.CommonWarning; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithIdOfInt64AndAccountAndAccount; +import com.criteo.api.retailmedia.v2024_07.model.PageMetadata; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -47,7 +47,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A wrapper class to return a single page of <typeparamref name=\"T\" /> with metadata @@ -143,7 +143,7 @@ public JsonApiPageResponseOfAccount metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfBrand.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfBrand.java similarity index 95% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfBrand.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfBrand.java index c35d4e9a..406f3b44 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfBrand.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfBrand.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,14 +11,14 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CommonError; -import com.criteo.api.retailmedia.v2023_04.model.CommonWarning; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithIdOfInt64AndBrandAndBrand; -import com.criteo.api.retailmedia.v2023_04.model.PageMetadata; +import com.criteo.api.retailmedia.v2024_07.model.CommonError; +import com.criteo.api.retailmedia.v2024_07.model.CommonWarning; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithIdOfInt64AndBrandAndBrand; +import com.criteo.api.retailmedia.v2024_07.model.PageMetadata; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -47,7 +47,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A wrapper class to return a single page of <typeparamref name=\"T\" /> with metadata @@ -143,7 +143,7 @@ public JsonApiPageResponseOfBrand metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfCampaignV202301.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfCampaignV202301.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfCampaignV202301.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfCampaignV202301.java index e4751f65..c22166ac 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfCampaignV202301.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfCampaignV202301.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,14 +11,14 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CommonError; -import com.criteo.api.retailmedia.v2023_04.model.CommonWarning; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301; -import com.criteo.api.retailmedia.v2023_04.model.PageMetadata; +import com.criteo.api.retailmedia.v2024_07.model.CommonError; +import com.criteo.api.retailmedia.v2024_07.model.CommonWarning; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301; +import com.criteo.api.retailmedia.v2024_07.model.PageMetadata; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -47,7 +47,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A wrapper class to return a single page of <typeparamref name=\"T\" /> with metadata diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfRetailer.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfRetailer.java similarity index 95% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfRetailer.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfRetailer.java index 17908792..0f39a55f 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiPageResponseOfRetailer.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiPageResponseOfRetailer.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,14 +11,14 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CommonError; -import com.criteo.api.retailmedia.v2023_04.model.CommonWarning; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithIdOfInt64AndRetailerAndRetailer; -import com.criteo.api.retailmedia.v2023_04.model.PageMetadata; +import com.criteo.api.retailmedia.v2024_07.model.CommonError; +import com.criteo.api.retailmedia.v2024_07.model.CommonWarning; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithIdOfInt64AndRetailerAndRetailer; +import com.criteo.api.retailmedia.v2024_07.model.PageMetadata; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -47,7 +47,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A wrapper class to return a single page of <typeparamref name=\"T\" /> with metadata @@ -143,7 +143,7 @@ public JsonApiPageResponseOfRetailer metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiRequestOfCatalogRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiRequestOfCatalogRequest.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiRequestOfCatalogRequest.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiRequestOfCatalogRequest.java index dfba587b..2fd08c0e 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiRequestOfCatalogRequest.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiRequestOfCatalogRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithoutIdOfCatalogRequestAndCatalogRequest; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A JSON:API wrapper class to format a <typeparamref name=\"TAttributes\" /> with Type, and Attributes properties diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiSingleResponseOfCampaignV202301.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiSingleResponseOfCampaignV202301.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiSingleResponseOfCampaignV202301.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiSingleResponseOfCampaignV202301.java index 7d075e5c..f466aa26 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiSingleResponseOfCampaignV202301.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiSingleResponseOfCampaignV202301.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CommonError; -import com.criteo.api.retailmedia.v2023_04.model.CommonWarning; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301; +import com.criteo.api.retailmedia.v2024_07.model.CommonError; +import com.criteo.api.retailmedia.v2024_07.model.CommonWarning; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithIdOfInt64AndCampaignV202301AndCampaignV202301; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A JSON:API wrapper class to add one JSON:API <typeparamref name=\"T\" /> within a data property diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiSingleResponseOfCatalogStatus.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiSingleResponseOfCatalogStatus.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiSingleResponseOfCatalogStatus.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiSingleResponseOfCatalogStatus.java index 30d6850c..075b2734 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiSingleResponseOfCatalogStatus.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiSingleResponseOfCatalogStatus.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CommonError; -import com.criteo.api.retailmedia.v2023_04.model.CommonWarning; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus; +import com.criteo.api.retailmedia.v2024_07.model.CommonError; +import com.criteo.api.retailmedia.v2024_07.model.CommonWarning; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A JSON:API wrapper class to add one JSON:API <typeparamref name=\"T\" /> within a data property diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiSingleResponseOfLineItemBidMultipliers.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiSingleResponseOfLineItemBidMultipliers.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiSingleResponseOfLineItemBidMultipliers.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiSingleResponseOfLineItemBidMultipliers.java index 4cea9fc2..b66613b7 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/JsonApiSingleResponseOfLineItemBidMultipliers.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/JsonApiSingleResponseOfLineItemBidMultipliers.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CommonError; -import com.criteo.api.retailmedia.v2023_04.model.CommonWarning; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers; +import com.criteo.api.retailmedia.v2024_07.model.CommonError; +import com.criteo.api.retailmedia.v2024_07.model.CommonWarning; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersAndLineItemBidMultipliers; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for the response of a line item bid multiplier diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordDataModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordDataModel.java similarity index 96% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordDataModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordDataModel.java index 5a19cfa7..7c0fe0bc 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordDataModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordDataModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.InputKeywordsModel; -import com.criteo.api.retailmedia.v2023_04.model.MatchTypeModel; -import com.criteo.api.retailmedia.v2023_04.model.ReviewStateModel; +import com.criteo.api.retailmedia.v2024_07.model.InputKeywordsModel; +import com.criteo.api.retailmedia.v2024_07.model.MatchTypeModel; +import com.criteo.api.retailmedia.v2024_07.model.ReviewStateModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A single keyword and associated bid override diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordTarget202110Request.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordTarget202110Request.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordTarget202110Request.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordTarget202110Request.java index 39952d1b..cc8a973e 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordTarget202110Request.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordTarget202110Request.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfKeywordTarget202110; +import com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfKeywordTarget202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type input resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordTarget202110Response.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordTarget202110Response.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordTarget202110Response.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordTarget202110Response.java index c0cd8a2c..5d41c5ad 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordTarget202110Response.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordTarget202110Response.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfKeywordTarget202110; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfKeywordTarget202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type resource outcome diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordsModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordsModel.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordsModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordsModel.java index 0a146e3e..7d03dda0 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordsModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordsModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.KeywordDataModel; +import com.criteo.api.retailmedia.v2024_07.model.KeywordDataModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -47,7 +47,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * The keywords associated with a line item. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordsModelResource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordsModelResource.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordsModelResource.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordsModelResource.java index 2856993f..4708caec 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordsModelResource.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordsModelResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.KeywordsModel; +import com.criteo.api.retailmedia.v2024_07.model.KeywordsModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Resource object containing keywords associated with a line item. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordsModelResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordsModelResponse.java similarity index 96% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordsModelResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordsModelResponse.java index 562b52a3..0d3d28a0 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/KeywordsModelResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/KeywordsModelResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.KeywordsModelResource; -import com.criteo.api.retailmedia.v2023_04.model.RmcaCommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.KeywordsModelResource; +import com.criteo.api.retailmedia.v2024_07.model.RmcaCommonProblem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Response object containing keywords associated with a line item. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/LineItemBidMultipliers.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBidMultipliers.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/LineItemBidMultipliers.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBidMultipliers.java index 2acf3fc1..ac76fb7a 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/LineItemBidMultipliers.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBidMultipliers.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -41,7 +41,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model representing bid multipliers on a line item diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/LineItemBidMultipliersRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBidMultipliersRequest.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/LineItemBidMultipliersRequest.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBidMultipliersRequest.java index 4f987fba..a77d933c 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/LineItemBidMultipliersRequest.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBidMultipliersRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfLineItemBidMultipliers; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfLineItemBidMultipliers; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for an input resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/LineItemBidMultipliersResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBidMultipliersResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/LineItemBidMultipliersResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBidMultipliersResponse.java index f2ffbc31..69c474dc 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/LineItemBidMultipliersResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBidMultipliersResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfLineItemBidMultipliers; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfLineItemBidMultipliers; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for response resource diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBudgetOverrides.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBudgetOverrides.java new file mode 100644 index 00000000..c7d1dc22 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/LineItemBudgetOverrides.java @@ -0,0 +1,274 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.DailyLineItemBudgetOverride; +import com.criteo.api.retailmedia.v2024_07.model.MonthlyLineItemBudegetOverride; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Line item budget overrides including Monthly and Daily budget overrides. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class LineItemBudgetOverrides { + public static final String SERIALIZED_NAME_MONTHLY_LINE_ITEM_BUDGET_OVERRIDES = "monthlyLineItemBudgetOverrides"; + @SerializedName(SERIALIZED_NAME_MONTHLY_LINE_ITEM_BUDGET_OVERRIDES) + private List monthlyLineItemBudgetOverrides = new ArrayList<>(); + + public static final String SERIALIZED_NAME_DAILY_LINE_ITEM_BUDGET_OVERRIDES = "dailyLineItemBudgetOverrides"; + @SerializedName(SERIALIZED_NAME_DAILY_LINE_ITEM_BUDGET_OVERRIDES) + private List dailyLineItemBudgetOverrides = new ArrayList<>(); + + public LineItemBudgetOverrides() { + } + + public LineItemBudgetOverrides monthlyLineItemBudgetOverrides(List monthlyLineItemBudgetOverrides) { + + this.monthlyLineItemBudgetOverrides = monthlyLineItemBudgetOverrides; + return this; + } + + public LineItemBudgetOverrides addMonthlyLineItemBudgetOverridesItem(MonthlyLineItemBudegetOverride monthlyLineItemBudgetOverridesItem) { + this.monthlyLineItemBudgetOverrides.add(monthlyLineItemBudgetOverridesItem); + return this; + } + + /** + * Line item budget override monthly part, chronological order restricted. + * @return monthlyLineItemBudgetOverrides + **/ + @javax.annotation.Nonnull + + public List getMonthlyLineItemBudgetOverrides() { + return monthlyLineItemBudgetOverrides; + } + + + public void setMonthlyLineItemBudgetOverrides(List monthlyLineItemBudgetOverrides) { + this.monthlyLineItemBudgetOverrides = monthlyLineItemBudgetOverrides; + } + + + public LineItemBudgetOverrides dailyLineItemBudgetOverrides(List dailyLineItemBudgetOverrides) { + + this.dailyLineItemBudgetOverrides = dailyLineItemBudgetOverrides; + return this; + } + + public LineItemBudgetOverrides addDailyLineItemBudgetOverridesItem(DailyLineItemBudgetOverride dailyLineItemBudgetOverridesItem) { + this.dailyLineItemBudgetOverrides.add(dailyLineItemBudgetOverridesItem); + return this; + } + + /** + * Line item budget override daily part, chronological order restricted. + * @return dailyLineItemBudgetOverrides + **/ + @javax.annotation.Nonnull + + public List getDailyLineItemBudgetOverrides() { + return dailyLineItemBudgetOverrides; + } + + + public void setDailyLineItemBudgetOverrides(List dailyLineItemBudgetOverrides) { + this.dailyLineItemBudgetOverrides = dailyLineItemBudgetOverrides; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LineItemBudgetOverrides lineItemBudgetOverrides = (LineItemBudgetOverrides) o; + return Objects.equals(this.monthlyLineItemBudgetOverrides, lineItemBudgetOverrides.monthlyLineItemBudgetOverrides) && + Objects.equals(this.dailyLineItemBudgetOverrides, lineItemBudgetOverrides.dailyLineItemBudgetOverrides); + } + + @Override + public int hashCode() { + return Objects.hash(monthlyLineItemBudgetOverrides, dailyLineItemBudgetOverrides); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LineItemBudgetOverrides {\n"); + sb.append(" monthlyLineItemBudgetOverrides: ").append(toIndentedString(monthlyLineItemBudgetOverrides)).append("\n"); + sb.append(" dailyLineItemBudgetOverrides: ").append(toIndentedString(dailyLineItemBudgetOverrides)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("monthlyLineItemBudgetOverrides"); + openapiFields.add("dailyLineItemBudgetOverrides"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("monthlyLineItemBudgetOverrides"); + openapiRequiredFields.add("dailyLineItemBudgetOverrides"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to LineItemBudgetOverrides + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!LineItemBudgetOverrides.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in LineItemBudgetOverrides is not found in the empty JSON string", LineItemBudgetOverrides.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!LineItemBudgetOverrides.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `LineItemBudgetOverrides` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : LineItemBudgetOverrides.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // ensure the json data is an array + if (!jsonObj.get("monthlyLineItemBudgetOverrides").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `monthlyLineItemBudgetOverrides` to be an array in the JSON string but got `%s`", jsonObj.get("monthlyLineItemBudgetOverrides").toString())); + } + + JsonArray jsonArraymonthlyLineItemBudgetOverrides = jsonObj.getAsJsonArray("monthlyLineItemBudgetOverrides"); + // validate the required field `monthlyLineItemBudgetOverrides` (array) + for (int i = 0; i < jsonArraymonthlyLineItemBudgetOverrides.size(); i++) { + MonthlyLineItemBudegetOverride.validateJsonObject(jsonArraymonthlyLineItemBudgetOverrides.get(i).getAsJsonObject()); + }; + // ensure the json data is an array + if (!jsonObj.get("dailyLineItemBudgetOverrides").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `dailyLineItemBudgetOverrides` to be an array in the JSON string but got `%s`", jsonObj.get("dailyLineItemBudgetOverrides").toString())); + } + + JsonArray jsonArraydailyLineItemBudgetOverrides = jsonObj.getAsJsonArray("dailyLineItemBudgetOverrides"); + // validate the required field `dailyLineItemBudgetOverrides` (array) + for (int i = 0; i < jsonArraydailyLineItemBudgetOverrides.size(); i++) { + DailyLineItemBudgetOverride.validateJsonObject(jsonArraydailyLineItemBudgetOverrides.get(i).getAsJsonObject()); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LineItemBudgetOverrides.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LineItemBudgetOverrides' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LineItemBudgetOverrides.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LineItemBudgetOverrides value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public LineItemBudgetOverrides read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LineItemBudgetOverrides given an JSON string + * + * @param jsonString JSON string + * @return An instance of LineItemBudgetOverrides + * @throws IOException if the JSON string is invalid with respect to LineItemBudgetOverrides + */ + public static LineItemBudgetOverrides fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LineItemBudgetOverrides.class); + } + + /** + * Convert an instance of LineItemBudgetOverrides to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/MatchTypeModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/MatchTypeModel.java similarity index 94% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/MatchTypeModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/MatchTypeModel.java index 24ebbcea..4c01ade0 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/MatchTypeModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/MatchTypeModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Metadata.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Metadata.java new file mode 100644 index 00000000..6a117eee --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Metadata.java @@ -0,0 +1,281 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Metadata related to the current request. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Metadata { + public static final String SERIALIZED_NAME_COUNT = "count"; + @SerializedName(SERIALIZED_NAME_COUNT) + private Long count; + + public static final String SERIALIZED_NAME_OFFSET = "offset"; + @SerializedName(SERIALIZED_NAME_OFFSET) + private Integer offset; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + @SerializedName(SERIALIZED_NAME_LIMIT) + private Integer limit; + + public Metadata() { + } + + public Metadata count(Long count) { + + this.count = count; + return this; + } + + /** + * Get count + * @return count + **/ + @javax.annotation.Nullable + + public Long getCount() { + return count; + } + + + public void setCount(Long count) { + this.count = count; + } + + + public Metadata offset(Integer offset) { + + this.offset = offset; + return this; + } + + /** + * The (zero-based) starting offset in the collection. + * @return offset + **/ + @javax.annotation.Nonnull + + public Integer getOffset() { + return offset; + } + + + public void setOffset(Integer offset) { + this.offset = offset; + } + + + public Metadata limit(Integer limit) { + + this.limit = limit; + return this; + } + + /** + * The number of elements to be returned. + * @return limit + **/ + @javax.annotation.Nonnull + + public Integer getLimit() { + return limit; + } + + + public void setLimit(Integer limit) { + this.limit = limit; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Metadata metadata = (Metadata) o; + return Objects.equals(this.count, metadata.count) && + Objects.equals(this.offset, metadata.offset) && + Objects.equals(this.limit, metadata.limit); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(count, offset, limit); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Metadata {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("count"); + openapiFields.add("offset"); + openapiFields.add("limit"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("offset"); + openapiRequiredFields.add("limit"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to Metadata + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!Metadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Metadata is not found in the empty JSON string", Metadata.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!Metadata.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Metadata` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Metadata.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Metadata.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Metadata' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Metadata.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Metadata value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Metadata read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Metadata given an JSON string + * + * @param jsonString JSON string + * @return An instance of Metadata + * @throws IOException if the JSON string is invalid with respect to Metadata + */ + public static Metadata fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Metadata.class); + } + + /** + * Convert an instance of Metadata to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/MonthlyLineItemBudegetOverride.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/MonthlyLineItemBudegetOverride.java new file mode 100644 index 00000000..1e7851ce --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/MonthlyLineItemBudegetOverride.java @@ -0,0 +1,366 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * The details for a monthly budget override + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class MonthlyLineItemBudegetOverride { + public static final String SERIALIZED_NAME_START_MONTH = "startMonth"; + @SerializedName(SERIALIZED_NAME_START_MONTH) + private OffsetDateTime startMonth; + + public static final String SERIALIZED_NAME_DURATION = "duration"; + @SerializedName(SERIALIZED_NAME_DURATION) + private String duration; + + public static final String SERIALIZED_NAME_MAX_MONTHLY_SPEND = "maxMonthlySpend"; + @SerializedName(SERIALIZED_NAME_MAX_MONTHLY_SPEND) + private Double maxMonthlySpend; + + /** + * Monthly budget override computed status. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + EXPIRED("Expired"), + + ACTIVE("Active"), + + UPCOMING("Upcoming"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + public MonthlyLineItemBudegetOverride() { + } + + public MonthlyLineItemBudegetOverride startMonth(OffsetDateTime startMonth) { + + this.startMonth = startMonth; + return this; + } + + /** + * Monthly budget override start month, format \"yyyy-MM\". If it is null, the StartMonth would be the following month of the last item in the override sequence. + * @return startMonth + **/ + @javax.annotation.Nullable + + public OffsetDateTime getStartMonth() { + return startMonth; + } + + + public void setStartMonth(OffsetDateTime startMonth) { + this.startMonth = startMonth; + } + + + public MonthlyLineItemBudegetOverride duration(String duration) { + + this.duration = duration; + return this; + } + + /** + * The number of MONTHs that the override is active from StartMonth, e.g. \"1M\". Must end with 'M' or 'm'. + * @return duration + **/ + @javax.annotation.Nonnull + + public String getDuration() { + return duration; + } + + + public void setDuration(String duration) { + this.duration = duration; + } + + + public MonthlyLineItemBudegetOverride maxMonthlySpend(Double maxMonthlySpend) { + + this.maxMonthlySpend = maxMonthlySpend; + return this; + } + + /** + * Monthly budget override maximum monthly spend amount. + * @return maxMonthlySpend + **/ + @javax.annotation.Nonnull + + public Double getMaxMonthlySpend() { + return maxMonthlySpend; + } + + + public void setMaxMonthlySpend(Double maxMonthlySpend) { + this.maxMonthlySpend = maxMonthlySpend; + } + + + public MonthlyLineItemBudegetOverride status(StatusEnum status) { + + this.status = status; + return this; + } + + /** + * Monthly budget override computed status. + * @return status + **/ + @javax.annotation.Nullable + + public StatusEnum getStatus() { + return status; + } + + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MonthlyLineItemBudegetOverride monthlyLineItemBudegetOverride = (MonthlyLineItemBudegetOverride) o; + return Objects.equals(this.startMonth, monthlyLineItemBudegetOverride.startMonth) && + Objects.equals(this.duration, monthlyLineItemBudegetOverride.duration) && + Objects.equals(this.maxMonthlySpend, monthlyLineItemBudegetOverride.maxMonthlySpend) && + Objects.equals(this.status, monthlyLineItemBudegetOverride.status); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(startMonth, duration, maxMonthlySpend, status); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MonthlyLineItemBudegetOverride {\n"); + sb.append(" startMonth: ").append(toIndentedString(startMonth)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" maxMonthlySpend: ").append(toIndentedString(maxMonthlySpend)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startMonth"); + openapiFields.add("duration"); + openapiFields.add("maxMonthlySpend"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("duration"); + openapiRequiredFields.add("maxMonthlySpend"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to MonthlyLineItemBudegetOverride + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!MonthlyLineItemBudegetOverride.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in MonthlyLineItemBudegetOverride is not found in the empty JSON string", MonthlyLineItemBudegetOverride.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!MonthlyLineItemBudegetOverride.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MonthlyLineItemBudegetOverride` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : MonthlyLineItemBudegetOverride.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("duration").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MonthlyLineItemBudegetOverride.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MonthlyLineItemBudegetOverride' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MonthlyLineItemBudegetOverride.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MonthlyLineItemBudegetOverride value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public MonthlyLineItemBudegetOverride read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MonthlyLineItemBudegetOverride given an JSON string + * + * @param jsonString JSON string + * @return An instance of MonthlyLineItemBudegetOverride + * @throws IOException if the JSON string is invalid with respect to MonthlyLineItemBudegetOverride + */ + public static MonthlyLineItemBudegetOverride fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MonthlyLineItemBudegetOverride.class); + } + + /** + * Convert an instance of MonthlyLineItemBudegetOverride to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/NegotiationStateModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/NegotiationStateModel.java similarity index 94% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/NegotiationStateModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/NegotiationStateModel.java index 6f96fc93..2977baf0 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/NegotiationStateModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/NegotiationStateModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PageMetadata.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PageMetadata.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PageMetadata.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PageMetadata.java index da14a8f7..4ec7912d 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PageMetadata.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PageMetadata.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Metadata related to the current request diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PageOfBalanceHistoryChangeDataCaptureV1.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PageOfBalanceHistoryChangeDataCaptureV1.java new file mode 100644 index 00000000..a451c1c6 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PageOfBalanceHistoryChangeDataCaptureV1.java @@ -0,0 +1,261 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.BalanceHistoryChangeDataCaptureV1; +import com.criteo.api.retailmedia.v2024_07.model.Metadata; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * A wrapper class to return a single page of items with metadata. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PageOfBalanceHistoryChangeDataCaptureV1 { + public static final String SERIALIZED_NAME_META = "meta"; + @SerializedName(SERIALIZED_NAME_META) + private Metadata meta; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = new ArrayList<>(); + + public PageOfBalanceHistoryChangeDataCaptureV1() { + } + + public PageOfBalanceHistoryChangeDataCaptureV1 meta(Metadata meta) { + + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nonnull + + public Metadata getMeta() { + return meta; + } + + + public void setMeta(Metadata meta) { + this.meta = meta; + } + + + public PageOfBalanceHistoryChangeDataCaptureV1 data(List data) { + + this.data = data; + return this; + } + + public PageOfBalanceHistoryChangeDataCaptureV1 addDataItem(BalanceHistoryChangeDataCaptureV1 dataItem) { + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nonnull + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PageOfBalanceHistoryChangeDataCaptureV1 pageOfBalanceHistoryChangeDataCaptureV1 = (PageOfBalanceHistoryChangeDataCaptureV1) o; + return Objects.equals(this.meta, pageOfBalanceHistoryChangeDataCaptureV1.meta) && + Objects.equals(this.data, pageOfBalanceHistoryChangeDataCaptureV1.data); + } + + @Override + public int hashCode() { + return Objects.hash(meta, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PageOfBalanceHistoryChangeDataCaptureV1 {\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("meta"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("meta"); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to PageOfBalanceHistoryChangeDataCaptureV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!PageOfBalanceHistoryChangeDataCaptureV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PageOfBalanceHistoryChangeDataCaptureV1 is not found in the empty JSON string", PageOfBalanceHistoryChangeDataCaptureV1.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!PageOfBalanceHistoryChangeDataCaptureV1.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PageOfBalanceHistoryChangeDataCaptureV1` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PageOfBalanceHistoryChangeDataCaptureV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // validate the required field `meta` + Metadata.validateJsonObject(jsonObj.getAsJsonObject("meta")); + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + BalanceHistoryChangeDataCaptureV1.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PageOfBalanceHistoryChangeDataCaptureV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PageOfBalanceHistoryChangeDataCaptureV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PageOfBalanceHistoryChangeDataCaptureV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PageOfBalanceHistoryChangeDataCaptureV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PageOfBalanceHistoryChangeDataCaptureV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PageOfBalanceHistoryChangeDataCaptureV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of PageOfBalanceHistoryChangeDataCaptureV1 + * @throws IOException if the JSON string is invalid with respect to PageOfBalanceHistoryChangeDataCaptureV1 + */ + public static PageOfBalanceHistoryChangeDataCaptureV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PageOfBalanceHistoryChangeDataCaptureV1.class); + } + + /** + * Convert an instance of PageOfBalanceHistoryChangeDataCaptureV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PageTypeEnvironment.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PageTypeEnvironment.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PageTypeEnvironment.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PageTypeEnvironment.java index a1eaf070..78f1ca07 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PageTypeEnvironment.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PageTypeEnvironment.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * The PageType-Environment Tuples for creatives diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PostCampaignV202301.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PostCampaignV202301.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PostCampaignV202301.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PostCampaignV202301.java index cb5aeb39..8a3acb8d 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PostCampaignV202301.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PostCampaignV202301.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithoutIdOfCampaignAttributesV202301AndCampaignV202301; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * An object that represents the available options to set when creating a Retail Media Campaign diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItem202110PagedListResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItem202110PagedListResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItem202110PagedListResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItem202110PagedListResponse.java index 87e6e036..467f1db9 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItem202110PagedListResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItem202110PagedListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.PageMetadata; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfPreferredLineItem202110; +import com.criteo.api.retailmedia.v2024_07.model.PageMetadata; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfPreferredLineItem202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a paged list of response resources diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItem202110Response.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItem202110Response.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItem202110Response.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItem202110Response.java index 8b88f156..216294e3 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItem202110Response.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItem202110Response.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfPreferredLineItem202110; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfPreferredLineItem202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for response resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItemCreateModel202110Request.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItemCreateModel202110Request.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItemCreateModel202110Request.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItemCreateModel202110Request.java index 410dafb4..a887caee 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItemCreateModel202110Request.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItemCreateModel202110Request.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.InputResourceOfPreferredLineItemCreateModel202110; +import com.criteo.api.retailmedia.v2024_07.model.InputResourceOfPreferredLineItemCreateModel202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a create input resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItemUpdateModel202110Request.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItemUpdateModel202110Request.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItemUpdateModel202110Request.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItemUpdateModel202110Request.java index 3b07ce36..aa176341 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PreferredLineItemUpdateModel202110Request.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PreferredLineItemUpdateModel202110Request.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfPreferredLineItemUpdateModel202110; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfPreferredLineItemUpdateModel202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for an input resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProblemDetails.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProblemDetails.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProblemDetails.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProblemDetails.java index 8e20169c..2aace8b6 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProblemDetails.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProblemDetails.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for common error or warning diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PromotedProduct202110ListRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PromotedProduct202110ListRequest.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PromotedProduct202110ListRequest.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PromotedProduct202110ListRequest.java index b9dceb72..45958164 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PromotedProduct202110ListRequest.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PromotedProduct202110ListRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfPromotedProduct202110; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfPromotedProduct202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a list of input resources diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PromotedProduct202110PagedListResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PromotedProduct202110PagedListResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PromotedProduct202110PagedListResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PromotedProduct202110PagedListResponse.java index 7dd7bd9e..66e7807d 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PromotedProduct202110PagedListResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PromotedProduct202110PagedListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.PageMetadata; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfPromotedProduct202110; +import com.criteo.api.retailmedia.v2024_07.model.PageMetadata; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfPromotedProduct202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a paged list of response resources diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProposalStatusModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProposalStatusModel.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProposalStatusModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProposalStatusModel.java index f41c7d69..7d492bd6 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProposalStatusModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProposalStatusModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ApprovalStatusModel; -import com.criteo.api.retailmedia.v2023_04.model.NegotiationStateModel; +import com.criteo.api.retailmedia.v2024_07.model.ApprovalStatusModel; +import com.criteo.api.retailmedia.v2024_07.model.NegotiationStateModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * The state of a proposal in the context of a line item. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProposalStatusModelResource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProposalStatusModelResource.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProposalStatusModelResource.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProposalStatusModelResource.java index 8857c7a5..117c25f9 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProposalStatusModelResource.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProposalStatusModelResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProposalStatusModel; +import com.criteo.api.retailmedia.v2024_07.model.ProposalStatusModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Resource object containing the state of a proposal in the context of a line item. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProposalStatusModelResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProposalStatusModelResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProposalStatusModelResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProposalStatusModelResponse.java index 05c40fd3..6d7a0c83 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ProposalStatusModelResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ProposalStatusModelResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProposalStatusModelResource; -import com.criteo.api.retailmedia.v2023_04.model.RmcaCommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.ProposalStatusModelResource; +import com.criteo.api.retailmedia.v2024_07.model.RmcaCommonProblem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Response object containing the state of a proposal in the context of a line item. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PutCampaignV202301.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PutCampaignV202301.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PutCampaignV202301.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PutCampaignV202301.java index 3d75d954..265c78e8 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/PutCampaignV202301.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/PutCampaignV202301.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301; +import com.criteo.api.retailmedia.v2024_07.model.JsonApiBodyWithExternalIdOfEditableCampaignAttributesV202301AndCampaignV202301; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * An object that represents the available options to set when editing a Retail Media Campaign diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ReportOutcome.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ReportOutcome.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ReportOutcome.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ReportOutcome.java index 62da39fb..94b75ab9 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ReportOutcome.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ReportOutcome.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * The outcome of an API call. diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfAddFundsToBalance.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfAddFundsToBalance.java new file mode 100644 index 00000000..5d594edb --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfAddFundsToBalance.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.ExternalAddFundsToBalance; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResourceOfAddFundsToBalance { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private ExternalAddFundsToBalance attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public ResourceOfAddFundsToBalance() { + } + + public ResourceOfAddFundsToBalance attributes(ExternalAddFundsToBalance attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public ExternalAddFundsToBalance getAttributes() { + return attributes; + } + + + public void setAttributes(ExternalAddFundsToBalance attributes) { + this.attributes = attributes; + } + + + public ResourceOfAddFundsToBalance id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public ResourceOfAddFundsToBalance type(String type) { + + this.type = type; + return this; + } + + /** + * Canonical type name of the entity + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResourceOfAddFundsToBalance instance itself + */ + public ResourceOfAddFundsToBalance putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceOfAddFundsToBalance resourceOfAddFundsToBalance = (ResourceOfAddFundsToBalance) o; + return Objects.equals(this.attributes, resourceOfAddFundsToBalance.attributes) && + Objects.equals(this.id, resourceOfAddFundsToBalance.id) && + Objects.equals(this.type, resourceOfAddFundsToBalance.type)&& + Objects.equals(this.additionalProperties, resourceOfAddFundsToBalance.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceOfAddFundsToBalance {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ResourceOfAddFundsToBalance + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ResourceOfAddFundsToBalance.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceOfAddFundsToBalance is not found in the empty JSON string", ResourceOfAddFundsToBalance.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + ExternalAddFundsToBalance.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResourceOfAddFundsToBalance.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceOfAddFundsToBalance' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceOfAddFundsToBalance.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResourceOfAddFundsToBalance value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResourceOfAddFundsToBalance read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ResourceOfAddFundsToBalance instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResourceOfAddFundsToBalance given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResourceOfAddFundsToBalance + * @throws IOException if the JSON string is invalid with respect to ResourceOfAddFundsToBalance + */ + public static ResourceOfAddFundsToBalance fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceOfAddFundsToBalance.class); + } + + /** + * Convert an instance of ResourceOfAddFundsToBalance to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfAuctionLineItem.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfAuctionLineItem.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfAuctionLineItem.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfAuctionLineItem.java index e2d8bd0e..f258b6b8 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfAuctionLineItem.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfAuctionLineItem.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalAuctionLineItem; +import com.criteo.api.retailmedia.v2024_07.model.ExternalAuctionLineItem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfAuctionLineItemUpdateModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfAuctionLineItemUpdateModel.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfAuctionLineItemUpdateModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfAuctionLineItemUpdateModel.java index 517c60e8..29381b08 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfAuctionLineItemUpdateModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfAuctionLineItemUpdateModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalAuctionLineItemUpdateModel; +import com.criteo.api.retailmedia.v2024_07.model.ExternalAuctionLineItemUpdateModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfBalanceCampaign202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfBalanceCampaign202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfBalanceCampaign202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfBalanceCampaign202110.java index 041fceed..434dba52 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfBalanceCampaign202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfBalanceCampaign202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A class that represents an entity in a guild compliant way diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfBalanceResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfBalanceResponse.java new file mode 100644 index 00000000..de616331 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfBalanceResponse.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.ExternalBalanceResponse; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResourceOfBalanceResponse { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private ExternalBalanceResponse attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public ResourceOfBalanceResponse() { + } + + public ResourceOfBalanceResponse attributes(ExternalBalanceResponse attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public ExternalBalanceResponse getAttributes() { + return attributes; + } + + + public void setAttributes(ExternalBalanceResponse attributes) { + this.attributes = attributes; + } + + + public ResourceOfBalanceResponse id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public ResourceOfBalanceResponse type(String type) { + + this.type = type; + return this; + } + + /** + * Canonical type name of the entity + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResourceOfBalanceResponse instance itself + */ + public ResourceOfBalanceResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceOfBalanceResponse resourceOfBalanceResponse = (ResourceOfBalanceResponse) o; + return Objects.equals(this.attributes, resourceOfBalanceResponse.attributes) && + Objects.equals(this.id, resourceOfBalanceResponse.id) && + Objects.equals(this.type, resourceOfBalanceResponse.type)&& + Objects.equals(this.additionalProperties, resourceOfBalanceResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceOfBalanceResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ResourceOfBalanceResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ResourceOfBalanceResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceOfBalanceResponse is not found in the empty JSON string", ResourceOfBalanceResponse.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + ExternalBalanceResponse.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResourceOfBalanceResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceOfBalanceResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceOfBalanceResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResourceOfBalanceResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResourceOfBalanceResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ResourceOfBalanceResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResourceOfBalanceResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResourceOfBalanceResponse + * @throws IOException if the JSON string is invalid with respect to ResourceOfBalanceResponse + */ + public static ResourceOfBalanceResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceOfBalanceResponse.class); + } + + /** + * Convert an instance of ResourceOfBalanceResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCategory202204.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCategory202204.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCategory202204.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCategory202204.java index eb53825d..385185b7 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCategory202204.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCategory202204.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.Category202204; +import com.criteo.api.retailmedia.v2024_07.model.Category202204; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfChangeDatesOfBalance.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfChangeDatesOfBalance.java new file mode 100644 index 00000000..25355829 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfChangeDatesOfBalance.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.ExternalChangeDatesOfBalance; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResourceOfChangeDatesOfBalance { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private ExternalChangeDatesOfBalance attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public ResourceOfChangeDatesOfBalance() { + } + + public ResourceOfChangeDatesOfBalance attributes(ExternalChangeDatesOfBalance attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public ExternalChangeDatesOfBalance getAttributes() { + return attributes; + } + + + public void setAttributes(ExternalChangeDatesOfBalance attributes) { + this.attributes = attributes; + } + + + public ResourceOfChangeDatesOfBalance id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public ResourceOfChangeDatesOfBalance type(String type) { + + this.type = type; + return this; + } + + /** + * Canonical type name of the entity + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResourceOfChangeDatesOfBalance instance itself + */ + public ResourceOfChangeDatesOfBalance putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceOfChangeDatesOfBalance resourceOfChangeDatesOfBalance = (ResourceOfChangeDatesOfBalance) o; + return Objects.equals(this.attributes, resourceOfChangeDatesOfBalance.attributes) && + Objects.equals(this.id, resourceOfChangeDatesOfBalance.id) && + Objects.equals(this.type, resourceOfChangeDatesOfBalance.type)&& + Objects.equals(this.additionalProperties, resourceOfChangeDatesOfBalance.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceOfChangeDatesOfBalance {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ResourceOfChangeDatesOfBalance + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ResourceOfChangeDatesOfBalance.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceOfChangeDatesOfBalance is not found in the empty JSON string", ResourceOfChangeDatesOfBalance.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + ExternalChangeDatesOfBalance.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResourceOfChangeDatesOfBalance.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceOfChangeDatesOfBalance' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceOfChangeDatesOfBalance.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResourceOfChangeDatesOfBalance value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResourceOfChangeDatesOfBalance read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ResourceOfChangeDatesOfBalance instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResourceOfChangeDatesOfBalance given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResourceOfChangeDatesOfBalance + * @throws IOException if the JSON string is invalid with respect to ResourceOfChangeDatesOfBalance + */ + public static ResourceOfChangeDatesOfBalance fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceOfChangeDatesOfBalance.class); + } + + /** + * Convert an instance of ResourceOfChangeDatesOfBalance to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCommonLineItem.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCommonLineItem.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCommonLineItem.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCommonLineItem.java index 174d595b..ff244499 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCommonLineItem.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCommonLineItem.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalCommonLineItem; +import com.criteo.api.retailmedia.v2024_07.model.ExternalCommonLineItem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCreateBalance.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCreateBalance.java new file mode 100644 index 00000000..835c7fbe --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCreateBalance.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.ExternalCreateBalance; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResourceOfCreateBalance { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private ExternalCreateBalance attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public ResourceOfCreateBalance() { + } + + public ResourceOfCreateBalance attributes(ExternalCreateBalance attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public ExternalCreateBalance getAttributes() { + return attributes; + } + + + public void setAttributes(ExternalCreateBalance attributes) { + this.attributes = attributes; + } + + + public ResourceOfCreateBalance id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public ResourceOfCreateBalance type(String type) { + + this.type = type; + return this; + } + + /** + * Canonical type name of the entity + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResourceOfCreateBalance instance itself + */ + public ResourceOfCreateBalance putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceOfCreateBalance resourceOfCreateBalance = (ResourceOfCreateBalance) o; + return Objects.equals(this.attributes, resourceOfCreateBalance.attributes) && + Objects.equals(this.id, resourceOfCreateBalance.id) && + Objects.equals(this.type, resourceOfCreateBalance.type)&& + Objects.equals(this.additionalProperties, resourceOfCreateBalance.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceOfCreateBalance {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ResourceOfCreateBalance + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ResourceOfCreateBalance.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceOfCreateBalance is not found in the empty JSON string", ResourceOfCreateBalance.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + ExternalCreateBalance.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResourceOfCreateBalance.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceOfCreateBalance' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceOfCreateBalance.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResourceOfCreateBalance value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResourceOfCreateBalance read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ResourceOfCreateBalance instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResourceOfCreateBalance given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResourceOfCreateBalance + * @throws IOException if the JSON string is invalid with respect to ResourceOfCreateBalance + */ + public static ResourceOfCreateBalance fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceOfCreateBalance.class); + } + + /** + * Convert an instance of ResourceOfCreateBalance to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCreative202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCreative202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCreative202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCreative202110.java index ce9e87f3..6c7b6b73 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCreative202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCreative202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.Creative202110; +import com.criteo.api.retailmedia.v2024_07.model.Creative202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCreative202210.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCreative202210.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCreative202210.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCreative202210.java index c4581aef..641d714a 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfCreative202210.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfCreative202210.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.Creative202210; +import com.criteo.api.retailmedia.v2024_07.model.Creative202210; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfLineItemBidMultipliers.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfLineItemBidMultipliers.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfLineItemBidMultipliers.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfLineItemBidMultipliers.java index a3d352e5..c4e1e1ae 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfLineItemBidMultipliers.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfLineItemBidMultipliers.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.LineItemBidMultipliers; +import com.criteo.api.retailmedia.v2024_07.model.LineItemBidMultipliers; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfPreferredLineItem202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfPreferredLineItem202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfPreferredLineItem202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfPreferredLineItem202110.java index 4afb7b51..fc576d0b 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfPreferredLineItem202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfPreferredLineItem202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalPreferredLineItem202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalPreferredLineItem202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfPreferredLineItemUpdateModel202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfPreferredLineItemUpdateModel202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfPreferredLineItemUpdateModel202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfPreferredLineItemUpdateModel202110.java index ab7b176c..2273e372 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfPreferredLineItemUpdateModel202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfPreferredLineItemUpdateModel202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalPreferredLineItemUpdateModel202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalPreferredLineItemUpdateModel202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfPromotedProduct202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfPromotedProduct202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfPromotedProduct202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfPromotedProduct202110.java index 01f16954..d88eea98 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfPromotedProduct202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfPromotedProduct202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalPromotedProduct202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalPromotedProduct202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfRetailMediaAccount.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfRetailMediaAccount.java similarity index 97% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfRetailMediaAccount.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfRetailMediaAccount.java index 8fcab3cc..77a7ae0f 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfRetailMediaAccount.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfRetailMediaAccount.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.RetailMediaAccount; +import com.criteo.api.retailmedia.v2024_07.model.RetailMediaAccount; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A class that represents a domain entity exposed by an API. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfTemplate.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfTemplate.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfTemplate.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfTemplate.java index 12b5f9aa..6f0904d4 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfTemplate.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfTemplate.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.Template; +import com.criteo.api.retailmedia.v2024_07.model.Template; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a Resource diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfUpdateBalanceModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfUpdateBalanceModel.java new file mode 100644 index 00000000..8125d8fb --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOfUpdateBalanceModel.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.ExternalUpdateBalanceModel; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Data model for a Resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResourceOfUpdateBalanceModel { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private ExternalUpdateBalanceModel attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public ResourceOfUpdateBalanceModel() { + } + + public ResourceOfUpdateBalanceModel attributes(ExternalUpdateBalanceModel attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public ExternalUpdateBalanceModel getAttributes() { + return attributes; + } + + + public void setAttributes(ExternalUpdateBalanceModel attributes) { + this.attributes = attributes; + } + + + public ResourceOfUpdateBalanceModel id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public ResourceOfUpdateBalanceModel type(String type) { + + this.type = type; + return this; + } + + /** + * Canonical type name of the entity + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResourceOfUpdateBalanceModel instance itself + */ + public ResourceOfUpdateBalanceModel putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceOfUpdateBalanceModel resourceOfUpdateBalanceModel = (ResourceOfUpdateBalanceModel) o; + return Objects.equals(this.attributes, resourceOfUpdateBalanceModel.attributes) && + Objects.equals(this.id, resourceOfUpdateBalanceModel.id) && + Objects.equals(this.type, resourceOfUpdateBalanceModel.type)&& + Objects.equals(this.additionalProperties, resourceOfUpdateBalanceModel.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceOfUpdateBalanceModel {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ResourceOfUpdateBalanceModel + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ResourceOfUpdateBalanceModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceOfUpdateBalanceModel is not found in the empty JSON string", ResourceOfUpdateBalanceModel.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + ExternalUpdateBalanceModel.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResourceOfUpdateBalanceModel.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceOfUpdateBalanceModel' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceOfUpdateBalanceModel.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResourceOfUpdateBalanceModel value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResourceOfUpdateBalanceModel read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ResourceOfUpdateBalanceModel instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResourceOfUpdateBalanceModel given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResourceOfUpdateBalanceModel + * @throws IOException if the JSON string is invalid with respect to ResourceOfUpdateBalanceModel + */ + public static ResourceOfUpdateBalanceModel fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceOfUpdateBalanceModel.class); + } + + /** + * Convert an instance of ResourceOfUpdateBalanceModel to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOutcome.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOutcome.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOutcome.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOutcome.java index 195d35a5..7a5eb9b8 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOutcome.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOutcome.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.RmcaCommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.RmcaCommonProblem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Outcome object containing errors and warnings. diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOutcomeOfRetailMediaAccount.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOutcomeOfRetailMediaAccount.java similarity index 97% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOutcomeOfRetailMediaAccount.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOutcomeOfRetailMediaAccount.java index c21bca4c..52ecb08b 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOutcomeOfRetailMediaAccount.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ResourceOutcomeOfRetailMediaAccount.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.CommonProblem; -import com.criteo.api.retailmedia.preview.model.ResourceOfRetailMediaAccount; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfRetailMediaAccount; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API response for a single entity. diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaAccount.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaAccount.java similarity index 99% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaAccount.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaAccount.java index 8583acb8..2750df8f 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaAccount.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaAccount.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * The details for a newly created account diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaBrandAccountCreation.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaBrandAccountCreation.java similarity index 98% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaBrandAccountCreation.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaBrandAccountCreation.java index bfe793f0..f36ecb8e 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaBrandAccountCreation.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaBrandAccountCreation.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * the initial set up and configuration options for a new private market demand brand account diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaBrands.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaBrands.java similarity index 97% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaBrands.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaBrands.java index c5be8426..0c6f2887 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaBrands.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaBrands.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A collection of brand ids diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaSeller.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaSeller.java similarity index 98% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaSeller.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaSeller.java index 85f65358..89f1cecf 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaSeller.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaSeller.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * used to define the exact seller linked with an account diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaSellerAccountCreation.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaSellerAccountCreation.java similarity index 97% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaSellerAccountCreation.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaSellerAccountCreation.java index 43bbb021..160e0fda 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaSellerAccountCreation.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RetailMediaSellerAccountCreation.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.RetailMediaSeller; +import com.criteo.api.retailmedia.v2024_07.model.RetailMediaSeller; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * the initial set up and configuration options for a new private market demand brand account diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ReviewStateModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ReviewStateModel.java similarity index 94% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ReviewStateModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ReviewStateModel.java index fb7290c8..0125b127 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ReviewStateModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ReviewStateModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV1.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV1.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV1.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV1.java index e27f003b..c22647f6 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV1.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Audience definition diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV1Resource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV1Resource.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV1Resource.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV1Resource.java index dbb51c0c..dcc1710f 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV1Resource.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV1Resource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV1; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A class that represents a domain entity exposed by an API diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV1Response.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV1Response.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV1Response.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV1Response.java index f7c50876..05a43d80 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV1Response.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV1Response.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CommonProblem; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV1Resource; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV1Resource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API response for a single entity diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV2.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV2.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV2.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV2.java index 48a315f2..9f2b1a5c 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV2.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV2.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceUserBehaviorCreateV2; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceUserBehaviorCreateV2; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Audience definition diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV2Resource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV2Resource.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV2Resource.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV2Resource.java index a4acae5b..53c85214 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV2Resource.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV2Resource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV2; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV2; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A class that represents a domain entity exposed by an API diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV2Response.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV2Response.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV2Response.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV2Response.java index 846e3dea..48a23887 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateEntityV2Response.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateEntityV2Response.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CommonProblem; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV2Resource; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV2Resource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API response for a single entity diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateInputEntityV1.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateInputEntityV1.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateInputEntityV1.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateInputEntityV1.java index 1ccbec65..8204f9ad 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateInputEntityV1.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateInputEntityV1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV1Resource; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV1Resource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Input to create audience. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateInputEntityV2.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateInputEntityV2.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateInputEntityV2.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateInputEntityV2.java index 9d78e942..85010d86 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceCreateInputEntityV2.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceCreateInputEntityV2.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceCreateEntityV2Resource; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceCreateEntityV2Resource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Input to create audience. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV1.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV1.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV1.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV1.java index fc4367b4..b6a5587c 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV1.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacySegmentCustomerList; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacySegmentUserBehaviorV1; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacySegmentCustomerList; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacySegmentUserBehaviorV1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Audience definition of people of interest for a marketer. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV1ListResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV1ListResponse.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV1ListResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV1ListResponse.java index 0cb5de96..41b327d9 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV1ListResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV1ListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CommonProblem; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceGetEntityV1Resource; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceGetEntityV1Resource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API response for several entities and metadata diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV1Resource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV1Resource.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV1Resource.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV1Resource.java index 5e1decf4..2b48291b 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV1Resource.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV1Resource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceGetEntityV1; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceGetEntityV1; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A class that represents a domain entity exposed by an API diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV2.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV2.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV2.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV2.java index 16657d0a..72bc18df 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV2.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV2.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceUserBehaviorDetailsV2; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacySegmentCustomerList; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceUserBehaviorDetailsV2; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacySegmentCustomerList; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Audience definition of people of interest for a marketer diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV2ListResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV2ListResponse.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV2ListResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV2ListResponse.java index a6fd200c..2636b3e4 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV2ListResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV2ListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.CommonProblem; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceGetEntityV2Resource; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceGetEntityV2Resource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API response for several entities diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV2Resource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV2Resource.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV2Resource.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV2Resource.java index f39ab739..acc125d8 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceGetEntityV2Resource.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceGetEntityV2Resource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacyAudienceGetEntityV2; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacyAudienceGetEntityV2; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A class that represents a domain entity exposed by an API diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceUserBehaviorCreateV2.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceUserBehaviorCreateV2.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceUserBehaviorCreateV2.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceUserBehaviorCreateV2.java index 589a8949..6727eba9 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceUserBehaviorCreateV2.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceUserBehaviorCreateV2.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacySegmentUserBehaviorCreateV2; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacySegmentUserBehaviorCreateV2; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * User Behavior to include and optionally exclude. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceUserBehaviorDetailsV2.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceUserBehaviorDetailsV2.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceUserBehaviorDetailsV2.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceUserBehaviorDetailsV2.java index f329e2ab..d3719df4 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacyAudienceUserBehaviorDetailsV2.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacyAudienceUserBehaviorDetailsV2.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.RmLegacySegmentUserBehaviorV2; +import com.criteo.api.retailmedia.v2024_07.model.RmLegacySegmentUserBehaviorV2; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * User Behavior Details. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentCustomerList.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentCustomerList.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentCustomerList.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentCustomerList.java index 54759492..a8d95f24 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentCustomerList.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentCustomerList.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -41,7 +41,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Audience definition of people based on a customer list diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentUserBehaviorCreateV2.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentUserBehaviorCreateV2.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentUserBehaviorCreateV2.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentUserBehaviorCreateV2.java index 542b4a2e..7e420322 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentUserBehaviorCreateV2.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentUserBehaviorCreateV2.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * User Behavior Details. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentUserBehaviorV1.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentUserBehaviorV1.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentUserBehaviorV1.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentUserBehaviorV1.java index e6243053..ddcc92b0 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentUserBehaviorV1.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentUserBehaviorV1.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Audience definition of people based on what they visited diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentUserBehaviorV2.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentUserBehaviorV2.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentUserBehaviorV2.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentUserBehaviorV2.java index 044e82f3..1faa2fe3 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmLegacySegmentUserBehaviorV2.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmLegacySegmentUserBehaviorV2.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Audience definition of people based on what they visited diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmcaCommonProblem.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmcaCommonProblem.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmcaCommonProblem.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmcaCommonProblem.java index 25340077..ec83d483 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/RmcaCommonProblem.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/RmcaCommonProblem.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Common problem object. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Section.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Section.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Section.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Section.java index 897b1c5d..8f33c083 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Section.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Section.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.TemplateVariable; +import com.criteo.api.retailmedia.v2024_07.model.TemplateVariable; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Section object that hold template variables diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidModel.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidModel.java index a2f7e455..4db4dfd9 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A single keyword and associated bid override diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidsModel.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidsModel.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidsModel.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidsModel.java index 650a1a81..94f4111a 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidsModel.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidsModel.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.SetBidModel; +import com.criteo.api.retailmedia.v2024_07.model.SetBidModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model containing keywords and their associated bid overrides diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidsModelRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidsModelRequest.java similarity index 96% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidsModelRequest.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidsModelRequest.java index e4fc5334..d73b734b 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidsModelRequest.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidsModelRequest.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.SetBidsModelResource; +import com.criteo.api.retailmedia.v2024_07.model.SetBidsModelResource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Request object to set bid overrides for keywords associated with a line item diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidsModelResource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidsModelResource.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidsModelResource.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidsModelResource.java index 04acdd40..f7bd5a9b 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/SetBidsModelResource.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/SetBidsModelResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.SetBidsModel; +import com.criteo.api.retailmedia.v2024_07.model.SetBidsModel; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Resource object containing keywords and their associated bid overrides diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StatusResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StatusResponse.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StatusResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StatusResponse.java index ccab91c6..5755ab80 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StatusResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StatusResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Status of an async report request diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StatusResponseResource.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StatusResponseResource.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StatusResponseResource.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StatusResponseResource.java index e892e0ea..1be9a381 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StatusResponseResource.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StatusResponseResource.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.StatusResponse; +import com.criteo.api.retailmedia.v2024_07.model.StatusResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A class that represents a domain entity exposed by an API diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StoreIdsUpdateModel202110Request.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StoreIdsUpdateModel202110Request.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StoreIdsUpdateModel202110Request.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StoreIdsUpdateModel202110Request.java index 3ff10bec..286d8a9f 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StoreIdsUpdateModel202110Request.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StoreIdsUpdateModel202110Request.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfStoreIdsUpdateModel202110; +import com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfStoreIdsUpdateModel202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type input resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StoreTarget202110Request.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StoreTarget202110Request.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StoreTarget202110Request.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StoreTarget202110Request.java index cbf913c1..f2f3721d 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StoreTarget202110Request.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StoreTarget202110Request.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfStoreTarget202110; +import com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfStoreTarget202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type input resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StoreTarget202110Response.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StoreTarget202110Response.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StoreTarget202110Response.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StoreTarget202110Response.java index ad66e978..0445480b 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/StoreTarget202110Response.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/StoreTarget202110Response.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ValueTypeResourceOfStoreTarget202110; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ValueTypeResourceOfStoreTarget202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type resource outcome diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Template.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Template.java similarity index 99% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Template.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Template.java index 4ef62144..d22dd219 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/Template.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/Template.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.Section; +import com.criteo.api.retailmedia.v2024_07.model.Section; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A template for creating creatives. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateListResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateListResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateListResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateListResponse.java index 9d5a9123..d109999a 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateListResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateListResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfTemplate; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfTemplate; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a list of response resources diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateResponse.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateResponse.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateResponse.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateResponse.java index af8801df..76b287a0 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateResponse.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateResponse.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ProblemDetails; -import com.criteo.api.retailmedia.v2023_04.model.ResourceOfTemplate; +import com.criteo.api.retailmedia.v2024_07.model.ProblemDetails; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfTemplate; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for response resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateVariable.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateVariable.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateVariable.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateVariable.java index 76f31615..28650eff 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateVariable.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateVariable.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,13 +11,13 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ChoiceVariableSpecification; -import com.criteo.api.retailmedia.v2023_04.model.FilesVariablesSpecification; -import com.criteo.api.retailmedia.v2023_04.model.TextVariableSpecification; +import com.criteo.api.retailmedia.v2024_07.model.ChoiceVariableSpecification; +import com.criteo.api.retailmedia.v2024_07.model.FilesVariablesSpecification; +import com.criteo.api.retailmedia.v2024_07.model.TextVariableSpecification; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,7 +44,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A variable in a creative template diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateVariableValue.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateVariableValue.java similarity index 97% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateVariableValue.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateVariableValue.java index e3bfa405..651ff6db 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TemplateVariableValue.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TemplateVariableValue.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,15 +11,15 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ChoiceVariableValue; -import com.criteo.api.retailmedia.v2023_04.model.ColorVariableValue; -import com.criteo.api.retailmedia.v2023_04.model.FilesVariableValue; -import com.criteo.api.retailmedia.v2023_04.model.HyperlinkVariableValue; -import com.criteo.api.retailmedia.v2023_04.model.TextVariableValue; +import com.criteo.api.retailmedia.v2024_07.model.ChoiceVariableValue; +import com.criteo.api.retailmedia.v2024_07.model.ColorVariableValue; +import com.criteo.api.retailmedia.v2024_07.model.FilesVariableValue; +import com.criteo.api.retailmedia.v2024_07.model.HyperlinkVariableValue; +import com.criteo.api.retailmedia.v2024_07.model.TextVariableValue; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A value for a variable in a creative template. diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TextVariableSpecification.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TextVariableSpecification.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TextVariableSpecification.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TextVariableSpecification.java index 3a6f073b..4e9b2230 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TextVariableSpecification.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TextVariableSpecification.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Specification of a text variable diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TextVariableValue.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TextVariableValue.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TextVariableValue.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TextVariableValue.java index d4070aac..fe24c746 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/TextVariableValue.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/TextVariableValue.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,7 +11,7 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; @@ -41,7 +41,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A value of a template text variable diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/UpdateBalanceModelRequest.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/UpdateBalanceModelRequest.java new file mode 100644 index 00000000..2e14c4b0 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/UpdateBalanceModelRequest.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.ResourceOfUpdateBalanceModel; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * Data model for an input resource + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateBalanceModelRequest { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ResourceOfUpdateBalanceModel data; + + public UpdateBalanceModelRequest() { + } + + public UpdateBalanceModelRequest data(ResourceOfUpdateBalanceModel data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ResourceOfUpdateBalanceModel getData() { + return data; + } + + + public void setData(ResourceOfUpdateBalanceModel data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateBalanceModelRequest instance itself + */ + public UpdateBalanceModelRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateBalanceModelRequest updateBalanceModelRequest = (UpdateBalanceModelRequest) o; + return Objects.equals(this.data, updateBalanceModelRequest.data)&& + Objects.equals(this.additionalProperties, updateBalanceModelRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateBalanceModelRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to UpdateBalanceModelRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!UpdateBalanceModelRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateBalanceModelRequest is not found in the empty JSON string", UpdateBalanceModelRequest.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ResourceOfUpdateBalanceModel.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateBalanceModelRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateBalanceModelRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateBalanceModelRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateBalanceModelRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateBalanceModelRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + UpdateBalanceModelRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateBalanceModelRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateBalanceModelRequest + * @throws IOException if the JSON string is invalid with respect to UpdateBalanceModelRequest + */ + public static UpdateBalanceModelRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateBalanceModelRequest.class); + } + + /** + * Convert an instance of UpdateBalanceModelRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceCollectionInputOfRetailMediaSeller.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceCollectionInputOfRetailMediaSeller.java similarity index 97% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceCollectionInputOfRetailMediaSeller.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceCollectionInputOfRetailMediaSeller.java index 237e0012..692159c1 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceCollectionInputOfRetailMediaSeller.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceCollectionInputOfRetailMediaSeller.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.ValueResourceOfRetailMediaSeller; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfRetailMediaSeller; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,7 +45,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API request for several values. diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceCollectionOutcomeOfRetailMediaSeller.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceCollectionOutcomeOfRetailMediaSeller.java similarity index 97% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceCollectionOutcomeOfRetailMediaSeller.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceCollectionOutcomeOfRetailMediaSeller.java index 7da9187e..11126e8c 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceCollectionOutcomeOfRetailMediaSeller.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceCollectionOutcomeOfRetailMediaSeller.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,12 +11,12 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.CommonProblem; -import com.criteo.api.retailmedia.preview.model.ValueResourceOfRetailMediaSeller; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfRetailMediaSeller; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,7 +46,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API response for several values. diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfCampaignBudgetOverrides.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfCampaignBudgetOverrides.java new file mode 100644 index 00000000..a821c211 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfCampaignBudgetOverrides.java @@ -0,0 +1,207 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfCampaignBudgetOverrides; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API request for a single value. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ValueResourceInputOfCampaignBudgetOverrides { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ValueResourceOfCampaignBudgetOverrides data; + + public ValueResourceInputOfCampaignBudgetOverrides() { + } + + public ValueResourceInputOfCampaignBudgetOverrides data(ValueResourceOfCampaignBudgetOverrides data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ValueResourceOfCampaignBudgetOverrides getData() { + return data; + } + + + public void setData(ValueResourceOfCampaignBudgetOverrides data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValueResourceInputOfCampaignBudgetOverrides valueResourceInputOfCampaignBudgetOverrides = (ValueResourceInputOfCampaignBudgetOverrides) o; + return Objects.equals(this.data, valueResourceInputOfCampaignBudgetOverrides.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValueResourceInputOfCampaignBudgetOverrides {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ValueResourceInputOfCampaignBudgetOverrides + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ValueResourceInputOfCampaignBudgetOverrides.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValueResourceInputOfCampaignBudgetOverrides is not found in the empty JSON string", ValueResourceInputOfCampaignBudgetOverrides.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!ValueResourceInputOfCampaignBudgetOverrides.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValueResourceInputOfCampaignBudgetOverrides` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ValueResourceOfCampaignBudgetOverrides.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValueResourceInputOfCampaignBudgetOverrides.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValueResourceInputOfCampaignBudgetOverrides' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValueResourceInputOfCampaignBudgetOverrides.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValueResourceInputOfCampaignBudgetOverrides value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValueResourceInputOfCampaignBudgetOverrides read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValueResourceInputOfCampaignBudgetOverrides given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValueResourceInputOfCampaignBudgetOverrides + * @throws IOException if the JSON string is invalid with respect to ValueResourceInputOfCampaignBudgetOverrides + */ + public static ValueResourceInputOfCampaignBudgetOverrides fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValueResourceInputOfCampaignBudgetOverrides.class); + } + + /** + * Convert an instance of ValueResourceInputOfCampaignBudgetOverrides to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfLineItemBudgetOverrides.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfLineItemBudgetOverrides.java new file mode 100644 index 00000000..988e7ff7 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfLineItemBudgetOverrides.java @@ -0,0 +1,207 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfLineItemBudgetOverrides; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API request for a single value. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ValueResourceInputOfLineItemBudgetOverrides { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ValueResourceOfLineItemBudgetOverrides data; + + public ValueResourceInputOfLineItemBudgetOverrides() { + } + + public ValueResourceInputOfLineItemBudgetOverrides data(ValueResourceOfLineItemBudgetOverrides data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ValueResourceOfLineItemBudgetOverrides getData() { + return data; + } + + + public void setData(ValueResourceOfLineItemBudgetOverrides data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValueResourceInputOfLineItemBudgetOverrides valueResourceInputOfLineItemBudgetOverrides = (ValueResourceInputOfLineItemBudgetOverrides) o; + return Objects.equals(this.data, valueResourceInputOfLineItemBudgetOverrides.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValueResourceInputOfLineItemBudgetOverrides {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ValueResourceInputOfLineItemBudgetOverrides + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ValueResourceInputOfLineItemBudgetOverrides.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValueResourceInputOfLineItemBudgetOverrides is not found in the empty JSON string", ValueResourceInputOfLineItemBudgetOverrides.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!ValueResourceInputOfLineItemBudgetOverrides.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValueResourceInputOfLineItemBudgetOverrides` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ValueResourceOfLineItemBudgetOverrides.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValueResourceInputOfLineItemBudgetOverrides.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValueResourceInputOfLineItemBudgetOverrides' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValueResourceInputOfLineItemBudgetOverrides.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValueResourceInputOfLineItemBudgetOverrides value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValueResourceInputOfLineItemBudgetOverrides read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValueResourceInputOfLineItemBudgetOverrides given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValueResourceInputOfLineItemBudgetOverrides + * @throws IOException if the JSON string is invalid with respect to ValueResourceInputOfLineItemBudgetOverrides + */ + public static ValueResourceInputOfLineItemBudgetOverrides fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValueResourceInputOfLineItemBudgetOverrides.class); + } + + /** + * Convert an instance of ValueResourceInputOfLineItemBudgetOverrides to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfRetailMediaBrandAccountCreation.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfRetailMediaBrandAccountCreation.java similarity index 96% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfRetailMediaBrandAccountCreation.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfRetailMediaBrandAccountCreation.java index 8839ffec..9ae99757 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfRetailMediaBrandAccountCreation.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfRetailMediaBrandAccountCreation.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.ValueResourceOfRetailMediaBrandAccountCreation; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfRetailMediaBrandAccountCreation; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API request for a single value. diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfRetailMediaBrands.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfRetailMediaBrands.java similarity index 96% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfRetailMediaBrands.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfRetailMediaBrands.java index 4650e903..db62d9ee 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfRetailMediaBrands.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfRetailMediaBrands.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.ValueResourceOfRetailMediaBrands; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfRetailMediaBrands; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API request for a single value. diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfRetailMediaSellerAccountCreation.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfRetailMediaSellerAccountCreation.java similarity index 96% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfRetailMediaSellerAccountCreation.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfRetailMediaSellerAccountCreation.java index 3c3db0e3..3d3591e1 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfRetailMediaSellerAccountCreation.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceInputOfRetailMediaSellerAccountCreation.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.ValueResourceOfRetailMediaSellerAccountCreation; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfRetailMediaSellerAccountCreation; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API request for a single value. diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfCampaignBudgetOverrides.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfCampaignBudgetOverrides.java new file mode 100644 index 00000000..c2a4b168 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfCampaignBudgetOverrides.java @@ -0,0 +1,251 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.CampaignBudgetOverrides; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ValueResourceOfCampaignBudgetOverrides { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CampaignBudgetOverrides attributes; + + public ValueResourceOfCampaignBudgetOverrides() { + } + + public ValueResourceOfCampaignBudgetOverrides type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public ValueResourceOfCampaignBudgetOverrides attributes(CampaignBudgetOverrides attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public CampaignBudgetOverrides getAttributes() { + return attributes; + } + + + public void setAttributes(CampaignBudgetOverrides attributes) { + this.attributes = attributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValueResourceOfCampaignBudgetOverrides valueResourceOfCampaignBudgetOverrides = (ValueResourceOfCampaignBudgetOverrides) o; + return Objects.equals(this.type, valueResourceOfCampaignBudgetOverrides.type) && + Objects.equals(this.attributes, valueResourceOfCampaignBudgetOverrides.attributes); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValueResourceOfCampaignBudgetOverrides {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ValueResourceOfCampaignBudgetOverrides + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ValueResourceOfCampaignBudgetOverrides.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValueResourceOfCampaignBudgetOverrides is not found in the empty JSON string", ValueResourceOfCampaignBudgetOverrides.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!ValueResourceOfCampaignBudgetOverrides.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValueResourceOfCampaignBudgetOverrides` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + CampaignBudgetOverrides.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValueResourceOfCampaignBudgetOverrides.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValueResourceOfCampaignBudgetOverrides' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValueResourceOfCampaignBudgetOverrides.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValueResourceOfCampaignBudgetOverrides value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValueResourceOfCampaignBudgetOverrides read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValueResourceOfCampaignBudgetOverrides given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValueResourceOfCampaignBudgetOverrides + * @throws IOException if the JSON string is invalid with respect to ValueResourceOfCampaignBudgetOverrides + */ + public static ValueResourceOfCampaignBudgetOverrides fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValueResourceOfCampaignBudgetOverrides.class); + } + + /** + * Convert an instance of ValueResourceOfCampaignBudgetOverrides to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfLineItemBudgetOverrides.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfLineItemBudgetOverrides.java new file mode 100644 index 00000000..09cc9046 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfLineItemBudgetOverrides.java @@ -0,0 +1,251 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.LineItemBudgetOverrides; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ValueResourceOfLineItemBudgetOverrides { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private LineItemBudgetOverrides attributes; + + public ValueResourceOfLineItemBudgetOverrides() { + } + + public ValueResourceOfLineItemBudgetOverrides type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public ValueResourceOfLineItemBudgetOverrides attributes(LineItemBudgetOverrides attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public LineItemBudgetOverrides getAttributes() { + return attributes; + } + + + public void setAttributes(LineItemBudgetOverrides attributes) { + this.attributes = attributes; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValueResourceOfLineItemBudgetOverrides valueResourceOfLineItemBudgetOverrides = (ValueResourceOfLineItemBudgetOverrides) o; + return Objects.equals(this.type, valueResourceOfLineItemBudgetOverrides.type) && + Objects.equals(this.attributes, valueResourceOfLineItemBudgetOverrides.attributes); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValueResourceOfLineItemBudgetOverrides {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ValueResourceOfLineItemBudgetOverrides + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ValueResourceOfLineItemBudgetOverrides.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValueResourceOfLineItemBudgetOverrides is not found in the empty JSON string", ValueResourceOfLineItemBudgetOverrides.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!ValueResourceOfLineItemBudgetOverrides.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValueResourceOfLineItemBudgetOverrides` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + LineItemBudgetOverrides.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValueResourceOfLineItemBudgetOverrides.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValueResourceOfLineItemBudgetOverrides' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValueResourceOfLineItemBudgetOverrides.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValueResourceOfLineItemBudgetOverrides value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValueResourceOfLineItemBudgetOverrides read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValueResourceOfLineItemBudgetOverrides given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValueResourceOfLineItemBudgetOverrides + * @throws IOException if the JSON string is invalid with respect to ValueResourceOfLineItemBudgetOverrides + */ + public static ValueResourceOfLineItemBudgetOverrides fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValueResourceOfLineItemBudgetOverrides.class); + } + + /** + * Convert an instance of ValueResourceOfLineItemBudgetOverrides to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaBrandAccountCreation.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaBrandAccountCreation.java similarity index 97% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaBrandAccountCreation.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaBrandAccountCreation.java index 332f72e5..b3f3e4bb 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaBrandAccountCreation.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaBrandAccountCreation.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.RetailMediaBrandAccountCreation; +import com.criteo.api.retailmedia.v2024_07.model.RetailMediaBrandAccountCreation; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API response for a single value. diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaBrands.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaBrands.java similarity index 97% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaBrands.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaBrands.java index ee57d55b..9a6947e8 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaBrands.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaBrands.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.RetailMediaBrands; +import com.criteo.api.retailmedia.v2024_07.model.RetailMediaBrands; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API response for a single value. diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaSeller.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaSeller.java similarity index 97% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaSeller.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaSeller.java index 8c83622f..fd92d327 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaSeller.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaSeller.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.RetailMediaSeller; +import com.criteo.api.retailmedia.v2024_07.model.RetailMediaSeller; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API response for a single value. diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaSellerAccountCreation.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaSellerAccountCreation.java similarity index 97% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaSellerAccountCreation.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaSellerAccountCreation.java index 9c90388f..1da47f02 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaSellerAccountCreation.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOfRetailMediaSellerAccountCreation.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: Preview + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.preview.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.RetailMediaSellerAccountCreation; +import com.criteo.api.retailmedia.v2024_07.model.RetailMediaSellerAccountCreation; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,7 +43,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.preview.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * A top-level object that encapsulates a Criteo API response for a single value. diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOutcomeOfCampaignBudgetOverrides.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOutcomeOfCampaignBudgetOverrides.java new file mode 100644 index 00000000..05406e41 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOutcomeOfCampaignBudgetOverrides.java @@ -0,0 +1,300 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfCampaignBudgetOverrides; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ValueResourceOutcomeOfCampaignBudgetOverrides { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ValueResourceOfCampaignBudgetOverrides data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public ValueResourceOutcomeOfCampaignBudgetOverrides() { + } + + + public ValueResourceOutcomeOfCampaignBudgetOverrides( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public ValueResourceOutcomeOfCampaignBudgetOverrides data(ValueResourceOfCampaignBudgetOverrides data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ValueResourceOfCampaignBudgetOverrides getData() { + return data; + } + + + public void setData(ValueResourceOfCampaignBudgetOverrides data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValueResourceOutcomeOfCampaignBudgetOverrides valueResourceOutcomeOfCampaignBudgetOverrides = (ValueResourceOutcomeOfCampaignBudgetOverrides) o; + return Objects.equals(this.data, valueResourceOutcomeOfCampaignBudgetOverrides.data) && + Objects.equals(this.warnings, valueResourceOutcomeOfCampaignBudgetOverrides.warnings) && + Objects.equals(this.errors, valueResourceOutcomeOfCampaignBudgetOverrides.errors); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValueResourceOutcomeOfCampaignBudgetOverrides {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ValueResourceOutcomeOfCampaignBudgetOverrides + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ValueResourceOutcomeOfCampaignBudgetOverrides.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValueResourceOutcomeOfCampaignBudgetOverrides is not found in the empty JSON string", ValueResourceOutcomeOfCampaignBudgetOverrides.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!ValueResourceOutcomeOfCampaignBudgetOverrides.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValueResourceOutcomeOfCampaignBudgetOverrides` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ValueResourceOfCampaignBudgetOverrides.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValueResourceOutcomeOfCampaignBudgetOverrides.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValueResourceOutcomeOfCampaignBudgetOverrides' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValueResourceOutcomeOfCampaignBudgetOverrides.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValueResourceOutcomeOfCampaignBudgetOverrides value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValueResourceOutcomeOfCampaignBudgetOverrides read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValueResourceOutcomeOfCampaignBudgetOverrides given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValueResourceOutcomeOfCampaignBudgetOverrides + * @throws IOException if the JSON string is invalid with respect to ValueResourceOutcomeOfCampaignBudgetOverrides + */ + public static ValueResourceOutcomeOfCampaignBudgetOverrides fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValueResourceOutcomeOfCampaignBudgetOverrides.class); + } + + /** + * Convert an instance of ValueResourceOutcomeOfCampaignBudgetOverrides to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOutcomeOfLineItemBudgetOverrides.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOutcomeOfLineItemBudgetOverrides.java new file mode 100644 index 00000000..4e5775b0 --- /dev/null +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueResourceOutcomeOfLineItemBudgetOverrides.java @@ -0,0 +1,300 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: 2024-07 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.v2024_07.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.v2024_07.model.CommonProblem; +import com.criteo.api.retailmedia.v2024_07.model.ValueResourceOfLineItemBudgetOverrides; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.v2024_07.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ValueResourceOutcomeOfLineItemBudgetOverrides { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ValueResourceOfLineItemBudgetOverrides data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public ValueResourceOutcomeOfLineItemBudgetOverrides() { + } + + + public ValueResourceOutcomeOfLineItemBudgetOverrides( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public ValueResourceOutcomeOfLineItemBudgetOverrides data(ValueResourceOfLineItemBudgetOverrides data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ValueResourceOfLineItemBudgetOverrides getData() { + return data; + } + + + public void setData(ValueResourceOfLineItemBudgetOverrides data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValueResourceOutcomeOfLineItemBudgetOverrides valueResourceOutcomeOfLineItemBudgetOverrides = (ValueResourceOutcomeOfLineItemBudgetOverrides) o; + return Objects.equals(this.data, valueResourceOutcomeOfLineItemBudgetOverrides.data) && + Objects.equals(this.warnings, valueResourceOutcomeOfLineItemBudgetOverrides.warnings) && + Objects.equals(this.errors, valueResourceOutcomeOfLineItemBudgetOverrides.errors); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValueResourceOutcomeOfLineItemBudgetOverrides {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ValueResourceOutcomeOfLineItemBudgetOverrides + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ValueResourceOutcomeOfLineItemBudgetOverrides.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValueResourceOutcomeOfLineItemBudgetOverrides is not found in the empty JSON string", ValueResourceOutcomeOfLineItemBudgetOverrides.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!ValueResourceOutcomeOfLineItemBudgetOverrides.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValueResourceOutcomeOfLineItemBudgetOverrides` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ValueResourceOfLineItemBudgetOverrides.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValueResourceOutcomeOfLineItemBudgetOverrides.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValueResourceOutcomeOfLineItemBudgetOverrides' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValueResourceOutcomeOfLineItemBudgetOverrides.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValueResourceOutcomeOfLineItemBudgetOverrides value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValueResourceOutcomeOfLineItemBudgetOverrides read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValueResourceOutcomeOfLineItemBudgetOverrides given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValueResourceOutcomeOfLineItemBudgetOverrides + * @throws IOException if the JSON string is invalid with respect to ValueResourceOutcomeOfLineItemBudgetOverrides + */ + public static ValueResourceOutcomeOfLineItemBudgetOverrides fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValueResourceOutcomeOfLineItemBudgetOverrides.class); + } + + /** + * Convert an instance of ValueResourceOutcomeOfLineItemBudgetOverrides to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.java index 16cd844d..89746ebc 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAddToBasketIdsUpdateModel202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalAddToBasketIdsUpdateModel202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalAddToBasketIdsUpdateModel202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAddToBasketTarget202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAddToBasketTarget202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAddToBasketTarget202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAddToBasketTarget202110.java index 47179085..0c79ad11 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAddToBasketTarget202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAddToBasketTarget202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalAddToBasketTarget202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalAddToBasketTarget202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAudienceIdsUpdateModel202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAudienceIdsUpdateModel202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAudienceIdsUpdateModel202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAudienceIdsUpdateModel202110.java index ea25c7e1..f2cc98ac 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAudienceIdsUpdateModel202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAudienceIdsUpdateModel202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalAudienceIdsUpdateModel202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalAudienceIdsUpdateModel202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAudienceTarget202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAudienceTarget202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAudienceTarget202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAudienceTarget202110.java index 5af9655c..254da549 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfAudienceTarget202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfAudienceTarget202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalAudienceTarget202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalAudienceTarget202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfKeywordTarget202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfKeywordTarget202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfKeywordTarget202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfKeywordTarget202110.java index 01ae8631..c23519c2 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfKeywordTarget202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfKeywordTarget202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalKeywordTarget202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalKeywordTarget202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfStoreIdsUpdateModel202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfStoreIdsUpdateModel202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfStoreIdsUpdateModel202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfStoreIdsUpdateModel202110.java index 9f58fb9c..51e5fe6a 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfStoreIdsUpdateModel202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfStoreIdsUpdateModel202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalStoreIdsUpdateModel202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalStoreIdsUpdateModel202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type resource diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfStoreTarget202110.java b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfStoreTarget202110.java similarity index 98% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfStoreTarget202110.java rename to sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfStoreTarget202110.java index dceeddd2..3e28a3dc 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ValueTypeResourceOfStoreTarget202110.java +++ b/sdks/retailmedia_2024-07/src/main/java/com/criteo/api/retailmedia/v2024_07/model/ValueTypeResourceOfStoreTarget202110.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: 2024-07 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.v2024_07.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalStoreTarget202110; +import com.criteo.api.retailmedia.v2024_07.model.ExternalStoreTarget202110; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,7 +42,7 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.v2024_07.JSON; /** * Data model for a value type resource diff --git a/sdks/retailmedia_2023-04/src/test/java/com/criteo/api/retailmedia/v2023_04/ExampleApplication.java b/sdks/retailmedia_2024-07/src/test/java/com/criteo/api/retailmedia/v2024_07/ExampleApplication.java similarity index 82% rename from sdks/retailmedia_2023-04/src/test/java/com/criteo/api/retailmedia/v2023_04/ExampleApplication.java rename to sdks/retailmedia_2024-07/src/test/java/com/criteo/api/retailmedia/v2024_07/ExampleApplication.java index 43a6303c..e14b1712 100644 --- a/sdks/retailmedia_2023-04/src/test/java/com/criteo/api/retailmedia/v2023_04/ExampleApplication.java +++ b/sdks/retailmedia_2024-07/src/test/java/com/criteo/api/retailmedia/v2024_07/ExampleApplication.java @@ -1,12 +1,12 @@ -package com.criteo.api.retailmedia.v2023_04; - -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.ApiResponse; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.api.GatewayApi; -import com.criteo.api.retailmedia.v2023_04.model.*; +package com.criteo.api.retailmedia.v2024_07; + +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.ApiResponse; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.api.GatewayApi; +import com.criteo.api.retailmedia.v2024_07.model.*; public class ExampleApplication { diff --git a/sdks/retailmedia_2023-04/src/test/java/com/criteo/api/retailmedia/v2023_04/GatewayApiTest.java b/sdks/retailmedia_2024-07/src/test/java/com/criteo/api/retailmedia/v2024_07/GatewayApiTest.java similarity index 82% rename from sdks/retailmedia_2023-04/src/test/java/com/criteo/api/retailmedia/v2023_04/GatewayApiTest.java rename to sdks/retailmedia_2024-07/src/test/java/com/criteo/api/retailmedia/v2024_07/GatewayApiTest.java index c3dabd62..3303b2af 100644 --- a/sdks/retailmedia_2023-04/src/test/java/com/criteo/api/retailmedia/v2023_04/GatewayApiTest.java +++ b/sdks/retailmedia_2024-07/src/test/java/com/criteo/api/retailmedia/v2024_07/GatewayApiTest.java @@ -1,4 +1,4 @@ -package com.criteo.api.retailmedia.v2023_04; +package com.criteo.api.retailmedia.v2024_07; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -7,14 +7,14 @@ import java.lang.*; -import com.criteo.api.retailmedia.v2023_04.ApiClient; -import com.criteo.api.retailmedia.v2023_04.ApiClientBuilder; -import com.criteo.api.retailmedia.v2023_04.ApiException; -import com.criteo.api.retailmedia.v2023_04.ApiResponse; -import com.criteo.api.retailmedia.v2023_04.Configuration; -import com.criteo.api.retailmedia.v2023_04.ExampleApplication; -import com.criteo.api.retailmedia.v2023_04.api.GatewayApi; -import com.criteo.api.retailmedia.v2023_04.model.ApplicationSummaryModelResponse; +import com.criteo.api.retailmedia.v2024_07.ApiClient; +import com.criteo.api.retailmedia.v2024_07.ApiClientBuilder; +import com.criteo.api.retailmedia.v2024_07.ApiException; +import com.criteo.api.retailmedia.v2024_07.ApiResponse; +import com.criteo.api.retailmedia.v2024_07.Configuration; +import com.criteo.api.retailmedia.v2024_07.ExampleApplication; +import com.criteo.api.retailmedia.v2024_07.api.GatewayApi; +import com.criteo.api.retailmedia.v2024_07.model.ApplicationSummaryModelResponse; public class GatewayApiTest { private ApiClient client; diff --git a/sdks/retailmedia_preview/.openapi-generator/FILES b/sdks/retailmedia_preview/.openapi-generator/FILES index 902ec841..edad5c74 100644 --- a/sdks/retailmedia_preview/.openapi-generator/FILES +++ b/sdks/retailmedia_preview/.openapi-generator/FILES @@ -7,6 +7,8 @@ api/openapi.yaml build.gradle build.sbt docs/AccountsApi.md +docs/AddFundsToBalanceV2.md +docs/AddFundsToBalanceV2Request.md docs/AddRemoveKeywordModel.md docs/AddRemoveKeywordsModel.md docs/AddRemoveKeywordsModelRequest.md @@ -29,6 +31,10 @@ docs/AsyncReportResponse.md docs/AudienceApi.md docs/AudienceError.md docs/AudienceWarning.md +docs/BalanceApi.md +docs/BalanceHistoryChangeDataCaptureV1.md +docs/BalanceResponseV2.md +docs/BalanceResponseV2Response.md docs/BatchAcceptedResponse.md docs/Brand.md docs/BrandPreview.md @@ -40,12 +46,17 @@ docs/CampaignMonthlyBudgetOverride.md docs/CatalogApi.md docs/Category.md docs/Category202204.md -docs/ChangeDetails.md +docs/ChangeDatesOfBalanceV2.md +docs/ChangeDatesOfBalanceV2Request.md +docs/ChangeDetailsV1.md +docs/ChangeDetailsV2.md docs/CommonError.md docs/CommonProblem.md docs/CommonWarning.md docs/CpcRateCardPreview.md docs/CpcRateCardPreviewResponse.md +docs/CreateBalanceV2.md +docs/CreateBalanceV2Request.md docs/CreativeV2ListResponse.md docs/CreativeV2Response.md docs/CustomAttribute.md @@ -55,6 +66,7 @@ docs/ExportReportColumn.md docs/ExportReportMetaData.md docs/ExternalAccount.md docs/ExternalBrand.md +docs/ExternalCatalogStatus.md docs/ExternalChoiceVariableValue.md docs/ExternalColorVariableValue.md docs/ExternalCreativeCreateModelV2.md @@ -84,15 +96,19 @@ docs/GrantConsentModelValueResource.md docs/InputKeywords.md docs/InputKeywordsModel.md docs/InputResourceOfPreferredLineItemCreateModelV2.md -docs/InsertionOrderHistoryChangeDataCapture.md +docs/InsertionOrderHistoryChangeDataCaptureV2.md docs/Installment.md docs/JsonApiBodyWithIdOfInt64AndAccountAndAccount.md docs/JsonApiBodyWithIdOfInt64AndBrandAndBrand.md +docs/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md docs/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersV2AndLineItemBidMultipliersV2.md docs/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md +docs/JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.md docs/JsonApiPageResponseOfAccount.md docs/JsonApiPageResponseOfBrand.md docs/JsonApiPageResponseOfRetailer.md +docs/JsonApiRequestOfSellerCatalogRequest.md +docs/JsonApiSingleResponseOfCatalogStatus.md docs/JsonApiSingleResponseOfLineItemBidMultipliersV2.md docs/KeywordDataModel.md docs/Keywords.md @@ -108,8 +124,11 @@ docs/MatchTypeModel.md docs/Metadata.md docs/MonthlyLineItemBudegetOverride.md docs/NegotiationStateModel.md +docs/NillableString.md docs/PageMetadata.md -docs/PageOfInsertionOrderHistoryChangeDataCapture.md +docs/PageOfBalanceHistoryChangeDataCaptureV1.md +docs/PageOfInsertionOrderHistoryChangeDataCaptureV2.md +docs/PagedResourceCollectionOutcomeOfBalanceResponseV2.md docs/PlacementPreview.md docs/PlacementPreviewListResponse.md docs/PreferredLineItemCreateModelV2Request.md @@ -149,8 +168,12 @@ docs/ReportOkResponse.md docs/ReportOutcome.md docs/ReportResponse.md docs/ResourceCollectionOutcomeOfSkuSearchResult.md +docs/ResourceOfAddFundsToBalanceV2.md +docs/ResourceOfBalanceResponseV2.md docs/ResourceOfBrandPreview.md +docs/ResourceOfChangeDatesOfBalanceV2.md docs/ResourceOfCpcRateCardPreview.md +docs/ResourceOfCreateBalanceV2.md docs/ResourceOfCreativeV2.md docs/ResourceOfLineItemBidMultipliersV2.md docs/ResourceOfPlacementPreview.md @@ -158,7 +181,6 @@ docs/ResourceOfPreferredLineItemUpdateModelV2.md docs/ResourceOfPreferredLineItemV2.md docs/ResourceOfProductButtonRequest.md docs/ResourceOfProductButtonResponse.md -docs/ResourceOfRetailMediaAccount.md docs/ResourceOfSellerPreview.md docs/ResourceOfSkuDataPreview.md docs/ResourceOfSkuSearchRequestPreview.md @@ -167,20 +189,38 @@ docs/ResourceOfSkuSearchRequestSlimV2Preview.md docs/ResourceOfSkuSearchResult.md docs/ResourceOfSkuSlimDataPreview.md docs/ResourceOfSkuSlimDataV2.md +docs/ResourceOfUpdateBalanceModelV2.md docs/ResourceOutcome.md -docs/ResourceOutcomeOfRetailMediaAccount.md -docs/RetailMediaAccount.md -docs/RetailMediaBrandAccountCreation.md -docs/RetailMediaBrands.md docs/RetailMediaContactlistAmendment.md docs/RetailMediaContactlistAmendmentAttributes.md docs/RetailMediaContactlistAmendmentRequest.md docs/RetailMediaContactlistOperation.md docs/RetailMediaContactlistOperationResponseAttributes.md docs/RetailMediaContactlistOperationResponseAttributesAttributes.md -docs/RetailMediaSeller.md -docs/RetailMediaSellerAccountCreation.md docs/ReviewStateModel.md +docs/RmAudienceSegmentBulkCreateInputV1.md +docs/RmAudienceSegmentBulkDeleteInputV1.md +docs/RmAudienceSegmentBulkUpdateInputV1.md +docs/RmAudienceSegmentCreateEntityV1.md +docs/RmAudienceSegmentCreateEntityV1Resource.md +docs/RmAudienceSegmentDeleteEntityV1Resource.md +docs/RmAudienceSegmentEntityV1.md +docs/RmAudienceSegmentEntityV1ListResponse.md +docs/RmAudienceSegmentEntityV1Resource.md +docs/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.md +docs/RmAudienceSegmentIdEntityV1ListResponse.md +docs/RmAudienceSegmentIdEntityV1Resource.md +docs/RmAudienceSegmentSearchEntityV1.md +docs/RmAudienceSegmentSearchEntityV1Resource.md +docs/RmAudienceSegmentSearchInputV1.md +docs/RmAudienceSegmentSearchMetadataV1.md +docs/RmAudienceSegmentUpdateEntityV1.md +docs/RmAudienceSegmentUpdateEntityV1Resource.md +docs/RmContactListCreateV1.md +docs/RmContactListStatisticsEntityV1.md +docs/RmContactListStatisticsEntityV1Resource.md +docs/RmContactListStatisticsEntityV1Response.md +docs/RmContactListV1.md docs/RmLegacyAudienceGetEntityV1.md docs/RmLegacyAudienceGetEntityV1ListResponse.md docs/RmLegacyAudienceGetEntityV1Resource.md @@ -192,6 +232,8 @@ docs/RmLegacySegmentCustomerList.md docs/RmLegacySegmentUserBehaviorV1.md docs/RmLegacySegmentUserBehaviorV2.md docs/RmcaCommonProblem.md +docs/SellerCatalogRequest.md +docs/SellerIdentifier.md docs/SellerPreview.md docs/SellerPreviewResponse.md docs/SetBidModel.md @@ -224,20 +266,13 @@ docs/SyncCampaignsReportResource.md docs/SyncLineItemsReport.md docs/SyncLineItemsReportRequest.md docs/SyncLineItemsReportResource.md -docs/ValueResourceCollectionInputOfRetailMediaSeller.md -docs/ValueResourceCollectionOutcomeOfRetailMediaSeller.md +docs/UpdateBalanceModelV2.md +docs/UpdateBalanceModelV2Request.md docs/ValueResourceInputOfCampaignBudgetOverrides.md docs/ValueResourceInputOfLineItemBudgetOverrides.md -docs/ValueResourceInputOfRetailMediaBrandAccountCreation.md -docs/ValueResourceInputOfRetailMediaBrands.md -docs/ValueResourceInputOfRetailMediaSellerAccountCreation.md docs/ValueResourceOfCampaignBudgetOverrides.md docs/ValueResourceOfLineItemBudgetOverrides.md docs/ValueResourceOfRecommendedKeywordsResult.md -docs/ValueResourceOfRetailMediaBrandAccountCreation.md -docs/ValueResourceOfRetailMediaBrands.md -docs/ValueResourceOfRetailMediaSeller.md -docs/ValueResourceOfRetailMediaSellerAccountCreation.md docs/ValueResourceOutcomeOfCampaignBudgetOverrides.md docs/ValueResourceOutcomeOfLineItemBudgetOverrides.md docs/ValueResourceOutcomeOfRecommendedKeywordsResult.md @@ -267,6 +302,7 @@ src/main/java/com/criteo/api/retailmedia/preview/StringUtil.java src/main/java/com/criteo/api/retailmedia/preview/api/AccountsApi.java src/main/java/com/criteo/api/retailmedia/preview/api/AnalyticsApi.java src/main/java/com/criteo/api/retailmedia/preview/api/AudienceApi.java +src/main/java/com/criteo/api/retailmedia/preview/api/BalanceApi.java src/main/java/com/criteo/api/retailmedia/preview/api/CampaignApi.java src/main/java/com/criteo/api/retailmedia/preview/api/CatalogApi.java src/main/java/com/criteo/api/retailmedia/preview/api/GatewayApi.java @@ -279,6 +315,8 @@ src/main/java/com/criteo/api/retailmedia/preview/auth/OAuthFlow.java src/main/java/com/criteo/api/retailmedia/preview/auth/OAuthOkHttpClient.java src/main/java/com/criteo/api/retailmedia/preview/auth/RetryingOAuth.java src/main/java/com/criteo/api/retailmedia/preview/model/AbstractOpenApiSchema.java +src/main/java/com/criteo/api/retailmedia/preview/model/AddFundsToBalanceV2.java +src/main/java/com/criteo/api/retailmedia/preview/model/AddFundsToBalanceV2Request.java src/main/java/com/criteo/api/retailmedia/preview/model/AddRemoveKeywordModel.java src/main/java/com/criteo/api/retailmedia/preview/model/AddRemoveKeywordsModel.java src/main/java/com/criteo/api/retailmedia/preview/model/AddRemoveKeywordsModelRequest.java @@ -299,6 +337,9 @@ src/main/java/com/criteo/api/retailmedia/preview/model/AsyncLineItemsReportResou src/main/java/com/criteo/api/retailmedia/preview/model/AsyncReportResponse.java src/main/java/com/criteo/api/retailmedia/preview/model/AudienceError.java src/main/java/com/criteo/api/retailmedia/preview/model/AudienceWarning.java +src/main/java/com/criteo/api/retailmedia/preview/model/BalanceHistoryChangeDataCaptureV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/BalanceResponseV2.java +src/main/java/com/criteo/api/retailmedia/preview/model/BalanceResponseV2Response.java src/main/java/com/criteo/api/retailmedia/preview/model/BatchAcceptedResponse.java src/main/java/com/criteo/api/retailmedia/preview/model/Brand.java src/main/java/com/criteo/api/retailmedia/preview/model/BrandPreview.java @@ -308,12 +349,17 @@ src/main/java/com/criteo/api/retailmedia/preview/model/CampaignDailyBudgetOverri src/main/java/com/criteo/api/retailmedia/preview/model/CampaignMonthlyBudgetOverride.java src/main/java/com/criteo/api/retailmedia/preview/model/Category.java src/main/java/com/criteo/api/retailmedia/preview/model/Category202204.java -src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDetails.java +src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDatesOfBalanceV2.java +src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDatesOfBalanceV2Request.java +src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDetailsV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDetailsV2.java src/main/java/com/criteo/api/retailmedia/preview/model/CommonError.java src/main/java/com/criteo/api/retailmedia/preview/model/CommonProblem.java src/main/java/com/criteo/api/retailmedia/preview/model/CommonWarning.java src/main/java/com/criteo/api/retailmedia/preview/model/CpcRateCardPreview.java src/main/java/com/criteo/api/retailmedia/preview/model/CpcRateCardPreviewResponse.java +src/main/java/com/criteo/api/retailmedia/preview/model/CreateBalanceV2.java +src/main/java/com/criteo/api/retailmedia/preview/model/CreateBalanceV2Request.java src/main/java/com/criteo/api/retailmedia/preview/model/CreativeV2ListResponse.java src/main/java/com/criteo/api/retailmedia/preview/model/CreativeV2Response.java src/main/java/com/criteo/api/retailmedia/preview/model/CustomAttribute.java @@ -323,6 +369,7 @@ src/main/java/com/criteo/api/retailmedia/preview/model/ExportReportColumn.java src/main/java/com/criteo/api/retailmedia/preview/model/ExportReportMetaData.java src/main/java/com/criteo/api/retailmedia/preview/model/ExternalAccount.java src/main/java/com/criteo/api/retailmedia/preview/model/ExternalBrand.java +src/main/java/com/criteo/api/retailmedia/preview/model/ExternalCatalogStatus.java src/main/java/com/criteo/api/retailmedia/preview/model/ExternalChoiceVariableValue.java src/main/java/com/criteo/api/retailmedia/preview/model/ExternalColorVariableValue.java src/main/java/com/criteo/api/retailmedia/preview/model/ExternalCreativeCreateModelV2.java @@ -351,15 +398,19 @@ src/main/java/com/criteo/api/retailmedia/preview/model/GrantConsentModelValueRes src/main/java/com/criteo/api/retailmedia/preview/model/InputKeywords.java src/main/java/com/criteo/api/retailmedia/preview/model/InputKeywordsModel.java src/main/java/com/criteo/api/retailmedia/preview/model/InputResourceOfPreferredLineItemCreateModelV2.java -src/main/java/com/criteo/api/retailmedia/preview/model/InsertionOrderHistoryChangeDataCapture.java +src/main/java/com/criteo/api/retailmedia/preview/model/InsertionOrderHistoryChangeDataCaptureV2.java src/main/java/com/criteo/api/retailmedia/preview/model/Installment.java src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithIdOfInt64AndAccountAndAccount.java src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithIdOfInt64AndBrandAndBrand.java +src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersV2AndLineItemBidMultipliersV2.java src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.java +src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.java src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfAccount.java src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfBrand.java src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfRetailer.java +src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiRequestOfSellerCatalogRequest.java +src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiSingleResponseOfCatalogStatus.java src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiSingleResponseOfLineItemBidMultipliersV2.java src/main/java/com/criteo/api/retailmedia/preview/model/KeywordDataModel.java src/main/java/com/criteo/api/retailmedia/preview/model/Keywords.java @@ -375,8 +426,11 @@ src/main/java/com/criteo/api/retailmedia/preview/model/MatchTypeModel.java src/main/java/com/criteo/api/retailmedia/preview/model/Metadata.java src/main/java/com/criteo/api/retailmedia/preview/model/MonthlyLineItemBudegetOverride.java src/main/java/com/criteo/api/retailmedia/preview/model/NegotiationStateModel.java +src/main/java/com/criteo/api/retailmedia/preview/model/NillableString.java src/main/java/com/criteo/api/retailmedia/preview/model/PageMetadata.java -src/main/java/com/criteo/api/retailmedia/preview/model/PageOfInsertionOrderHistoryChangeDataCapture.java +src/main/java/com/criteo/api/retailmedia/preview/model/PageOfBalanceHistoryChangeDataCaptureV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/PageOfInsertionOrderHistoryChangeDataCaptureV2.java +src/main/java/com/criteo/api/retailmedia/preview/model/PagedResourceCollectionOutcomeOfBalanceResponseV2.java src/main/java/com/criteo/api/retailmedia/preview/model/PlacementPreview.java src/main/java/com/criteo/api/retailmedia/preview/model/PlacementPreviewListResponse.java src/main/java/com/criteo/api/retailmedia/preview/model/PreferredLineItemCreateModelV2Request.java @@ -416,8 +470,12 @@ src/main/java/com/criteo/api/retailmedia/preview/model/ReportOkResponse.java src/main/java/com/criteo/api/retailmedia/preview/model/ReportOutcome.java src/main/java/com/criteo/api/retailmedia/preview/model/ReportResponse.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceCollectionOutcomeOfSkuSearchResult.java +src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfAddFundsToBalanceV2.java +src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfBalanceResponseV2.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfBrandPreview.java +src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfChangeDatesOfBalanceV2.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfCpcRateCardPreview.java +src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfCreateBalanceV2.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfCreativeV2.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfLineItemBidMultipliersV2.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfPlacementPreview.java @@ -425,7 +483,6 @@ src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfPreferredLineIt src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfPreferredLineItemV2.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfProductButtonRequest.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfProductButtonResponse.java -src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfRetailMediaAccount.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfSellerPreview.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfSkuDataPreview.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfSkuSearchRequestPreview.java @@ -434,20 +491,38 @@ src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfSkuSearchReques src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfSkuSearchResult.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfSkuSlimDataPreview.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfSkuSlimDataV2.java +src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfUpdateBalanceModelV2.java src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOutcome.java -src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOutcomeOfRetailMediaAccount.java -src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaAccount.java -src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaBrandAccountCreation.java -src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaBrands.java src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaContactlistAmendment.java src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaContactlistAmendmentAttributes.java src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaContactlistAmendmentRequest.java src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaContactlistOperation.java src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaContactlistOperationResponseAttributes.java src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaContactlistOperationResponseAttributesAttributes.java -src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaSeller.java -src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaSellerAccountCreation.java src/main/java/com/criteo/api/retailmedia/preview/model/ReviewStateModel.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkCreateInputV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkDeleteInputV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkUpdateInputV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentCreateEntityV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentCreateEntityV1Resource.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentDeleteEntityV1Resource.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1ListResponse.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1Resource.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentIdEntityV1ListResponse.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentIdEntityV1Resource.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchEntityV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchEntityV1Resource.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchInputV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchMetadataV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentUpdateEntityV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentUpdateEntityV1Resource.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListCreateV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1Resource.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1Response.java +src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListV1.java src/main/java/com/criteo/api/retailmedia/preview/model/RmLegacyAudienceGetEntityV1.java src/main/java/com/criteo/api/retailmedia/preview/model/RmLegacyAudienceGetEntityV1ListResponse.java src/main/java/com/criteo/api/retailmedia/preview/model/RmLegacyAudienceGetEntityV1Resource.java @@ -459,6 +534,8 @@ src/main/java/com/criteo/api/retailmedia/preview/model/RmLegacySegmentCustomerLi src/main/java/com/criteo/api/retailmedia/preview/model/RmLegacySegmentUserBehaviorV1.java src/main/java/com/criteo/api/retailmedia/preview/model/RmLegacySegmentUserBehaviorV2.java src/main/java/com/criteo/api/retailmedia/preview/model/RmcaCommonProblem.java +src/main/java/com/criteo/api/retailmedia/preview/model/SellerCatalogRequest.java +src/main/java/com/criteo/api/retailmedia/preview/model/SellerIdentifier.java src/main/java/com/criteo/api/retailmedia/preview/model/SellerPreview.java src/main/java/com/criteo/api/retailmedia/preview/model/SellerPreviewResponse.java src/main/java/com/criteo/api/retailmedia/preview/model/SetBidModel.java @@ -491,20 +568,13 @@ src/main/java/com/criteo/api/retailmedia/preview/model/SyncCampaignsReportResour src/main/java/com/criteo/api/retailmedia/preview/model/SyncLineItemsReport.java src/main/java/com/criteo/api/retailmedia/preview/model/SyncLineItemsReportRequest.java src/main/java/com/criteo/api/retailmedia/preview/model/SyncLineItemsReportResource.java -src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceCollectionInputOfRetailMediaSeller.java -src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceCollectionOutcomeOfRetailMediaSeller.java +src/main/java/com/criteo/api/retailmedia/preview/model/UpdateBalanceModelV2.java +src/main/java/com/criteo/api/retailmedia/preview/model/UpdateBalanceModelV2Request.java src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfCampaignBudgetOverrides.java src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfLineItemBudgetOverrides.java -src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfRetailMediaBrandAccountCreation.java -src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfRetailMediaBrands.java -src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceInputOfRetailMediaSellerAccountCreation.java src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfCampaignBudgetOverrides.java src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfLineItemBudgetOverrides.java src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRecommendedKeywordsResult.java -src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaBrandAccountCreation.java -src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaBrands.java -src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaSeller.java -src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOfRetailMediaSellerAccountCreation.java src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOutcomeOfCampaignBudgetOverrides.java src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOutcomeOfLineItemBudgetOverrides.java src/main/java/com/criteo/api/retailmedia/preview/model/ValueResourceOutcomeOfRecommendedKeywordsResult.java diff --git a/sdks/retailmedia_preview/README.md b/sdks/retailmedia_preview/README.md index 2fbf9495..f8cb90a9 100644 --- a/sdks/retailmedia_preview/README.md +++ b/sdks/retailmedia_preview/README.md @@ -8,7 +8,7 @@ More information: [https://developers.criteo.com/](https://developers.criteo.com Criteo API -- Package version: 0.0.240626 +- Package version: 0.0.240731 *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -38,7 +38,7 @@ Add this dependency to your project's POM: com.criteo criteo-api-retailmedia-sdk - 0.0.240626 + 0.0.240731 compile ``` @@ -48,7 +48,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.criteo:criteo-api-retailmedia-sdk:0.0.240626" +compile "com.criteo:criteo-api-retailmedia-sdk:0.0.240731" ``` ### Others @@ -61,7 +61,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* `build/libs/criteo-api-retailmedia-sdk-0.0.240626.jar` +* `build/libs/criteo-api-retailmedia-sdk-0.0.240731.jar` ## Example @@ -73,12 +73,8 @@ All URIs are relative to *https://api.criteo.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AccountsApi* | [**addBrands**](docs/AccountsApi.md#addBrands) | **POST** /preview/retail-media/account-management/accounts/{accountId}/brands/add | -*AccountsApi* | [**createPrivateMarketDemandBrandAccount**](docs/AccountsApi.md#createPrivateMarketDemandBrandAccount) | **POST** /preview/retail-media/account-management/accounts/{accountId}/create-brand-account | -*AccountsApi* | [**createPrivateMarketDemandSellerAccount**](docs/AccountsApi.md#createPrivateMarketDemandSellerAccount) | **POST** /preview/retail-media/account-management/accounts/{accountId}/create-seller-account | +*AccountsApi* | [**getApiV1ExternalAccounts**](docs/AccountsApi.md#getApiV1ExternalAccounts) | **GET** /preview/retail-media/accounts | *AccountsApi* | [**grantConsent**](docs/AccountsApi.md#grantConsent) | **POST** /preview/retail-media/accounts/{accountId}/grant-consent | -*AccountsApi* | [**removeBrands**](docs/AccountsApi.md#removeBrands) | **POST** /preview/retail-media/account-management/accounts/{accountId}/brands/remove | -*AccountsApi* | [**updateSellers**](docs/AccountsApi.md#updateSellers) | **PUT** /preview/retail-media/account-management/accounts/{accountId}/sellers | *AnalyticsApi* | [**generateAsyncAccountsReport**](docs/AnalyticsApi.md#generateAsyncAccountsReport) | **POST** /preview/retail-media/reports/accounts | *AnalyticsApi* | [**generateAsyncCampaignsReport**](docs/AnalyticsApi.md#generateAsyncCampaignsReport) | **POST** /preview/retail-media/reports/campaigns | *AnalyticsApi* | [**generateAsyncLineItemsReport**](docs/AnalyticsApi.md#generateAsyncLineItemsReport) | **POST** /preview/retail-media/reports/line-items | @@ -87,10 +83,22 @@ Class | Method | HTTP request | Description *AnalyticsApi* | [**generateSyncLineItemsReport**](docs/AnalyticsApi.md#generateSyncLineItemsReport) | **POST** /preview/retail-media/reports/sync/line-items | *AnalyticsApi* | [**getAsyncExportOutput**](docs/AnalyticsApi.md#getAsyncExportOutput) | **GET** /preview/retail-media/reports/{reportId}/output | *AnalyticsApi* | [**getAsyncExportStatus**](docs/AnalyticsApi.md#getAsyncExportStatus) | **GET** /preview/retail-media/reports/{reportId}/status | +*AudienceApi* | [**bulkCreateV1**](docs/AudienceApi.md#bulkCreateV1) | **POST** /preview/retail-media/accounts/{account-id}/audience-segments/create | +*AudienceApi* | [**bulkDeleteV1**](docs/AudienceApi.md#bulkDeleteV1) | **POST** /preview/retail-media/accounts/{account-id}/audience-segments/delete | +*AudienceApi* | [**bulkUpdateV1**](docs/AudienceApi.md#bulkUpdateV1) | **PATCH** /preview/retail-media/accounts/{account-id}/audience-segments | *AudienceApi* | [**deleteContactListIdentifiers**](docs/AudienceApi.md#deleteContactListIdentifiers) | **POST** /preview/retail-media/audience-segments/{audience-segment-id}/contact-list/clear | +*AudienceApi* | [**getContactListStatisticsV1**](docs/AudienceApi.md#getContactListStatisticsV1) | **GET** /preview/retail-media/accounts/{account-id}/audience-segments/{audience-segment-id}/contact-list | *AudienceApi* | [**legacyGetAudienceV1**](docs/AudienceApi.md#legacyGetAudienceV1) | **GET** /preview/retail-media/accounts/{accountId}/audiences | *AudienceApi* | [**legacyGetAudienceV2**](docs/AudienceApi.md#legacyGetAudienceV2) | **GET** /preview/retail-media/v2/accounts/{accountId}/audiences | +*AudienceApi* | [**searchV1**](docs/AudienceApi.md#searchV1) | **POST** /preview/retail-media/accounts/{account-id}/audience-segments/search | *AudienceApi* | [**updateContactListIdentifiers**](docs/AudienceApi.md#updateContactListIdentifiers) | **POST** /preview/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove | +*BalanceApi* | [**getApiV2ExternalAccountBalancesByAccountId**](docs/BalanceApi.md#getApiV2ExternalAccountBalancesByAccountId) | **GET** /preview/retail-media/accounts/{account-id}/balances | +*BalanceApi* | [**getApiV2ExternalAccountByAccountIdBalancesbalanceId**](docs/BalanceApi.md#getApiV2ExternalAccountByAccountIdBalancesbalanceId) | **GET** /preview/retail-media/accounts/{account-id}/balances/{balance-id} | +*BalanceApi* | [**getBalanceHistory**](docs/BalanceApi.md#getBalanceHistory) | **GET** /preview/retail-media/balances/{balanceId}/history | +*BalanceApi* | [**patchApiV2ExternalAccountByAccountIdBalancesbalanceId**](docs/BalanceApi.md#patchApiV2ExternalAccountByAccountIdBalancesbalanceId) | **PATCH** /preview/retail-media/accounts/{account-id}/balances/{balance-id} | +*BalanceApi* | [**postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceId**](docs/BalanceApi.md#postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceId) | **POST** /preview/retail-media/accounts/{account-id}/balances/{balance-id}/add-funds | +*BalanceApi* | [**postApiV2ExternalAccountBalancesByAccountId**](docs/BalanceApi.md#postApiV2ExternalAccountBalancesByAccountId) | **POST** /preview/retail-media/accounts/{account-id}/balances | +*BalanceApi* | [**postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceId**](docs/BalanceApi.md#postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceId) | **POST** /preview/retail-media/accounts/{account-id}/balances/{balance-id}/change-dates | *CampaignApi* | [**addRemoveKeywords**](docs/CampaignApi.md#addRemoveKeywords) | **POST** /preview/retail-media/line-items/{id}/keywords/add-remove | *CampaignApi* | [**appendPromotedProducts**](docs/CampaignApi.md#appendPromotedProducts) | **POST** /preview/retail-media/line-items/{lineItemId}/products/append | *CampaignApi* | [**deleteApi202210ExternalLineItemProductButtonsByLineItemIdProductButtonId**](docs/CampaignApi.md#deleteApi202210ExternalLineItemProductButtonsByLineItemIdProductButtonId) | **DELETE** /preview/retail-media/line-items/{line-item-id}/product-buttons/{product-button-id} | @@ -102,7 +110,6 @@ Class | Method | HTTP request | Description *CampaignApi* | [**getApi202210ExternalLineItemProductButtonsByLineItemIdProductButtonId**](docs/CampaignApi.md#getApi202210ExternalLineItemProductButtonsByLineItemIdProductButtonId) | **GET** /preview/retail-media/line-items/{line-item-id}/product-buttons/{product-button-id} | *CampaignApi* | [**getApiV1ExternalAccountBrandsByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /preview/retail-media/accounts/{accountId}/brands | *CampaignApi* | [**getApiV1ExternalAccountRetailersByAccountId**](docs/CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /preview/retail-media/accounts/{accountId}/retailers | -*CampaignApi* | [**getApiV1ExternalAccounts**](docs/CampaignApi.md#getApiV1ExternalAccounts) | **GET** /preview/retail-media/accounts | *CampaignApi* | [**getApiV1ExternalRetailerBrandsByRetailerId**](docs/CampaignApi.md#getApiV1ExternalRetailerBrandsByRetailerId) | **GET** /preview/retail-media/retailers/{retailerId}/brands | *CampaignApi* | [**getApiV1ExternalRetailerByRetailerIdSellerBySeller**](docs/CampaignApi.md#getApiV1ExternalRetailerByRetailerIdSellerBySeller) | **GET** /preview/retail-media/retailers/{retailerId}/sellers/{seller} | *CampaignApi* | [**getApiV1ExternalRetailerCategoryCpcRatesByRetailerId**](docs/CampaignApi.md#getApiV1ExternalRetailerCategoryCpcRatesByRetailerId) | **GET** /preview/retail-media/retailers/{retailer-id}/cpc-rates | @@ -112,13 +119,14 @@ Class | Method | HTTP request | Description *CampaignApi* | [**getApiV2ExternalLineItemBidMultipliersByLineItemId**](docs/CampaignApi.md#getApiV2ExternalLineItemBidMultipliersByLineItemId) | **GET** /preview/retail-media/line-items/{line-item-id}/bid-multipliers | *CampaignApi* | [**getApiV2ExternalPreferredLineItemByLineItemId**](docs/CampaignApi.md#getApiV2ExternalPreferredLineItemByLineItemId) | **GET** /preview/retail-media/preferred-line-items/{line-item-id} | *CampaignApi* | [**getCampaignBudgetOverrides**](docs/CampaignApi.md#getCampaignBudgetOverrides) | **GET** /preview/retail-media/campaigns/{campaignId}/campaign-budget-overrides | -*CampaignApi* | [**getInsertionOrderHistoryChangeDataCapture**](docs/CampaignApi.md#getInsertionOrderHistoryChangeDataCapture) | **GET** /preview/retail-media/insertion-order-history/{insertionOrderId}/change-data-capture | +*CampaignApi* | [**getInsertionOrderHistoryChangeDataCaptureV2**](docs/CampaignApi.md#getInsertionOrderHistoryChangeDataCaptureV2) | **GET** /preview/retail-media/insertion-order-history/{insertionOrderId}/change-data-capture | *CampaignApi* | [**getLineItemBudgetOverrides**](docs/CampaignApi.md#getLineItemBudgetOverrides) | **GET** /preview/retail-media/line-items/{lineItemId}/line-item-budget-overrides | *CampaignApi* | [**getRecommendedKeywords**](docs/CampaignApi.md#getRecommendedKeywords) | **GET** /preview/retail-media/line-items/{externalLineItemId}/keywords/recommended | *CampaignApi* | [**getSkuByProductId**](docs/CampaignApi.md#getSkuByProductId) | **POST** /preview/retail-media/catalogs/sku/search/accounts/{accountId}/retailers/{retailerId}/by-id | *CampaignApi* | [**pausePromotedProducts**](docs/CampaignApi.md#pausePromotedProducts) | **POST** /preview/retail-media/line-items/{lineItemId}/products/pause | *CampaignApi* | [**postApi202110ExternalCampaignPreferredLineItemsByCampaignId**](docs/CampaignApi.md#postApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **POST** /preview/retail-media/campaigns/{campaign-id}/preferred-line-items | *CampaignApi* | [**postApi202210ExternalLineItemProductButtonsCreateByLineItemId**](docs/CampaignApi.md#postApi202210ExternalLineItemProductButtonsCreateByLineItemId) | **POST** /preview/retail-media/line-items/{line-item-id}/product-buttons/create | +*CampaignApi* | [**postApiV1ExternalAccountCatalogsSellersByAccountId**](docs/CampaignApi.md#postApiV1ExternalAccountCatalogsSellersByAccountId) | **POST** /preview/retail-media/accounts/{accountId}/catalogs/sellers | *CampaignApi* | [**postApiV1ExternalCatalogsSkuRetrieval**](docs/CampaignApi.md#postApiV1ExternalCatalogsSkuRetrieval) | **POST** /preview/retail-media/catalogs/sku-retrieval | *CampaignApi* | [**postApiV1ExternalCatalogsSkuSearch**](docs/CampaignApi.md#postApiV1ExternalCatalogsSkuSearch) | **POST** /preview/retail-media/catalogs/sku-search | *CampaignApi* | [**postApiV1ExternalCatalogsSkuSearchAccountIdAndRetailerId**](docs/CampaignApi.md#postApiV1ExternalCatalogsSkuSearchAccountIdAndRetailerId) | **POST** /preview/retail-media/catalogs/sku-search/accounts/{account-id}/retailers/{retailer-id} | @@ -141,6 +149,8 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [AddFundsToBalanceV2](docs/AddFundsToBalanceV2.md) + - [AddFundsToBalanceV2Request](docs/AddFundsToBalanceV2Request.md) - [AddRemoveKeywordModel](docs/AddRemoveKeywordModel.md) - [AddRemoveKeywordsModel](docs/AddRemoveKeywordsModel.md) - [AddRemoveKeywordsModelRequest](docs/AddRemoveKeywordsModelRequest.md) @@ -161,6 +171,9 @@ Class | Method | HTTP request | Description - [AsyncReportResponse](docs/AsyncReportResponse.md) - [AudienceError](docs/AudienceError.md) - [AudienceWarning](docs/AudienceWarning.md) + - [BalanceHistoryChangeDataCaptureV1](docs/BalanceHistoryChangeDataCaptureV1.md) + - [BalanceResponseV2](docs/BalanceResponseV2.md) + - [BalanceResponseV2Response](docs/BalanceResponseV2Response.md) - [BatchAcceptedResponse](docs/BatchAcceptedResponse.md) - [Brand](docs/Brand.md) - [BrandPreview](docs/BrandPreview.md) @@ -170,12 +183,17 @@ Class | Method | HTTP request | Description - [CampaignMonthlyBudgetOverride](docs/CampaignMonthlyBudgetOverride.md) - [Category](docs/Category.md) - [Category202204](docs/Category202204.md) - - [ChangeDetails](docs/ChangeDetails.md) + - [ChangeDatesOfBalanceV2](docs/ChangeDatesOfBalanceV2.md) + - [ChangeDatesOfBalanceV2Request](docs/ChangeDatesOfBalanceV2Request.md) + - [ChangeDetailsV1](docs/ChangeDetailsV1.md) + - [ChangeDetailsV2](docs/ChangeDetailsV2.md) - [CommonError](docs/CommonError.md) - [CommonProblem](docs/CommonProblem.md) - [CommonWarning](docs/CommonWarning.md) - [CpcRateCardPreview](docs/CpcRateCardPreview.md) - [CpcRateCardPreviewResponse](docs/CpcRateCardPreviewResponse.md) + - [CreateBalanceV2](docs/CreateBalanceV2.md) + - [CreateBalanceV2Request](docs/CreateBalanceV2Request.md) - [CreativeV2ListResponse](docs/CreativeV2ListResponse.md) - [CreativeV2Response](docs/CreativeV2Response.md) - [CustomAttribute](docs/CustomAttribute.md) @@ -185,6 +203,7 @@ Class | Method | HTTP request | Description - [ExportReportMetaData](docs/ExportReportMetaData.md) - [ExternalAccount](docs/ExternalAccount.md) - [ExternalBrand](docs/ExternalBrand.md) + - [ExternalCatalogStatus](docs/ExternalCatalogStatus.md) - [ExternalChoiceVariableValue](docs/ExternalChoiceVariableValue.md) - [ExternalColorVariableValue](docs/ExternalColorVariableValue.md) - [ExternalCreativeCreateModelV2](docs/ExternalCreativeCreateModelV2.md) @@ -213,15 +232,19 @@ Class | Method | HTTP request | Description - [InputKeywords](docs/InputKeywords.md) - [InputKeywordsModel](docs/InputKeywordsModel.md) - [InputResourceOfPreferredLineItemCreateModelV2](docs/InputResourceOfPreferredLineItemCreateModelV2.md) - - [InsertionOrderHistoryChangeDataCapture](docs/InsertionOrderHistoryChangeDataCapture.md) + - [InsertionOrderHistoryChangeDataCaptureV2](docs/InsertionOrderHistoryChangeDataCaptureV2.md) - [Installment](docs/Installment.md) - [JsonApiBodyWithIdOfInt64AndAccountAndAccount](docs/JsonApiBodyWithIdOfInt64AndAccountAndAccount.md) - [JsonApiBodyWithIdOfInt64AndBrandAndBrand](docs/JsonApiBodyWithIdOfInt64AndBrandAndBrand.md) + - [JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus](docs/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md) - [JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersV2AndLineItemBidMultipliersV2](docs/JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersV2AndLineItemBidMultipliersV2.md) - [JsonApiBodyWithIdOfInt64AndRetailerAndRetailer](docs/JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md) + - [JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest](docs/JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.md) - [JsonApiPageResponseOfAccount](docs/JsonApiPageResponseOfAccount.md) - [JsonApiPageResponseOfBrand](docs/JsonApiPageResponseOfBrand.md) - [JsonApiPageResponseOfRetailer](docs/JsonApiPageResponseOfRetailer.md) + - [JsonApiRequestOfSellerCatalogRequest](docs/JsonApiRequestOfSellerCatalogRequest.md) + - [JsonApiSingleResponseOfCatalogStatus](docs/JsonApiSingleResponseOfCatalogStatus.md) - [JsonApiSingleResponseOfLineItemBidMultipliersV2](docs/JsonApiSingleResponseOfLineItemBidMultipliersV2.md) - [KeywordDataModel](docs/KeywordDataModel.md) - [Keywords](docs/Keywords.md) @@ -237,8 +260,11 @@ Class | Method | HTTP request | Description - [Metadata](docs/Metadata.md) - [MonthlyLineItemBudegetOverride](docs/MonthlyLineItemBudegetOverride.md) - [NegotiationStateModel](docs/NegotiationStateModel.md) + - [NillableString](docs/NillableString.md) - [PageMetadata](docs/PageMetadata.md) - - [PageOfInsertionOrderHistoryChangeDataCapture](docs/PageOfInsertionOrderHistoryChangeDataCapture.md) + - [PageOfBalanceHistoryChangeDataCaptureV1](docs/PageOfBalanceHistoryChangeDataCaptureV1.md) + - [PageOfInsertionOrderHistoryChangeDataCaptureV2](docs/PageOfInsertionOrderHistoryChangeDataCaptureV2.md) + - [PagedResourceCollectionOutcomeOfBalanceResponseV2](docs/PagedResourceCollectionOutcomeOfBalanceResponseV2.md) - [PlacementPreview](docs/PlacementPreview.md) - [PlacementPreviewListResponse](docs/PlacementPreviewListResponse.md) - [PreferredLineItemCreateModelV2Request](docs/PreferredLineItemCreateModelV2Request.md) @@ -278,8 +304,12 @@ Class | Method | HTTP request | Description - [ReportOutcome](docs/ReportOutcome.md) - [ReportResponse](docs/ReportResponse.md) - [ResourceCollectionOutcomeOfSkuSearchResult](docs/ResourceCollectionOutcomeOfSkuSearchResult.md) + - [ResourceOfAddFundsToBalanceV2](docs/ResourceOfAddFundsToBalanceV2.md) + - [ResourceOfBalanceResponseV2](docs/ResourceOfBalanceResponseV2.md) - [ResourceOfBrandPreview](docs/ResourceOfBrandPreview.md) + - [ResourceOfChangeDatesOfBalanceV2](docs/ResourceOfChangeDatesOfBalanceV2.md) - [ResourceOfCpcRateCardPreview](docs/ResourceOfCpcRateCardPreview.md) + - [ResourceOfCreateBalanceV2](docs/ResourceOfCreateBalanceV2.md) - [ResourceOfCreativeV2](docs/ResourceOfCreativeV2.md) - [ResourceOfLineItemBidMultipliersV2](docs/ResourceOfLineItemBidMultipliersV2.md) - [ResourceOfPlacementPreview](docs/ResourceOfPlacementPreview.md) @@ -287,7 +317,6 @@ Class | Method | HTTP request | Description - [ResourceOfPreferredLineItemV2](docs/ResourceOfPreferredLineItemV2.md) - [ResourceOfProductButtonRequest](docs/ResourceOfProductButtonRequest.md) - [ResourceOfProductButtonResponse](docs/ResourceOfProductButtonResponse.md) - - [ResourceOfRetailMediaAccount](docs/ResourceOfRetailMediaAccount.md) - [ResourceOfSellerPreview](docs/ResourceOfSellerPreview.md) - [ResourceOfSkuDataPreview](docs/ResourceOfSkuDataPreview.md) - [ResourceOfSkuSearchRequestPreview](docs/ResourceOfSkuSearchRequestPreview.md) @@ -296,20 +325,38 @@ Class | Method | HTTP request | Description - [ResourceOfSkuSearchResult](docs/ResourceOfSkuSearchResult.md) - [ResourceOfSkuSlimDataPreview](docs/ResourceOfSkuSlimDataPreview.md) - [ResourceOfSkuSlimDataV2](docs/ResourceOfSkuSlimDataV2.md) + - [ResourceOfUpdateBalanceModelV2](docs/ResourceOfUpdateBalanceModelV2.md) - [ResourceOutcome](docs/ResourceOutcome.md) - - [ResourceOutcomeOfRetailMediaAccount](docs/ResourceOutcomeOfRetailMediaAccount.md) - - [RetailMediaAccount](docs/RetailMediaAccount.md) - - [RetailMediaBrandAccountCreation](docs/RetailMediaBrandAccountCreation.md) - - [RetailMediaBrands](docs/RetailMediaBrands.md) - [RetailMediaContactlistAmendment](docs/RetailMediaContactlistAmendment.md) - [RetailMediaContactlistAmendmentAttributes](docs/RetailMediaContactlistAmendmentAttributes.md) - [RetailMediaContactlistAmendmentRequest](docs/RetailMediaContactlistAmendmentRequest.md) - [RetailMediaContactlistOperation](docs/RetailMediaContactlistOperation.md) - [RetailMediaContactlistOperationResponseAttributes](docs/RetailMediaContactlistOperationResponseAttributes.md) - [RetailMediaContactlistOperationResponseAttributesAttributes](docs/RetailMediaContactlistOperationResponseAttributesAttributes.md) - - [RetailMediaSeller](docs/RetailMediaSeller.md) - - [RetailMediaSellerAccountCreation](docs/RetailMediaSellerAccountCreation.md) - [ReviewStateModel](docs/ReviewStateModel.md) + - [RmAudienceSegmentBulkCreateInputV1](docs/RmAudienceSegmentBulkCreateInputV1.md) + - [RmAudienceSegmentBulkDeleteInputV1](docs/RmAudienceSegmentBulkDeleteInputV1.md) + - [RmAudienceSegmentBulkUpdateInputV1](docs/RmAudienceSegmentBulkUpdateInputV1.md) + - [RmAudienceSegmentCreateEntityV1](docs/RmAudienceSegmentCreateEntityV1.md) + - [RmAudienceSegmentCreateEntityV1Resource](docs/RmAudienceSegmentCreateEntityV1Resource.md) + - [RmAudienceSegmentDeleteEntityV1Resource](docs/RmAudienceSegmentDeleteEntityV1Resource.md) + - [RmAudienceSegmentEntityV1](docs/RmAudienceSegmentEntityV1.md) + - [RmAudienceSegmentEntityV1ListResponse](docs/RmAudienceSegmentEntityV1ListResponse.md) + - [RmAudienceSegmentEntityV1Resource](docs/RmAudienceSegmentEntityV1Resource.md) + - [RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse](docs/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.md) + - [RmAudienceSegmentIdEntityV1ListResponse](docs/RmAudienceSegmentIdEntityV1ListResponse.md) + - [RmAudienceSegmentIdEntityV1Resource](docs/RmAudienceSegmentIdEntityV1Resource.md) + - [RmAudienceSegmentSearchEntityV1](docs/RmAudienceSegmentSearchEntityV1.md) + - [RmAudienceSegmentSearchEntityV1Resource](docs/RmAudienceSegmentSearchEntityV1Resource.md) + - [RmAudienceSegmentSearchInputV1](docs/RmAudienceSegmentSearchInputV1.md) + - [RmAudienceSegmentSearchMetadataV1](docs/RmAudienceSegmentSearchMetadataV1.md) + - [RmAudienceSegmentUpdateEntityV1](docs/RmAudienceSegmentUpdateEntityV1.md) + - [RmAudienceSegmentUpdateEntityV1Resource](docs/RmAudienceSegmentUpdateEntityV1Resource.md) + - [RmContactListCreateV1](docs/RmContactListCreateV1.md) + - [RmContactListStatisticsEntityV1](docs/RmContactListStatisticsEntityV1.md) + - [RmContactListStatisticsEntityV1Resource](docs/RmContactListStatisticsEntityV1Resource.md) + - [RmContactListStatisticsEntityV1Response](docs/RmContactListStatisticsEntityV1Response.md) + - [RmContactListV1](docs/RmContactListV1.md) - [RmLegacyAudienceGetEntityV1](docs/RmLegacyAudienceGetEntityV1.md) - [RmLegacyAudienceGetEntityV1ListResponse](docs/RmLegacyAudienceGetEntityV1ListResponse.md) - [RmLegacyAudienceGetEntityV1Resource](docs/RmLegacyAudienceGetEntityV1Resource.md) @@ -321,6 +368,8 @@ Class | Method | HTTP request | Description - [RmLegacySegmentUserBehaviorV1](docs/RmLegacySegmentUserBehaviorV1.md) - [RmLegacySegmentUserBehaviorV2](docs/RmLegacySegmentUserBehaviorV2.md) - [RmcaCommonProblem](docs/RmcaCommonProblem.md) + - [SellerCatalogRequest](docs/SellerCatalogRequest.md) + - [SellerIdentifier](docs/SellerIdentifier.md) - [SellerPreview](docs/SellerPreview.md) - [SellerPreviewResponse](docs/SellerPreviewResponse.md) - [SetBidModel](docs/SetBidModel.md) @@ -353,20 +402,13 @@ Class | Method | HTTP request | Description - [SyncLineItemsReport](docs/SyncLineItemsReport.md) - [SyncLineItemsReportRequest](docs/SyncLineItemsReportRequest.md) - [SyncLineItemsReportResource](docs/SyncLineItemsReportResource.md) - - [ValueResourceCollectionInputOfRetailMediaSeller](docs/ValueResourceCollectionInputOfRetailMediaSeller.md) - - [ValueResourceCollectionOutcomeOfRetailMediaSeller](docs/ValueResourceCollectionOutcomeOfRetailMediaSeller.md) + - [UpdateBalanceModelV2](docs/UpdateBalanceModelV2.md) + - [UpdateBalanceModelV2Request](docs/UpdateBalanceModelV2Request.md) - [ValueResourceInputOfCampaignBudgetOverrides](docs/ValueResourceInputOfCampaignBudgetOverrides.md) - [ValueResourceInputOfLineItemBudgetOverrides](docs/ValueResourceInputOfLineItemBudgetOverrides.md) - - [ValueResourceInputOfRetailMediaBrandAccountCreation](docs/ValueResourceInputOfRetailMediaBrandAccountCreation.md) - - [ValueResourceInputOfRetailMediaBrands](docs/ValueResourceInputOfRetailMediaBrands.md) - - [ValueResourceInputOfRetailMediaSellerAccountCreation](docs/ValueResourceInputOfRetailMediaSellerAccountCreation.md) - [ValueResourceOfCampaignBudgetOverrides](docs/ValueResourceOfCampaignBudgetOverrides.md) - [ValueResourceOfLineItemBudgetOverrides](docs/ValueResourceOfLineItemBudgetOverrides.md) - [ValueResourceOfRecommendedKeywordsResult](docs/ValueResourceOfRecommendedKeywordsResult.md) - - [ValueResourceOfRetailMediaBrandAccountCreation](docs/ValueResourceOfRetailMediaBrandAccountCreation.md) - - [ValueResourceOfRetailMediaBrands](docs/ValueResourceOfRetailMediaBrands.md) - - [ValueResourceOfRetailMediaSeller](docs/ValueResourceOfRetailMediaSeller.md) - - [ValueResourceOfRetailMediaSellerAccountCreation](docs/ValueResourceOfRetailMediaSellerAccountCreation.md) - [ValueResourceOutcomeOfCampaignBudgetOverrides](docs/ValueResourceOutcomeOfCampaignBudgetOverrides.md) - [ValueResourceOutcomeOfLineItemBudgetOverrides](docs/ValueResourceOutcomeOfLineItemBudgetOverrides.md) - [ValueResourceOutcomeOfRecommendedKeywordsResult](docs/ValueResourceOutcomeOfRecommendedKeywordsResult.md) diff --git a/sdks/retailmedia_preview/api/openapi.yaml b/sdks/retailmedia_preview/api/openapi.yaml index b5851a9f..53edd773 100644 --- a/sdks/retailmedia_preview/api/openapi.yaml +++ b/sdks/retailmedia_preview/api/openapi.yaml @@ -40,6 +40,7 @@ paths: responses: "204": description: Success + summary: "" tags: - Accounts x-content-type: application/json-patch+json @@ -338,6 +339,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -349,6 +351,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -356,12 +359,18 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfAccount' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfAccount' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfAccount' description: Success tags: - - Campaign + - Accounts x-accepts: application/json /preview/retail-media/accounts/{accountId}/brands: get: @@ -396,6 +405,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -407,6 +417,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -414,9 +425,15 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfBrand' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfBrand' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfBrand' description: Success tags: - Campaign @@ -454,6 +471,7 @@ paths: name: pageIndex required: false schema: + default: 0 format: int32 type: integer style: form @@ -465,6 +483,7 @@ paths: name: pageSize required: false schema: + default: 25 format: int32 type: integer style: form @@ -472,73 +491,64 @@ paths: responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' application/json: schema: $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' + text/json: + schema: + $ref: '#/components/schemas/JsonApiPageResponseOfRetailer' description: Success tags: - Campaign x-accepts: application/json - /preview/retail-media/accounts/{accountId}/audiences: - get: - description: Get a page of Audiences. (deprecated Public API) - operationId: LegacyGetAudienceV1 + /preview/retail-media/accounts/{account-id}/audience-segments: + patch: + description: "Updates the properties of all segments with a valid configuration,\ + \ and returns the full segments. For those that cannot be updated, one or\ + \ multiple errors are returned." + operationId: BulkUpdateV1 parameters: - - description: ID of the account to which this audience belongs. + - description: Account id explode: false in: path - name: accountId + name: account-id required: true schema: - format: int64 - type: integer + type: string style: simple - - description: "Limits results to the entity IDs specified; parameter key is\ - \ repeated, eg. limitToId=1&limitToId=2" - explode: true - in: query - name: limitToId - required: false - schema: - items: - format: int32 - type: integer - type: array - style: form - - description: Specifies the maximum number of entities returned in a single - page; defaults to 25 entities per page. - explode: true - in: query - name: pageSize - required: false - schema: - format: int32 - type: integer - style: form - - description: Returns the specified page of results given a pageSize; pages - are 0-indexed. - explode: true - in: query - name: pageIndex - required: false - schema: - format: int32 - type: integer - style: form + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentBulkUpdateInputV1' + application/json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentBulkUpdateInputV1' + text/json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentBulkUpdateInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentBulkUpdateInputV1' + description: Segment Update request + required: true + x-bodyName: request responses: "200": content: text/plain: schema: - $ref: '#/components/schemas/RmLegacyAudienceGetEntityV1ListResponse' + $ref: '#/components/schemas/RmAudienceSegmentEntityV1ListResponse' application/json: schema: - $ref: '#/components/schemas/RmLegacyAudienceGetEntityV1ListResponse' + $ref: '#/components/schemas/RmAudienceSegmentEntityV1ListResponse' text/json: schema: - $ref: '#/components/schemas/RmLegacyAudienceGetEntityV1ListResponse' - description: A page of audiences for the supplied account or shared by related - retailers. + $ref: '#/components/schemas/RmAudienceSegmentEntityV1ListResponse' + description: Success or partial success "400": content: text/plain: {} @@ -559,67 +569,53 @@ paths: description: The API client is not authorized to access this resource. tags: - Audience + x-content-type: application/json-patch+json x-accepts: application/json - /preview/retail-media/v2/accounts/{accountId}/audiences: - get: - description: Get a page of Audiences. (deprecated Public API) - operationId: LegacyGetAudienceV2 + /preview/retail-media/accounts/{account-id}/audience-segments/create: + post: + description: "Creates all segments with a valid configuration, and returns the\ + \ full segments. For those that cannot be created, one or multiple errors\ + \ are returned." + operationId: BulkCreateV1 parameters: - - description: ID of the account to which this audience belongs. + - description: Account Id explode: false in: path - name: accountId + name: account-id required: true schema: - format: int64 - type: integer + type: string style: simple - - description: "Limits results to the entity IDs specified; parameter key is\ - \ repeated, eg. limitToId=1&limitToId=2" - explode: true - in: query - name: limitToId - required: false - schema: - items: - format: int32 - type: integer - type: array - style: form - - description: Specifies the maximum number of entities returned in a single - page; defaults to 25 entities per page. - explode: true - in: query - name: pageSize - required: false - schema: - format: int32 - type: integer - style: form - - description: Returns the specified page of results given a pageSize; pages - are 0-indexed. - explode: true - in: query - name: pageIndex - required: false - schema: - format: int32 - type: integer - style: form + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentBulkCreateInputV1' + application/json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentBulkCreateInputV1' + text/json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentBulkCreateInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentBulkCreateInputV1' + description: Segment creation parameter + required: true + x-bodyName: request responses: "200": content: text/plain: schema: - $ref: '#/components/schemas/RmLegacyAudienceGetEntityV2ListResponse' + $ref: '#/components/schemas/RmAudienceSegmentEntityV1ListResponse' application/json: schema: - $ref: '#/components/schemas/RmLegacyAudienceGetEntityV2ListResponse' + $ref: '#/components/schemas/RmAudienceSegmentEntityV1ListResponse' text/json: schema: - $ref: '#/components/schemas/RmLegacyAudienceGetEntityV2ListResponse' - description: A page of audiences for the supplied account or shared by related - retailers. + $ref: '#/components/schemas/RmAudienceSegmentEntityV1ListResponse' + description: Success or partial success "400": content: text/plain: {} @@ -640,229 +636,601 @@ paths: description: The API client is not authorized to access this resource. tags: - Audience + x-content-type: application/json-patch+json x-accepts: application/json - /preview/retail-media/line-items/{id}/keywords: - get: - description: Fetch keywords associated with the specified line item - operationId: FetchKeywords - parameters: - - description: ID of the line item - explode: false - in: path - name: id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/KeywordsModelResponse' - description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOutcome' - description: Bad Request - tags: - - Campaign - x-accepts: application/json - /preview/retail-media/line-items/{id}/keywords/add-remove: + /preview/retail-media/accounts/{account-id}/audience-segments/delete: post: - description: Add or Remove keywords from the line item in bulk - operationId: AddRemoveKeywords + description: Delete the segments associated to the given audience IDs. + operationId: BulkDeleteV1 parameters: - - description: ID of the line item + - description: Account id explode: false in: path - name: id + name: account-id required: true schema: type: string style: simple requestBody: content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentBulkDeleteInputV1' application/json: schema: - $ref: '#/components/schemas/AddRemoveKeywordsModelRequest' + $ref: '#/components/schemas/RmAudienceSegmentBulkDeleteInputV1' + text/json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentBulkDeleteInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentBulkDeleteInputV1' + description: Segment delete request. + required: true + x-bodyName: request responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/RmAudienceSegmentIdEntityV1ListResponse' application/json: schema: - $ref: '#/components/schemas/ResourceOutcome' - description: Success + $ref: '#/components/schemas/RmAudienceSegmentIdEntityV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentIdEntityV1ListResponse' + description: Success or partial success "400": content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOutcome' - description: Bad Request + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. tags: - - Campaign - x-content-type: application/json + - Audience + x-content-type: application/json-patch+json x-accepts: application/json - /preview/retail-media/line-items/{id}/keywords/set-bid: + /preview/retail-media/accounts/{account-id}/audience-segments/search: post: - description: Set bid overrides for associated keywords to the given line item - in bulk - operationId: SetKeywordBids + description: Search segments based on the provided filters.( by ids or retailer + ids) + operationId: SearchV1 parameters: - - description: ID of the line item + - description: Account Id explode: false in: path - name: id + name: account-id required: true schema: type: string style: simple + - description: The number of elements to be returned. The default is 50 and + the maximum is 100. + explode: true + in: query + name: limit + required: false + schema: + default: 50 + format: int32 + maximum: 100 + minimum: 0 + type: integer + style: form + - description: The (zero-based) offset into the collection. The default is 0. + explode: true + in: query + name: offset + required: false + schema: + default: 0 + format: int32 + type: integer + style: form requestBody: content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentSearchInputV1' application/json: schema: - $ref: '#/components/schemas/SetBidsModelRequest' + $ref: '#/components/schemas/RmAudienceSegmentSearchInputV1' + text/json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentSearchInputV1' + application/*+json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentSearchInputV1' + description: Segment creation parameter + required: true + x-bodyName: request responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse' application/json: schema: - $ref: '#/components/schemas/ResourceOutcome' - description: Success + $ref: '#/components/schemas/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse' + description: Success or partial success "400": content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. + tags: + - Audience + x-content-type: application/json-patch+json + x-accepts: application/json + /preview/retail-media/accounts/{account-id}/audience-segments/{audience-segment-id}/contact-list: + get: + description: Returns the statistics of a contact list segment. + operationId: GetContactListStatisticsV1 + parameters: + - description: Account Id + explode: false + in: path + name: account-id + required: true + schema: + type: string + style: simple + - description: Segment Id. + explode: false + in: path + name: audience-segment-id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/RmContactListStatisticsEntityV1Response' application/json: schema: - $ref: '#/components/schemas/ResourceOutcome' - description: Bad Request + $ref: '#/components/schemas/RmContactListStatisticsEntityV1Response' + text/json: + schema: + $ref: '#/components/schemas/RmContactListStatisticsEntityV1Response' + description: Success or partial success + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. + "403": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. tags: - - Campaign - x-content-type: application/json + - Audience x-accepts: application/json - /preview/retail-media/line-items/{lineItemId}/products: + /preview/retail-media/accounts/{accountId}/audiences: get: - description: Retrieve a page of promoted products for a line item - operationId: FetchPromotedProducts + description: Get a page of Audiences. (deprecated Public API) + operationId: LegacyGetAudienceV1 parameters: - - description: ID of the line item. + - description: ID of the account to which this audience belongs. explode: false in: path - name: lineItemId + name: accountId required: true schema: - type: string + format: int64 + type: integer style: simple - - description: Offset of the first item to fetch. Defaults to zero. + - description: "Limits results to the entity IDs specified; parameter key is\ + \ repeated, eg. limitToId=1&limitToId=2" explode: true in: query - name: offset + name: limitToId required: false schema: - format: int32 - type: integer + items: + format: int32 + type: integer + type: array style: form - - description: Maximum page size to fetch. Defaults to 500. + - description: Specifies the maximum number of entities returned in a single + page; defaults to 25 entities per page. explode: true in: query - name: limit + name: pageSize required: false schema: format: int32 type: integer style: form - - description: "A comma separated list of attribute names from the response\ - \ model to compute and return.\r\n Valid values are `status`\ - \ and `bidOverride` in any order. Defaults to `status`." + - description: Returns the specified page of results given a pageSize; pages + are 0-indexed. explode: true in: query - name: fields + name: pageIndex required: false schema: - type: string + format: int32 + type: integer style: form responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/RmLegacyAudienceGetEntityV1ListResponse' application/json: schema: - $ref: '#/components/schemas/PromotedProductResourceCollectionOutcome' - description: Promoted products associated with the line item + $ref: '#/components/schemas/RmLegacyAudienceGetEntityV1ListResponse' + text/json: + schema: + $ref: '#/components/schemas/RmLegacyAudienceGetEntityV1ListResponse' + description: A page of audiences for the supplied account or shared by related + retailers. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. "403": content: - application/json: - schema: - $ref: '#/components/schemas/ProductResourceOutcome' - description: Invalid external line item ID + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. tags: - - Campaign + - Audience x-accepts: application/json - /preview/retail-media/line-items/{lineItemId}/products/append: - post: - description: Append a collection of promoted products to a line item - operationId: AppendPromotedProducts + /preview/retail-media/v2/accounts/{accountId}/audiences: + get: + description: Get a page of Audiences. (deprecated Public API) + operationId: LegacyGetAudienceV2 parameters: - - description: ID of the line item + - description: ID of the account to which this audience belongs. explode: false in: path - name: lineItemId + name: accountId required: true schema: - type: string + format: int64 + type: integer style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PromotedProductResourceCollectionInput' - description: "Request body whose {data} contains an array of promoted products." + - description: "Limits results to the entity IDs specified; parameter key is\ + \ repeated, eg. limitToId=1&limitToId=2" + explode: true + in: query + name: limitToId + required: false + schema: + items: + format: int32 + type: integer + type: array + style: form + - description: Specifies the maximum number of entities returned in a single + page; defaults to 25 entities per page. + explode: true + in: query + name: pageSize + required: false + schema: + format: int32 + type: integer + style: form + - description: Returns the specified page of results given a pageSize; pages + are 0-indexed. + explode: true + in: query + name: pageIndex + required: false + schema: + format: int32 + type: integer + style: form responses: - "204": - description: Promoted products appended to the line item - "400": + "200": content: + text/plain: + schema: + $ref: '#/components/schemas/RmLegacyAudienceGetEntityV2ListResponse' application/json: schema: - $ref: '#/components/schemas/ProductResourceOutcome' - description: Invalid request body + $ref: '#/components/schemas/RmLegacyAudienceGetEntityV2ListResponse' + text/json: + schema: + $ref: '#/components/schemas/RmLegacyAudienceGetEntityV2ListResponse' + description: A page of audiences for the supplied account or shared by related + retailers. + "400": + content: + text/plain: {} + application/json: {} + text/json: {} + description: Bad request + "401": + content: + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not properly authenticated. "403": content: - application/json: - schema: - $ref: '#/components/schemas/ProductResourceOutcome' - description: Invalid external line item ID + text/plain: {} + application/json: {} + text/json: {} + description: The API client is not authorized to access this resource. tags: - - Campaign - x-content-type: application/json + - Audience x-accepts: application/json - /preview/retail-media/line-items/{lineItemId}/products/delete: - post: - description: Remove a collection of promoted products from a line item - operationId: DeletePromotedProducts + /preview/retail-media/line-items/{id}/keywords: + get: + description: Fetch keywords associated with the specified line item + operationId: FetchKeywords parameters: - description: ID of the line item explode: false in: path - name: lineItemId + name: id required: true schema: type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PromotedProductResourceCollectionInput' - description: "Request body whose {data} contains an array of promoted products." responses: - "204": - description: Promoted products removed from the line item - "400": + "200": content: application/json: schema: - $ref: '#/components/schemas/ProductResourceOutcome' + $ref: '#/components/schemas/KeywordsModelResponse' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOutcome' + description: Bad Request + tags: + - Campaign + x-accepts: application/json + /preview/retail-media/line-items/{id}/keywords/add-remove: + post: + description: Add or Remove keywords from the line item in bulk + operationId: AddRemoveKeywords + parameters: + - description: ID of the line item + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddRemoveKeywordsModelRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOutcome' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOutcome' + description: Bad Request + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /preview/retail-media/line-items/{id}/keywords/set-bid: + post: + description: Set bid overrides for associated keywords to the given line item + in bulk + operationId: SetKeywordBids + parameters: + - description: ID of the line item + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SetBidsModelRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOutcome' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceOutcome' + description: Bad Request + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /preview/retail-media/line-items/{lineItemId}/products: + get: + description: Retrieve a page of promoted products for a line item + operationId: FetchPromotedProducts + parameters: + - description: ID of the line item. + explode: false + in: path + name: lineItemId + required: true + schema: + type: string + style: simple + - description: Offset of the first item to fetch. Defaults to zero. + explode: true + in: query + name: offset + required: false + schema: + format: int32 + type: integer + style: form + - description: Maximum page size to fetch. Defaults to 500. + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: "A comma separated list of attribute names from the response\ + \ model to compute and return.\r\n Valid values are `status`\ + \ and `bidOverride` in any order. Defaults to `status`." + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PromotedProductResourceCollectionOutcome' + description: Promoted products associated with the line item + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ProductResourceOutcome' + description: Invalid external line item ID + tags: + - Campaign + x-accepts: application/json + /preview/retail-media/line-items/{lineItemId}/products/append: + post: + description: Append a collection of promoted products to a line item + operationId: AppendPromotedProducts + parameters: + - description: ID of the line item + explode: false + in: path + name: lineItemId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromotedProductResourceCollectionInput' + description: "Request body whose {data} contains an array of promoted products." + responses: + "204": + description: Promoted products appended to the line item + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ProductResourceOutcome' + description: Invalid request body + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ProductResourceOutcome' + description: Invalid external line item ID + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /preview/retail-media/line-items/{lineItemId}/products/delete: + post: + description: Remove a collection of promoted products from a line item + operationId: DeletePromotedProducts + parameters: + - description: ID of the line item + explode: false + in: path + name: lineItemId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PromotedProductResourceCollectionInput' + description: "Request body whose {data} contains an array of promoted products." + responses: + "204": + description: Promoted products removed from the line item + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ProductResourceOutcome' description: Invalid request body "403": content: @@ -1195,6 +1563,55 @@ paths: - Campaign x-content-type: application/json x-accepts: application/json + /preview/retail-media/accounts/{accountId}/catalogs/sellers: + post: + description: Create a request for a Catalog available to the indicated account. + operationId: Catalog_PostApiV1ExternalAccountCatalogsSellersByAccountId + parameters: + - description: The account to request the catalog for. + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/JsonApiRequestOfSellerCatalogRequest' + x-bodyName: body + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiSingleResponseOfCatalogStatus' + application/json: + schema: + $ref: '#/components/schemas/JsonApiSingleResponseOfCatalogStatus' + text/json: + schema: + $ref: '#/components/schemas/JsonApiSingleResponseOfCatalogStatus' + description: Catalog request successfully created + "400": + content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiSingleResponseOfCatalogStatus' + application/json: + schema: + $ref: '#/components/schemas/JsonApiSingleResponseOfCatalogStatus' + text/json: + schema: + $ref: '#/components/schemas/JsonApiSingleResponseOfCatalogStatus' + description: Bad Request + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json /preview/retail-media/catalogs/sku-retrieval: post: description: "Endpoint to search skus by text, retailer and sellers/brands." @@ -2070,201 +2487,60 @@ paths: tags: - Analytics x-accepts: application/json - /preview/retail-media/account-management/accounts/{accountId}/brands/add: - post: - description: Add brands to an account - operationId: AddBrands + /preview/retail-media/balances/{balanceId}/history: + get: + description: Gets the balance's historical change data. + operationId: GetBalanceHistory parameters: - - description: the account id to update + - description: Balance id. explode: false in: path - name: accountId + name: balanceId required: true schema: type: string style: simple - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' - application/json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' - text/json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' - application/*+json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' - description: brands to associate to account - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ValueResourceOfRetailMediaBrands' - description: Success - tags: - - Accounts - x-content-type: application/json-patch+json - x-accepts: application/json - /preview/retail-media/account-management/accounts/{accountId}/brands/remove: - post: - description: Remove a brand from an account - operationId: RemoveBrands - parameters: - - description: the account id to update - explode: false - in: path - name: accountId - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' - application/json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' - text/json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' - application/*+json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrands' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ValueResourceOfRetailMediaBrands' - description: Success - tags: - - Accounts - x-content-type: application/json-patch+json - x-accepts: application/json - /preview/retail-media/account-management/accounts/{accountId}/create-brand-account: - post: - description: Creates a new child Demand Brand Account for the provided parent - private market account - operationId: CreatePrivateMarketDemandBrandAccount - parameters: - - description: Account Id for the parent private market account - explode: false - in: path - name: accountId - required: true + - description: The (zero-based) starting offset in the collection. + explode: true + in: query + name: offset + required: false schema: - type: string - style: simple - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrandAccountCreation' - application/json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrandAccountCreation' - text/json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrandAccountCreation' - application/*+json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaBrandAccountCreation' - description: Initial creation and configuration options for the new account - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOutcomeOfRetailMediaAccount' - description: Success - tags: - - Accounts - x-content-type: application/json-patch+json - x-accepts: application/json - /preview/retail-media/account-management/accounts/{accountId}/create-seller-account: - post: - description: Creates a new child Demand Seller Account for the provided parent - private market account - operationId: CreatePrivateMarketDemandSellerAccount - parameters: - - description: Account Id for the parent private market account - explode: false - in: path - name: accountId - required: true + default: 0 + format: int32 + maximum: 2147483647 + minimum: 0 + type: integer + style: form + - description: The number of elements to be returned. + explode: true + in: query + name: limit + required: false schema: - type: string - style: simple - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaSellerAccountCreation' - application/json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaSellerAccountCreation' - text/json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaSellerAccountCreation' - application/*+json: - schema: - $ref: '#/components/schemas/ValueResourceInputOfRetailMediaSellerAccountCreation' - description: Initial creation and configuration options for the new account - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceOutcomeOfRetailMediaAccount' - description: Success - tags: - - Accounts - x-content-type: application/json-patch+json - x-accepts: application/json - /preview/retail-media/account-management/accounts/{accountId}/sellers: - put: - description: replace the sellers assoiated with an account - operationId: UpdateSellers - parameters: - - description: the account id to update - explode: false - in: path - name: accountId - required: true + default: 25 + format: int32 + maximum: 100 + minimum: 1 + type: integer + style: form + - description: Comma separated change types string that will be queried. + explode: true + in: query + name: limitToChangeTypes + required: false schema: type: string - style: simple - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/ValueResourceCollectionInputOfRetailMediaSeller' - application/json: - schema: - $ref: '#/components/schemas/ValueResourceCollectionInputOfRetailMediaSeller' - text/json: - schema: - $ref: '#/components/schemas/ValueResourceCollectionInputOfRetailMediaSeller' - application/*+json: - schema: - $ref: '#/components/schemas/ValueResourceCollectionInputOfRetailMediaSeller' - description: sellers to associate + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ValueResourceCollectionOutcomeOfRetailMediaSeller' + $ref: '#/components/schemas/PageOfBalanceHistoryChangeDataCaptureV1' description: Success tags: - - Accounts - x-content-type: application/json-patch+json + - Balance x-accepts: application/json /preview/retail-media/campaigns/{campaignId}/campaign-budget-overrides: get: @@ -2320,6 +2596,7 @@ paths: schema: $ref: '#/components/schemas/ValueResourceInputOfCampaignBudgetOverrides' description: New campaign budget overrides settings value resource input. + x-bodyName: campaignBudgetOverridesInput responses: "201": content: @@ -2396,6 +2673,7 @@ paths: schema: $ref: '#/components/schemas/SkuSearchRequest' description: "" + x-bodyName: skuSearchRequest responses: "200": content: @@ -2410,7 +2688,7 @@ paths: /preview/retail-media/insertion-order-history/{insertionOrderId}/change-data-capture: get: description: Gets the balance's historical data change capture. - operationId: GetInsertionOrderHistoryChangeDataCapture + operationId: GetInsertionOrderHistoryChangeDataCaptureV2 parameters: - description: External insertion order id. explode: false @@ -2457,7 +2735,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PageOfInsertionOrderHistoryChangeDataCapture' + $ref: '#/components/schemas/PageOfInsertionOrderHistoryChangeDataCaptureV2' description: Success tags: - Campaign @@ -2537,6 +2815,7 @@ paths: schema: $ref: '#/components/schemas/ValueResourceInputOfLineItemBudgetOverrides' description: New line item budget overrides settings value resource input. + x-bodyName: lineItemBudgetOverridesInput responses: "201": content: @@ -2548,16 +2827,15 @@ paths: - Campaign x-content-type: application/json-patch+json x-accepts: application/json - /preview/retail-media/campaigns/{campaign-id}/preferred-line-items: + /preview/retail-media/accounts/{account-id}/balances: get: - description: Gets page of preferred line item objects for the given campaign - id - operationId: GetApiV2ExternalCampaignPreferredLineItemsByCampaignId + description: Gets page of balance objects for the given account id + operationId: GetApiV2ExternalAccountBalancesByAccountId parameters: - - description: The given campaign id + - description: The account to get balances for explode: false in: path - name: campaign-id + name: account-id required: true schema: type: string @@ -2567,7 +2845,7 @@ paths: explode: true in: query name: limitToId - required: false + required: true schema: items: type: string @@ -2579,8 +2857,9 @@ paths: explode: true in: query name: pageIndex - required: false + required: true schema: + default: 0 format: int32 type: integer style: form @@ -2590,8 +2869,9 @@ paths: explode: true in: query name: pageSize - required: false + required: true schema: + default: 25 format: int32 type: integer style: form @@ -2599,27 +2879,27 @@ paths: responses: "200": content: - application/json: + text/plain: schema: - $ref: '#/components/schemas/PreferredLineItemV2PagedListResponse' - description: Success - "400": - content: + $ref: '#/components/schemas/PagedResourceCollectionOutcomeOfBalanceResponseV2' application/json: schema: - $ref: '#/components/schemas/PreferredLineItemV2PagedListResponse' - description: Bad Request + $ref: '#/components/schemas/PagedResourceCollectionOutcomeOfBalanceResponseV2' + text/json: + schema: + $ref: '#/components/schemas/PagedResourceCollectionOutcomeOfBalanceResponseV2' + description: Success tags: - - Campaign + - Balance x-accepts: application/json post: - description: Creates a new preferred line item with the specified settings - operationId: LineItemsApi_PostApi202110ExternalCampaignPreferredLineItemsByCampaignId + description: Create balance for the given account id + operationId: PostApiV2ExternalAccountBalancesByAccountId parameters: - - description: The given campaign id + - description: The account to create balances for explode: false in: path - name: campaign-id + name: account-id required: true schema: type: string @@ -2629,37 +2909,47 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PreferredLineItemCreateModelV2Request' - description: The line item settings to create a line item with + $ref: '#/components/schemas/CreateBalanceV2Request' + description: An object that represents the available options to set when creating + a Retail Media Balance required: true x-nullable: false - x-bodyName: lineItem + x-bodyName: createBalance responses: "201": content: - application/json: + text/plain: schema: - $ref: '#/components/schemas/PreferredLineItemV2Response' - description: Success - "400": - content: + $ref: '#/components/schemas/BalanceResponseV2Response' application/json: schema: - $ref: '#/components/schemas/PreferredLineItemV2Response' - description: Bad Request + $ref: '#/components/schemas/BalanceResponseV2Response' + text/json: + schema: + $ref: '#/components/schemas/BalanceResponseV2Response' + description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json - /preview/retail-media/line-items/{line-item-id}/bid-multipliers: + /preview/retail-media/accounts/{account-id}/balances/{balance-id}: get: - description: Fetch all bid multipliers for a given line item - operationId: GetApiV2ExternalLineItemBidMultipliersByLineItemId + description: Get a balance for the given account id and balance id + operationId: "GetApiV2ExternalAccountByAccountId}Balances{balanceId" parameters: - - description: External LineItemId for bid multiplier retrieval + - description: The account of the balance explode: false in: path - name: line-item-id + name: account-id + required: true + schema: + type: string + style: simple + x-nullable: false + - description: The balance id + explode: false + in: path + name: balance-id required: true schema: type: string @@ -2670,25 +2960,34 @@ paths: content: text/plain: schema: - $ref: '#/components/schemas/JsonApiSingleResponseOfLineItemBidMultipliersV2' + $ref: '#/components/schemas/BalanceResponseV2Response' application/json: schema: - $ref: '#/components/schemas/JsonApiSingleResponseOfLineItemBidMultipliersV2' + $ref: '#/components/schemas/BalanceResponseV2Response' text/json: schema: - $ref: '#/components/schemas/JsonApiSingleResponseOfLineItemBidMultipliersV2' - description: BidMultipliers Found + $ref: '#/components/schemas/BalanceResponseV2Response' + description: Success tags: - - Campaign + - Balance x-accepts: application/json - put: - description: Updates the bid multipliers for a given line item - operationId: PutApiV2ExternalLineItemBidMultipliersByLineItemId + patch: + description: Modify a balance for the given account id + operationId: "PatchApiV2ExternalAccountByAccountId}Balances{balanceId" parameters: - - description: External LineItemId for bid multiplier retrieval + - description: The account of the balance explode: false in: path - name: line-item-id + name: account-id + required: true + schema: + type: string + style: simple + x-nullable: false + - description: The balance to change the dates + explode: false + in: path + name: balance-id required: true schema: type: string @@ -2698,59 +2997,46 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LineItemBidMultipliersV2Request' - description: New Bid Multipliers to be set - x-bodyName: request + $ref: '#/components/schemas/UpdateBalanceModelV2Request' + description: An object that represents the available options to modify a balance. + required: true + x-nullable: false + x-bodyName: updateBalanceModel responses: "200": content: text/plain: schema: - $ref: '#/components/schemas/LineItemBidMultipliersV2Response' + $ref: '#/components/schemas/BalanceResponseV2Response' application/json: schema: - $ref: '#/components/schemas/LineItemBidMultipliersV2Response' + $ref: '#/components/schemas/BalanceResponseV2Response' text/json: schema: - $ref: '#/components/schemas/LineItemBidMultipliersV2Response' - description: BidMultipliers Updated + $ref: '#/components/schemas/BalanceResponseV2Response' + description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json - /preview/retail-media/line-items/{line-item-id}/product-buttons: - get: - description: Get all the product buttons associated with a line item - operationId: ProductButtons_GetApi202210ExternalLineItemProductButtonsByLineItemId + /preview/retail-media/accounts/{account-id}/balances/{balance-id}/add-funds: + post: + description: Add funds to a balance for the given account id + operationId: "PostApiV2ExternalAccountAddFundsByAccountId}Balances{balanceId" parameters: - - description: Long external id of the associated line item + - description: The account of the balance explode: false in: path - name: line-item-id + name: account-id required: true schema: type: string style: simple x-nullable: false - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ProductButtonListResponse' - description: Success - tags: - - Campaign - x-accepts: application/json - /preview/retail-media/line-items/{line-item-id}/product-buttons/create: - post: - description: Append new product buttons to a line item - operationId: ProductButtons_PostApi202210ExternalLineItemProductButtonsCreateByLineItemId - parameters: - - description: Long external id of the associated line item + - description: The balance to add funds to explode: false in: path - name: line-item-id + name: balance-id required: true schema: type: string @@ -2760,87 +3046,188 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ProductButtonListRequest' - description: List of product buttons to append to the specified line item + $ref: '#/components/schemas/AddFundsToBalanceV2Request' + description: An object that represents the available options of adding funds + to a balance. + required: true x-nullable: false - x-bodyName: productButtons + x-bodyName: addFundsToBalance responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/BalanceResponseV2Response' application/json: schema: - $ref: '#/components/schemas/ProductButtonListResponse' + $ref: '#/components/schemas/BalanceResponseV2Response' + text/json: + schema: + $ref: '#/components/schemas/BalanceResponseV2Response' description: Success tags: - - Campaign + - Balance x-content-type: application/json x-accepts: application/json - /preview/retail-media/line-items/{line-item-id}/product-buttons/{product-button-id}: - delete: - description: Delete a product button - operationId: ProductButtons_DeleteApi202210ExternalLineItemProductButtonsByLineItemIdProductButtonId + /preview/retail-media/accounts/{account-id}/balances/{balance-id}/change-dates: + post: + description: Change dates of a balance for the given account id + operationId: "PostApiV2ExternalAccountChangeDatesByAccountId}Balances{balanceId" parameters: - - description: Long external id of the associated line item + - description: The account of the balance explode: false in: path - name: line-item-id + name: account-id required: true schema: type: string style: simple x-nullable: false - - description: Sequential id of the product button + - description: The balance to change the dates explode: false in: path - name: product-button-id + name: balance-id required: true schema: type: string style: simple x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChangeDatesOfBalanceV2Request' + description: An object that represents the available options to modify schedule + of a balance. + required: true + x-nullable: false + x-bodyName: changeDatesOfBalance responses: "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/BalanceResponseV2Response' + application/json: + schema: + $ref: '#/components/schemas/BalanceResponseV2Response' + text/json: + schema: + $ref: '#/components/schemas/BalanceResponseV2Response' description: Success tags: - - Campaign + - Balance + x-content-type: application/json x-accepts: application/json + /preview/retail-media/campaigns/{campaign-id}/preferred-line-items: get: - description: Get a single product button - operationId: ProductButtons_GetApi202210ExternalLineItemProductButtonsByLineItemIdProductButtonId + description: Gets page of preferred line item objects for the given campaign + id + operationId: GetApiV2ExternalCampaignPreferredLineItemsByCampaignId parameters: - - description: Long external id of the associated line item + - description: The given campaign id explode: false in: path - name: line-item-id + name: campaign-id required: true schema: type: string style: simple x-nullable: false - - description: Sequential id of the product button + - description: The ids that you would like to limit your result set to + explode: true + in: query + name: limitToId + required: false + schema: + items: + type: string + type: array + style: form + x-nullable: false + - description: The 0 indexed page index you would like to receive given the + page size + explode: true + in: query + name: pageIndex + required: false + schema: + format: int32 + type: integer + style: form + x-nullable: false + - description: The maximum number of items you would like to receive in this + request + explode: true + in: query + name: pageSize + required: false + schema: + format: int32 + type: integer + style: form + x-nullable: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PreferredLineItemV2PagedListResponse' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/PreferredLineItemV2PagedListResponse' + description: Bad Request + tags: + - Campaign + x-accepts: application/json + post: + description: Creates a new preferred line item with the specified settings + operationId: LineItemsApi_PostApi202110ExternalCampaignPreferredLineItemsByCampaignId + parameters: + - description: The given campaign id explode: false in: path - name: product-button-id + name: campaign-id required: true schema: type: string style: simple x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PreferredLineItemCreateModelV2Request' + description: The line item settings to create a line item with + required: true + x-nullable: false + x-bodyName: lineItem responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/ProductButtonListResponse' + $ref: '#/components/schemas/PreferredLineItemV2Response' description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/PreferredLineItemV2Response' + description: Bad Request tags: - Campaign + x-content-type: application/json x-accepts: application/json - put: - description: Update a product button - operationId: ProductButtons_PutApi202210ExternalLineItemProductButtonsByLineItemIdProductButtonId + /preview/retail-media/line-items/{line-item-id}/bid-multipliers: + get: + description: Fetch all bid multipliers for a given line item + operationId: GetApiV2ExternalLineItemBidMultipliersByLineItemId parameters: - - description: Long external id of the associated line item + - description: External LineItemId for bid multiplier retrieval explode: false in: path name: line-item-id @@ -2849,10 +3236,30 @@ paths: type: string style: simple x-nullable: false - - description: Sequential id of the product button + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/JsonApiSingleResponseOfLineItemBidMultipliersV2' + application/json: + schema: + $ref: '#/components/schemas/JsonApiSingleResponseOfLineItemBidMultipliersV2' + text/json: + schema: + $ref: '#/components/schemas/JsonApiSingleResponseOfLineItemBidMultipliersV2' + description: BidMultipliers Found + tags: + - Campaign + x-accepts: application/json + put: + description: Updates the bid multipliers for a given line item + operationId: PutApiV2ExternalLineItemBidMultipliersByLineItemId + parameters: + - description: External LineItemId for bid multiplier retrieval explode: false in: path - name: product-button-id + name: line-item-id required: true schema: type: string @@ -2862,27 +3269,32 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ProductButtonRequest' - description: Details of the updated product button - x-nullable: false - x-bodyName: productButton + $ref: '#/components/schemas/LineItemBidMultipliersV2Request' + description: New Bid Multipliers to be set + x-bodyName: request responses: "200": content: + text/plain: + schema: + $ref: '#/components/schemas/LineItemBidMultipliersV2Response' application/json: schema: - $ref: '#/components/schemas/ProductButtonListResponse' - description: Success + $ref: '#/components/schemas/LineItemBidMultipliersV2Response' + text/json: + schema: + $ref: '#/components/schemas/LineItemBidMultipliersV2Response' + description: BidMultipliers Updated tags: - Campaign x-content-type: application/json x-accepts: application/json - /preview/retail-media/preferred-line-items/{line-item-id}: + /preview/retail-media/line-items/{line-item-id}/product-buttons: get: - description: Gets the preferred line item for the given line item id - operationId: GetApiV2ExternalPreferredLineItemByLineItemId + description: Get all the product buttons associated with a line item + operationId: ProductButtons_GetApi202210ExternalLineItemProductButtonsByLineItemId parameters: - - description: The given line item id + - description: Long external id of the associated line item explode: false in: path name: line-item-id @@ -2896,22 +3308,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PreferredLineItemV2Response' + $ref: '#/components/schemas/ProductButtonListResponse' description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/PreferredLineItemV2Response' - description: Bad Request tags: - Campaign x-accepts: application/json - put: - description: Updates the preferred line item for the given line item id - operationId: LineItemsApi_PutApi202110ExternalPreferredLineItemByLineItemId + /preview/retail-media/line-items/{line-item-id}/product-buttons/create: + post: + description: Append new product buttons to a line item + operationId: ProductButtons_PostApi202210ExternalLineItemProductButtonsCreateByLineItemId parameters: - - description: The given line item id + - description: Long external id of the associated line item explode: false in: path name: line-item-id @@ -2924,64 +3331,227 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PreferredLineItemUpdateModelV2Request' - description: The line item settings to create a line item with - required: true + $ref: '#/components/schemas/ProductButtonListRequest' + description: List of product buttons to append to the specified line item x-nullable: false - x-bodyName: lineItem + x-bodyName: productButtons responses: "200": content: application/json: schema: - $ref: '#/components/schemas/PreferredLineItemV2Response' + $ref: '#/components/schemas/ProductButtonListResponse' description: Success - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/PreferredLineItemV2Response' - description: Bad Request tags: - Campaign x-content-type: application/json x-accepts: application/json -components: - schemas: - GrantConsentInput: - description: A top-level object that encapsulates a Criteo API request for a - single value. - example: - data: - attributes: - callbackState: callbackState - clientId: clientId - callbackUrl: callbackUrl - type: type - properties: - data: - $ref: '#/components/schemas/GrantConsentModelValueResource' - type: object - GrantConsentModelValueResource: - description: A top-level object that encapsulates a Criteo API response for - a single value. - example: - attributes: - callbackState: callbackState - clientId: clientId - callbackUrl: callbackUrl - type: type - properties: - type: - nullable: true + /preview/retail-media/line-items/{line-item-id}/product-buttons/{product-button-id}: + delete: + description: Delete a product button + operationId: ProductButtons_DeleteApi202210ExternalLineItemProductButtonsByLineItemIdProductButtonId + parameters: + - description: Long external id of the associated line item + explode: false + in: path + name: line-item-id + required: true + schema: type: string - attributes: - $ref: '#/components/schemas/GrantConsentModel' - type: object - GrantConsentModel: - description: An object that represents the required (ClientId and CallbackUrl) - and optional (CallbackState) parameters when granting consents on behalf of - a Private Market demand account. + style: simple + x-nullable: false + - description: Sequential id of the product button + explode: false + in: path + name: product-button-id + required: true + schema: + type: string + style: simple + x-nullable: false + responses: + "200": + description: Success + tags: + - Campaign + x-accepts: application/json + get: + description: Get a single product button + operationId: ProductButtons_GetApi202210ExternalLineItemProductButtonsByLineItemIdProductButtonId + parameters: + - description: Long external id of the associated line item + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + - description: Sequential id of the product button + explode: false + in: path + name: product-button-id + required: true + schema: + type: string + style: simple + x-nullable: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProductButtonListResponse' + description: Success + tags: + - Campaign + x-accepts: application/json + put: + description: Update a product button + operationId: ProductButtons_PutApi202210ExternalLineItemProductButtonsByLineItemIdProductButtonId + parameters: + - description: Long external id of the associated line item + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + - description: Sequential id of the product button + explode: false + in: path + name: product-button-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductButtonRequest' + description: Details of the updated product button + x-nullable: false + x-bodyName: productButton + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProductButtonListResponse' + description: Success + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json + /preview/retail-media/preferred-line-items/{line-item-id}: + get: + description: Gets the preferred line item for the given line item id + operationId: GetApiV2ExternalPreferredLineItemByLineItemId + parameters: + - description: The given line item id + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PreferredLineItemV2Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/PreferredLineItemV2Response' + description: Bad Request + tags: + - Campaign + x-accepts: application/json + put: + description: Updates the preferred line item for the given line item id + operationId: LineItemsApi_PutApi202110ExternalPreferredLineItemByLineItemId + parameters: + - description: The given line item id + explode: false + in: path + name: line-item-id + required: true + schema: + type: string + style: simple + x-nullable: false + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PreferredLineItemUpdateModelV2Request' + description: The line item settings to create a line item with + required: true + x-nullable: false + x-bodyName: lineItem + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/PreferredLineItemV2Response' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/PreferredLineItemV2Response' + description: Bad Request + tags: + - Campaign + x-content-type: application/json + x-accepts: application/json +components: + schemas: + GrantConsentInput: + description: An object that encapsulates GrantConsentModel + example: + data: + attributes: + callbackState: callbackState + clientId: clientId + callbackUrl: callbackUrl + type: type + properties: + data: + $ref: '#/components/schemas/GrantConsentModelValueResource' + type: object + GrantConsentModelValueResource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + callbackState: callbackState + clientId: clientId + callbackUrl: callbackUrl + type: type + properties: + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/GrantConsentModel' + type: object + GrantConsentModel: + description: An object that represents the required (ClientId and CallbackUrl) + and optional (CallbackState) parameters when granting consents on behalf of + a Private Market demand account example: callbackState: callbackState clientId: clientId @@ -3094,7 +3664,7 @@ components: identifiers: - identifiers - identifiers - identifierType: email + identifierType: Email operation: add type: AddRemoveContactlist properties: @@ -3265,7 +3835,7 @@ components: identifiers: - identifiers - identifiers - identifierType: email + identifierType: Email operation: add type: AddRemoveContactlist properties: @@ -3280,7 +3850,8 @@ components: - attributes type: object ApplicationSummaryModelResponse: - description: Response of ApplicationSummaryModel + description: A top-level object that encapsulates a Criteo API response for + a single value example: data: attributes: @@ -3341,17 +3912,16 @@ components: nullable: true readOnly: true type: array - uniqueItems: false errors: items: $ref: '#/components/schemas/CommonProblem' nullable: true readOnly: true type: array - uniqueItems: false type: object ApplicationSummaryModelResource: - description: A class that represents a ValueType in a guild compliant way + description: A top-level object that encapsulates a Criteo API response for + a single value example: attributes: organizationId: 6 @@ -3368,7 +3938,7 @@ components: $ref: '#/components/schemas/ApplicationSummaryModel' type: object CommonProblem: - description: Common problem object. Can be specialized as needed. + description: Common problem object. example: traceId: traceId traceIdentifier: traceIdentifier @@ -3404,7 +3974,7 @@ components: nullable: true type: string code: - description: "A machine-readable error code, expressed as a string value." + description: "A machine-readable error code, expressed as a string value." nullable: true type: string instance: @@ -3432,7 +4002,8 @@ components: type: string type: object ApplicationSummaryModel: - description: Model of ApplicationSummary + description: Used for the /me endpoint. Contains information about the currently + authenticated application that we accept to give to our clients example: organizationId: 6 name: name @@ -5095,8 +5666,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false JsonApiPageResponseOfBrand: description: A wrapper class to return a single page of with metadata @@ -5175,8 +5746,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false JsonApiPageResponseOfRetailer: description: A wrapper class to return a single page of with metadata @@ -5261,8 +5832,8 @@ components: x-nullable: false required: - data + - metadata type: object - x-nullable: false PageMetadata: description: Metadata related to the current request example: @@ -5301,7 +5872,6 @@ components: - currentPageIndex - currentPageSize type: object - x-nullable: false CommonError: description: A JSON:API Common error structure example: @@ -5367,7 +5937,6 @@ components: type: string x-nullable: false type: object - x-nullable: false CommonWarning: description: A JSON:API Base common warning example: @@ -5433,7 +6002,6 @@ components: type: string x-nullable: false type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndAccountAndAccount: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -5465,7 +6033,6 @@ components: - id - type type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndBrandAndBrand: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -5488,7 +6055,6 @@ components: - id - type type: object - x-nullable: false JsonApiBodyWithIdOfInt64AndRetailerAndRetailer: description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" @@ -5514,7 +6080,6 @@ components: - id - type type: object - x-nullable: false ExternalAccount: description: A Retail Media Account used to launch campaigns and line items example: @@ -5552,7 +6117,6 @@ components: countries: items: type: string - x-nullable: false type: array x-nullable: false currency: @@ -5569,6 +6133,7 @@ components: companyName: nullable: true type: string + x-nullable: true required: - countries - currency @@ -5577,7 +6142,6 @@ components: - timeZone - type type: object - x-nullable: false ExternalBrand: description: A Retail Media Brand used to represent a collection of products sold under the same umbrella name @@ -5592,7 +6156,6 @@ components: required: - name type: object - x-nullable: false ExternalRetailer: description: A Retail Media Retailer used to represent a selection of products from multiple brands @@ -5613,13 +6176,354 @@ components: - auction - preferred type: string - x-nullable: false type: array - x-nullable: false - required: - - name + x-nullable: false + required: + - name + type: object + RmAudienceSegmentEntityV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities + example: + data: + - attributes: + accountId: accountId + createdAt: 2000-01-23T04:56:07.000+00:00 + contactList: + isReadOnly: true + type: Unknown + channels: + - Unknown + - Unknown + name: name + description: description + retailerId: retailerId + type: Unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + - attributes: + accountId: accountId + createdAt: 2000-01-23T04:56:07.000+00:00 + contactList: + isReadOnly: true + type: Unknown + channels: + - Unknown + - Unknown + name: name + description: description + retailerId: retailerId + type: Unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/RmAudienceSegmentEntityV1Resource' + nullable: true + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + RmAudienceSegmentIdEntityV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities + example: + data: + - attributes: "{}" + id: id + type: type + - attributes: "{}" + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + items: + $ref: '#/components/schemas/RmAudienceSegmentIdEntityV1Resource' + nullable: true + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse: + description: A top-level object that encapsulates a Criteo API response for + several entities and metadata + example: + data: + - attributes: + accountId: accountId + createdAt: 2000-01-23T04:56:07.000+00:00 + contactList: + isReadOnly: true + type: Unknown + channels: + - Unknown + - Unknown + name: name + description: description + retailerId: retailerId + type: Unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + - attributes: + accountId: accountId + createdAt: 2000-01-23T04:56:07.000+00:00 + contactList: + isReadOnly: true + type: Unknown + channels: + - Unknown + - Unknown + name: name + description: description + retailerId: retailerId + type: Unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + meta: + totalItems: 0 + offset: 1 + limit: 6 + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + meta: + $ref: '#/components/schemas/RmAudienceSegmentSearchMetadataV1' + data: + items: + $ref: '#/components/schemas/RmAudienceSegmentEntityV1Resource' + nullable: true + type: array + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + type: object + RmContactListStatisticsEntityV1Response: + description: A top-level object that encapsulates a Criteo API response for + a single entity + example: + data: + attributes: + numberOfIdentifiers: 0 + matchRate: 1.4658129805029452 + numberOfMatches: 6 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/RmContactListStatisticsEntityV1Resource' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array + errors: + items: + $ref: '#/components/schemas/CommonProblem' + nullable: true + readOnly: true + type: array type: object - x-nullable: false RmLegacyAudienceGetEntityV1ListResponse: description: A top-level object that encapsulates a Criteo API response for several entities and metadata @@ -5846,6 +6750,184 @@ components: readOnly: true type: array type: object + RmAudienceSegmentBulkUpdateInputV1: + description: Input to update one or more segments. + example: + data: + - attributes: + contactList: "{}" + name: name + description: + value: value + id: id + type: type + - attributes: + contactList: "{}" + name: name + description: + value: value + id: id + type: type + properties: + data: + items: + $ref: '#/components/schemas/RmAudienceSegmentUpdateEntityV1Resource' + nullable: true + type: array + type: object + RmAudienceSegmentBulkCreateInputV1: + description: Input to create one or more audience segments. + example: + data: + - attributes: + contactList: + identifierType: Email + name: name + description: description + retailerId: retailerId + type: type + - attributes: + contactList: + identifierType: Email + name: name + description: description + retailerId: retailerId + type: type + properties: + data: + items: + $ref: '#/components/schemas/RmAudienceSegmentCreateEntityV1Resource' + nullable: true + type: array + type: object + RmAudienceSegmentBulkDeleteInputV1: + description: Input to delete one or more segments. + example: + data: + - attributes: "{}" + id: id + type: type + - attributes: "{}" + id: id + type: type + properties: + data: + items: + $ref: '#/components/schemas/RmAudienceSegmentDeleteEntityV1Resource' + nullable: true + type: array + type: object + RmAudienceSegmentSearchInputV1: + description: Audience segment search parameter + example: + data: + attributes: + audienceSegmentIds: + - audienceSegmentIds + - audienceSegmentIds + retailerIds: + - retailerIds + - retailerIds + type: type + properties: + data: + $ref: '#/components/schemas/RmAudienceSegmentSearchEntityV1Resource' + type: object + RmAudienceSegmentEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + accountId: accountId + createdAt: 2000-01-23T04:56:07.000+00:00 + contactList: + isReadOnly: true + type: Unknown + channels: + - Unknown + - Unknown + name: name + description: description + retailerId: retailerId + type: Unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/RmAudienceSegmentEntityV1' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + RmAudienceSegmentIdEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: "{}" + id: id + type: type + properties: + attributes: + description: Audience Segment entity only with its ID + type: object + x-criteo-canonical: + infoType: entity + name: RetailMediaAudienceSegment + version: v1 + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + RmAudienceSegmentSearchMetadataV1: + description: Metadata for the audience segment search response. + example: + totalItems: 0 + offset: 1 + limit: 6 + properties: + totalItems: + description: Total number of items + format: int32 + nullable: true + type: integer + limit: + description: Max item of the current page + format: int32 + nullable: true + type: integer + offset: + description: Number of item to skip + format: int32 + nullable: true + type: integer + type: object + RmContactListStatisticsEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + numberOfIdentifiers: 0 + matchRate: 1.4658129805029452 + numberOfMatches: 6 + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/RmContactListStatisticsEntityV1' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object RmLegacyAudienceGetEntityV1Resource: description: A class that represents a domain entity exposed by an API example: @@ -5871,61 +6953,243 @@ components: id: nullable: true type: string - audienceType: - enum: - - customerList - - userBehavior + audienceType: + enum: + - customerList + - userBehavior + nullable: true + type: string + type: + nullable: true + type: string + type: object + RmLegacyAudienceGetEntityV2Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + customerListDetails: + size: size + isShared: true + name: name + retailerId: retailerId + userBehaviorDetails: + inclusiveSegment: + userAction: buy + categoryIds: + - 0 + - 0 + minPrice: 1.4658129805029452 + maxPrice: 5.962133916683182 + brandIds: + - 6 + - 6 + lookbackWindow: P7D + exclusiveSegment: + userAction: buy + categoryIds: + - 0 + - 0 + minPrice: 1.4658129805029452 + maxPrice: 5.962133916683182 + brandIds: + - 6 + - 6 + lookbackWindow: P7D + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/RmLegacyAudienceGetEntityV2' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + RmAudienceSegmentUpdateEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: + contactList: "{}" + name: name + description: + value: value + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/RmAudienceSegmentUpdateEntityV1' + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + RmAudienceSegmentCreateEntityV1Resource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + contactList: + identifierType: Email + name: name + description: description + retailerId: retailerId + type: type + properties: + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/RmAudienceSegmentCreateEntityV1' + type: object + RmAudienceSegmentDeleteEntityV1Resource: + description: A class that represents a domain entity exposed by an API + example: + attributes: "{}" + id: id + type: type + properties: + attributes: + description: Segment to delete + type: object + x-criteo-canonical: + infoType: entity + name: RetailMediaAudienceSegment + version: v1 + id: + description: Id of the entity + nullable: true + type: string + type: + nullable: true + type: string + type: object + RmAudienceSegmentSearchEntityV1Resource: + description: A top-level object that encapsulates a Criteo API response for + a single value + example: + attributes: + audienceSegmentIds: + - audienceSegmentIds + - audienceSegmentIds + retailerIds: + - retailerIds + - retailerIds + type: type + properties: + type: + nullable: true + type: string + attributes: + $ref: '#/components/schemas/RmAudienceSegmentSearchEntityV1' + type: object + RmAudienceSegmentEntityV1: + description: Set of rules that defines specific people to target. + example: + accountId: accountId + createdAt: 2000-01-23T04:56:07.000+00:00 + contactList: + isReadOnly: true + type: Unknown + channels: + - Unknown + - Unknown + name: name + description: description + retailerId: retailerId + type: Unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + accountId: + description: Account associated to the segment + nullable: true + type: string + name: + description: Name of the segment + nullable: true + type: string + description: + description: Description of the segment + nullable: true + type: string + retailerId: + description: Retailer associated to the segment nullable: true type: string type: + description: Type of segment (read-only) + enum: + - Unknown + - ContactList + nullable: true + type: string + createdAt: + description: ISO-8601 timestamp in UTC of segment creation (read-only) + format: date-time + nullable: true + type: string + updatedAt: + description: ISO-8601 timestamp in UTC of segment update (read-only) + format: date-time nullable: true type: string + contactList: + $ref: '#/components/schemas/RmContactListV1' + channels: + description: Channels associated to the segment (read-only) + items: + enum: + - Unknown + - Onsite + - Offsite + type: string + nullable: true + type: array type: object - RmLegacyAudienceGetEntityV2Resource: - description: A class that represents a domain entity exposed by an API + x-criteo-canonical: + infoType: entity + name: RetailMediaAudienceSegment + version: v1 + RmAudienceSegmentIdEntityV1: + description: Audience Segment entity only with its ID + type: object + x-criteo-canonical: + infoType: entity + name: RetailMediaAudienceSegment + version: v1 + RmContactListStatisticsEntityV1: + description: Contact list statistics. example: - attributes: - customerListDetails: - size: size - isShared: true - name: name - retailerId: retailerId - userBehaviorDetails: - inclusiveSegment: - userAction: buy - categoryIds: - - 0 - - 0 - minPrice: 1.4658129805029452 - maxPrice: 5.962133916683182 - brandIds: - - 6 - - 6 - lookbackWindow: P7D - exclusiveSegment: - userAction: buy - categoryIds: - - 0 - - 0 - minPrice: 1.4658129805029452 - maxPrice: 5.962133916683182 - brandIds: - - 6 - - 6 - lookbackWindow: P7D - id: id - type: type + numberOfIdentifiers: 0 + matchRate: 1.4658129805029452 + numberOfMatches: 6 properties: - attributes: - $ref: '#/components/schemas/RmLegacyAudienceGetEntityV2' - id: - description: Id of the entity + numberOfIdentifiers: + description: Number of identifiers in the contact list. + format: int32 nullable: true - type: string - type: + type: integer + numberOfMatches: + description: Number of matched identifiers in the contact list. + format: int32 nullable: true - type: string + type: integer + matchRate: + description: "Percentage of matched identifiers in the contact list.\r\n\ + Can differ from matches/identifiers depending on the contact list type." + format: double + nullable: true + type: number type: object + x-criteo-canonical: + infoType: entity + name: ContactListStatistics + version: v1 RmLegacyAudienceGetEntityV1: description: Audience definition of people of interest for a marketer. example: @@ -6010,6 +7274,104 @@ components: infoType: entity name: RetailMediaAudience version: v1 + RmAudienceSegmentUpdateEntityV1: + description: Set of rules that defines specific people to target. + example: + contactList: "{}" + name: name + description: + value: value + properties: + name: + description: Name of the segment + nullable: true + type: string + description: + $ref: '#/components/schemas/NillableString' + contactList: + description: Settings to update the contact list of the segment + type: object + type: object + x-criteo-canonical: + infoType: entity + name: RetailMediaAudienceSegment + version: v1 + RmAudienceSegmentCreateEntityV1: + description: Set of rules that defines specific people to target. + example: + contactList: + identifierType: Email + name: name + description: description + retailerId: retailerId + properties: + name: + description: Name of the segment + nullable: true + type: string + description: + description: Description of the segment + nullable: true + type: string + retailerId: + description: Retailer associated to the segment + nullable: true + type: string + contactList: + $ref: '#/components/schemas/RmContactListCreateV1' + type: object + RmAudienceSegmentDeleteEntityV1: + description: Segment to delete + type: object + x-criteo-canonical: + infoType: entity + name: RetailMediaAudienceSegment + version: v1 + RmAudienceSegmentSearchEntityV1: + description: "Available filters to perform a search on audience segments. If\ + \ present, the filters are AND'ed together when applied." + example: + audienceSegmentIds: + - audienceSegmentIds + - audienceSegmentIds + retailerIds: + - retailerIds + - retailerIds + properties: + audienceSegmentIds: + description: List of segment ids + items: + type: string + nullable: true + type: array + retailerIds: + description: List of retailer ids + items: + type: string + nullable: true + type: array + type: object + RmContactListV1: + description: Settings to target users with your contact lists. + example: + isReadOnly: true + type: Unknown + properties: + isReadOnly: + description: Is the segment read-only + nullable: true + type: boolean + type: + description: Indicates contact list type + enum: + - Unknown + - Email + - UserIdentifier + - IdentityLink + - CustomerId + nullable: true + type: string + type: object RmLegacySegmentUserBehaviorV1: description: Audience definition of people based on what they visited example: @@ -6107,6 +7469,36 @@ components: required: - inclusiveSegment type: object + NillableString: + description: Placeholder object for string value for which "null" is a valid + business value + example: + value: value + properties: + value: + description: The string's value. If missing or null the string's value is + set to "null" + nullable: true + type: string + type: object + RmContactListUpdateV1: + description: Settings to update the contact list of the segment + type: object + RmContactListCreateV1: + description: Settings to target users with your contact lists. + example: + identifierType: Email + properties: + identifierType: + description: Indicates contact list type + enum: + - Email + - UserIdentifier + - IdentityLink + - CustomerId + nullable: true + type: string + type: object RmLegacySegmentUserBehaviorV2: description: Audience definition of people based on what they visited example: @@ -7366,6 +8758,76 @@ components: type: array type: object x-nullable: true + JsonApiSingleResponseOfCatalogStatus: + description: A JSON:API wrapper class to add one JSON:API within a data property + example: + data: + attributes: + fileSizeBytes: 6 + md5Checksum: md5Checksum + createdAt: 2000-01-23T04:56:07.000+00:00 + currency: currency + rowCount: 0 + message: message + status: unknown + id: id + type: type + warnings: + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus' + errors: + items: + $ref: '#/components/schemas/CommonError' + type: array + x-nullable: false + warnings: + items: + $ref: '#/components/schemas/CommonWarning' + type: array + x-nullable: false + required: + - data + type: object + x-nullable: false SkuDataPreviewListResponse: description: Data model for a list of response resources example: @@ -8127,6 +9589,23 @@ components: - templateVariableValues type: object x-nullable: false + JsonApiRequestOfSellerCatalogRequest: + description: "A JSON:API wrapper class to format a with Type, and Attributes properties" + example: + data: + attributes: + sellers: + - sellerId: sellerId + retailerId: retailerId + - sellerId: sellerId + retailerId: retailerId + type: type + properties: + data: + $ref: '#/components/schemas/JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest' + type: object + x-nullable: true SkuSearchRequestPreviewRequest: description: Data model for an input resource example: @@ -8260,11 +9739,40 @@ components: nullable: true type: string type: - description: Canonical type name of the entity - nullable: true + description: Canonical type name of the entity + nullable: true + type: string + type: object + x-nullable: true + JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus: + description: "A JSON:API wrapper class to format a with external Id, Type, and\r\nAttributes properties" + example: + attributes: + fileSizeBytes: 6 + md5Checksum: md5Checksum + createdAt: 2000-01-23T04:56:07.000+00:00 + currency: currency + rowCount: 0 + message: message + status: unknown + id: id + type: type + properties: + id: + format: long-id + type: string + x-nullable: false + type: type: string + x-nullable: false + attributes: + $ref: '#/components/schemas/ExternalCatalogStatus' + required: + - id + - type type: object - x-nullable: true + x-nullable: false ResourceOfSkuDataPreview: description: Data model for a Resource example: @@ -8570,6 +10078,26 @@ components: - id type: object x-nullable: false + JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest: + description: "A JSON:API wrapper class to format a with Type, and\r\nAttributes properties" + example: + attributes: + sellers: + - sellerId: sellerId + retailerId: retailerId + - sellerId: sellerId + retailerId: retailerId + type: type + properties: + type: + type: string + attributes: + $ref: '#/components/schemas/SellerCatalogRequest' + required: + - type + type: object + x-nullable: false ResourceOfSkuSearchRequestPreview: description: Data model for a Resource example: @@ -8792,6 +10320,74 @@ components: - updatedAt type: object x-nullable: false + ExternalCatalogStatus: + description: The status of an asynchronous request to generate a catalog + example: + fileSizeBytes: 6 + md5Checksum: md5Checksum + createdAt: 2000-01-23T04:56:07.000+00:00 + currency: currency + rowCount: 0 + message: message + status: unknown + properties: + status: + description: An enumeration of the status of the catalog. + enum: + - unknown + - pending + - success + - failure + - expired + type: string + x-nullable: false + currency: + description: An ISO4217 representation of the currency products are listed + under in this catalog. + type: string + x-nullable: false + rowCount: + description: "An indication of the number of products contained in this\ + \ catalog. Available when\r\nthis catalog reaches a success status." + format: int32 + nullable: true + type: integer + x-nullable: true + fileSizeBytes: + description: The size of this catalog in bytes. Available when this catalog + reaches a success status. + format: int32 + nullable: true + type: integer + x-nullable: true + md5Checksum: + description: "An MD5 checksum of the catalog for use in confirming complete\ + \ and uncorrupted retrieval.\r\nAvailable when this catalog reaches a\ + \ success status." + nullable: true + type: string + x-nullable: true + createdAt: + description: The time this catalog was created. Represented as a UTC ISO8601 + string. + format: date-time + type: string + x-nullable: false + message: + description: An optional information message intended for developer consumption. + nullable: true + type: string + x-nullable: true + required: + - createdAt + - currency + - fileSizeBytes + - md5Checksum + - message + - rowCount + - status + type: object + x-nullable: false SkuDataPreview: description: Metadata and usage info of a sku search example: @@ -8922,7 +10518,7 @@ components: required: - brandId - brandName - - id + - categoryId - isInStock - price - retailerId @@ -9021,9 +10617,9 @@ components: type: string x-nullable: false required: + - categoryId - globalBrandId - globalBrandName - - id - isInStock - price - updatedAt @@ -9093,7 +10689,6 @@ components: type: string x-nullable: false required: - - id - isInStock - price - updatedAt @@ -9305,6 +10900,23 @@ components: - width type: object x-nullable: false + SellerCatalogRequest: + description: Used to requst a catalog of seller SKUs + example: + sellers: + - sellerId: sellerId + retailerId: retailerId + - sellerId: sellerId + retailerId: retailerId + properties: + sellers: + description: A list of sellers to restict the catalog to. + items: + $ref: '#/components/schemas/SellerIdentifier' + nullable: true + type: array + type: object + x-nullable: true SkuSearchRequestPreview: description: A request for sku by sellers or brands. example: @@ -9525,6 +11137,23 @@ components: - text type: object x-nullable: false + SellerIdentifier: + description: Identifies a Unique Seller + example: + sellerId: sellerId + retailerId: retailerId + properties: + retailerId: + description: The retailer Id that the seller operates under + type: string + sellerId: + description: The id for the seller based on the corresponding retailer + type: string + required: + - retailerId + - sellerId + type: object + x-nullable: false AsyncReportResponse: description: Async Report response format example: @@ -10399,6 +12028,8 @@ components: - salesChannel - environment - pageTypeName + - pageCategory + - taxonomyBreadcrumb - keyword - searchTerm type: string @@ -10574,6 +12205,8 @@ components: - salesChannel - environment - pageTypeName + - pageCategory + - taxonomyBreadcrumb - keyword - searchTerm type: string @@ -10748,6 +12381,8 @@ components: - salesChannel - environment - pageTypeName + - pageCategory + - taxonomyBreadcrumb - keyword - searchTerm type: string @@ -11049,6 +12684,8 @@ components: - salesChannel - environment - pageTypeName + - pageCategory + - taxonomyBreadcrumb - keyword - searchTerm type: string @@ -11220,6 +12857,8 @@ components: - salesChannel - environment - pageTypeName + - pageCategory + - taxonomyBreadcrumb - keyword - searchTerm type: string @@ -11274,174 +12913,41 @@ components: - endDate - startDate type: object - ValueResourceOfRetailMediaBrands: - additionalProperties: false - description: A top-level object that encapsulates a Criteo API response for - a single value. - example: - attributes: - brandIds: - - 0 - - 0 - type: type - properties: - type: - nullable: true - type: string - attributes: - $ref: '#/components/schemas/RetailMediaBrands' - type: object - ResourceOutcomeOfRetailMediaAccount: - additionalProperties: false - description: A top-level object that encapsulates a Criteo API response for - a single entity. - example: - data: - attributes: - companyName: companyName - parentAccountLabel: parentAccountLabel - name: name - countryIds: - - countryIds - - countryIds - timeZone: timeZone - subType: Unknown - type: Unknown - currencyId: currencyId - id: id - type: type - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - properties: - data: - $ref: '#/components/schemas/ResourceOfRetailMediaAccount' - warnings: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - errors: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - type: object - ValueResourceCollectionOutcomeOfRetailMediaSeller: + PageOfBalanceHistoryChangeDataCaptureV1: additionalProperties: false - description: A top-level object that encapsulates a Criteo API response for - several values. + description: A wrapper class to return a single page of items with metadata. example: data: - - attributes: - sellerId: sellerId - retailerId: 0 - type: type - - attributes: - sellerId: sellerId - retailerId: 0 - type: type - warnings: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - errors: - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title - - traceId: traceId - traceIdentifier: traceIdentifier - code: code - instance: instance - detail: detail - source: - key: source - stackTrace: stackTrace - type: unknown - title: title + - dateOfModification: 2000-01-23T04:56:07.000+00:00 + modifiedByUser: modifiedByUser + changeType: BalanceCreated + memo: memo + changeDetails: + changeValue: changeValue + previousValue: previousValue + currentValue: currentValue + - dateOfModification: 2000-01-23T04:56:07.000+00:00 + modifiedByUser: modifiedByUser + changeType: BalanceCreated + memo: memo + changeDetails: + changeValue: changeValue + previousValue: previousValue + currentValue: currentValue + meta: + offset: 6 + count: 0 + limit: 1 properties: + meta: + $ref: '#/components/schemas/Metadata' data: items: - $ref: '#/components/schemas/ValueResourceOfRetailMediaSeller' - nullable: true - type: array - warnings: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true - type: array - errors: - items: - $ref: '#/components/schemas/CommonProblem' - nullable: true - readOnly: true + $ref: '#/components/schemas/BalanceHistoryChangeDataCaptureV1' type: array + required: + - data + - meta type: object ValueResourceOutcomeOfCampaignBudgetOverrides: additionalProperties: false @@ -11630,7 +13136,7 @@ components: readOnly: true type: array type: object - PageOfInsertionOrderHistoryChangeDataCapture: + PageOfInsertionOrderHistoryChangeDataCaptureV2: additionalProperties: false description: A wrapper class to return a single page of items with metadata. example: @@ -11660,7 +13166,7 @@ components: $ref: '#/components/schemas/Metadata' data: items: - $ref: '#/components/schemas/InsertionOrderHistoryChangeDataCapture' + $ref: '#/components/schemas/InsertionOrderHistoryChangeDataCaptureV2' type: array required: - data @@ -11836,78 +13342,6 @@ components: readOnly: true type: array type: object - ValueResourceInputOfRetailMediaBrands: - additionalProperties: false - description: A top-level object that encapsulates a Criteo API request for a - single value. - example: - data: - attributes: - brandIds: - - 0 - - 0 - type: type - properties: - data: - $ref: '#/components/schemas/ValueResourceOfRetailMediaBrands' - type: object - ValueResourceInputOfRetailMediaBrandAccountCreation: - additionalProperties: false - description: A top-level object that encapsulates a Criteo API request for a - single value. - example: - data: - attributes: - brands: - - 0 - - 0 - companyName: companyName - name: name - type: type - properties: - data: - $ref: '#/components/schemas/ValueResourceOfRetailMediaBrandAccountCreation' - type: object - ValueResourceInputOfRetailMediaSellerAccountCreation: - additionalProperties: false - description: A top-level object that encapsulates a Criteo API request for a - single value. - example: - data: - attributes: - companyName: companyName - name: name - sellers: - - sellerId: sellerId - retailerId: 0 - - sellerId: sellerId - retailerId: 0 - type: type - properties: - data: - $ref: '#/components/schemas/ValueResourceOfRetailMediaSellerAccountCreation' - type: object - ValueResourceCollectionInputOfRetailMediaSeller: - additionalProperties: false - description: A top-level object that encapsulates a Criteo API request for several - values. - example: - data: - - attributes: - sellerId: sellerId - retailerId: 0 - type: type - - attributes: - sellerId: sellerId - retailerId: 0 - type: type - properties: - data: - items: - $ref: '#/components/schemas/ValueResourceOfRetailMediaSeller' - nullable: true - type: array - type: object ValueResourceInputOfCampaignBudgetOverrides: additionalProperties: false description: A top-level object that encapsulates a Criteo API request for a @@ -11984,64 +13418,76 @@ components: data: $ref: '#/components/schemas/ValueResourceOfLineItemBudgetOverrides' type: object - RetailMediaBrands: + Metadata: additionalProperties: false - description: A collection of brand ids + description: Metadata related to the current request. example: - brandIds: - - 0 - - 0 + offset: 6 + count: 0 + limit: 1 properties: - brandIds: - items: - format: int64 - type: integer + count: + format: int64 nullable: true - type: array + type: integer + offset: + description: The (zero-based) starting offset in the collection. + format: int32 + type: integer + limit: + description: The number of elements to be returned. + format: int32 + type: integer + required: + - limit + - offset type: object - ResourceOfRetailMediaAccount: + BalanceHistoryChangeDataCaptureV1: additionalProperties: false - description: A class that represents a domain entity exposed by an API. + description: Data model represents the data change capture of balance history. example: - attributes: - companyName: companyName - parentAccountLabel: parentAccountLabel - name: name - countryIds: - - countryIds - - countryIds - timeZone: timeZone - subType: Unknown - type: Unknown - currencyId: currencyId - id: id - type: type + dateOfModification: 2000-01-23T04:56:07.000+00:00 + modifiedByUser: modifiedByUser + changeType: BalanceCreated + memo: memo + changeDetails: + changeValue: changeValue + previousValue: previousValue + currentValue: currentValue properties: - attributes: - $ref: '#/components/schemas/RetailMediaAccount' - id: - description: Unique identifier of this resource. - nullable: true + dateOfModification: + description: Date when data change has occured. + format: date-time type: string - type: - nullable: true + modifiedByUser: + description: Username who modified the insertion order. type: string - type: object - ValueResourceOfRetailMediaSeller: - additionalProperties: false - description: A top-level object that encapsulates a Criteo API response for - a single value. - example: - attributes: - sellerId: sellerId - retailerId: 0 - type: type - properties: - type: + changeType: + description: Represent the type of change states of the history. + enum: + - BalanceCreated + - BalanceAdded + - BalanceRemoved + - BalanceUncapped + - BalanceCapped + - EndDate + - StartDate + - BalanceName + - PoNumber + - ValueAdd + - Unknown + type: string + changeDetails: + $ref: '#/components/schemas/ChangeDetailsV1' + memo: + description: Memo associate with the insertion order modification. nullable: true type: string - attributes: - $ref: '#/components/schemas/RetailMediaSeller' + required: + - changeDetails + - changeType + - dateOfModification + - modifiedByUser type: object ValueResourceOfCampaignBudgetOverrides: additionalProperties: false @@ -12108,31 +13554,7 @@ components: nullable: true type: string type: object - Metadata: - additionalProperties: false - description: Metadata related to the current request. - example: - offset: 6 - count: 0 - limit: 1 - properties: - count: - format: int64 - nullable: true - type: integer - offset: - description: The (zero-based) starting offset in the collection. - format: int32 - type: integer - limit: - description: The number of elements to be returned. - format: int32 - type: integer - required: - - limit - - offset - type: object - InsertionOrderHistoryChangeDataCapture: + InsertionOrderHistoryChangeDataCaptureV2: additionalProperties: false description: Data model represents the data change capture of insertion order history. @@ -12151,7 +13573,7 @@ components: format: date-time type: string modifiedByUser: - description: User name who modified the insertion order. + description: Username who modified the insertion order. type: string changeType: description: Represent the type of change states of the history. @@ -12166,10 +13588,10 @@ components: - BalanceName - PoNumber - ValueAdd - - SalesforceId + - Unknown type: string changeDetails: - $ref: '#/components/schemas/ChangeDetails' + $ref: '#/components/schemas/ChangeDetailsV2' memo: description: Memo associate with the insertion order modification. nullable: true @@ -12246,46 +13668,6 @@ components: attributes: $ref: '#/components/schemas/LineItemBudgetOverrides' type: object - ValueResourceOfRetailMediaBrandAccountCreation: - additionalProperties: false - description: A top-level object that encapsulates a Criteo API response for - a single value. - example: - attributes: - brands: - - 0 - - 0 - companyName: companyName - name: name - type: type - properties: - type: - nullable: true - type: string - attributes: - $ref: '#/components/schemas/RetailMediaBrandAccountCreation' - type: object - ValueResourceOfRetailMediaSellerAccountCreation: - additionalProperties: false - description: A top-level object that encapsulates a Criteo API response for - a single value. - example: - attributes: - companyName: companyName - name: name - sellers: - - sellerId: sellerId - retailerId: 0 - - sellerId: sellerId - retailerId: 0 - type: type - properties: - type: - nullable: true - type: string - attributes: - $ref: '#/components/schemas/RetailMediaSellerAccountCreation' - type: object SkuSearchRequestBody: additionalProperties: false description: defines the type product Id to search and list of ids to be searched @@ -12306,90 +13688,39 @@ components: - SkuId - ParentId type: string - queryIds: - description: list of product ids to search for - items: - type: string - type: array - required: - - productIdType - - queryIds - type: object - RetailMediaAccount: - additionalProperties: false - description: The details for a newly created account - example: - companyName: companyName - parentAccountLabel: parentAccountLabel - name: name - countryIds: - - countryIds - - countryIds - timeZone: timeZone - subType: Unknown - type: Unknown - currencyId: currencyId - properties: - name: - description: account name - nullable: true - type: string - companyName: - description: Display name for reporting the owning entity of ads for the - Digital Services Act in the European Union - nullable: true - type: string - type: - description: Type for the account - enum: - - Unknown - - Supply - - Demand - nullable: true - type: string - subType: - description: subtype for the account - enum: - - Unknown - - Brand - - Seller - nullable: true - type: string - countryIds: - description: list of countries associated with the account + queryIds: + description: list of product ids to search for items: type: string - nullable: true type: array - currencyId: - description: the currency for the account - nullable: true - type: string - parentAccountLabel: - description: parent account label for the account - nullable: true - type: string - timeZone: - description: the timezone for the account - nullable: true - type: string + required: + - productIdType + - queryIds type: object - RetailMediaSeller: + ChangeDetailsV1: additionalProperties: false - description: used to define the exact seller linked with an account + description: Change details of a property of the balance. example: - sellerId: sellerId - retailerId: 0 + changeValue: changeValue + previousValue: previousValue + currentValue: currentValue properties: - sellerId: - description: the seller id + previousValue: + description: Previous value of a property of the insertion order. nullable: true type: string - retailerId: - description: the retailer id - format: int32 + currentValue: + description: Current value of a property of the insertion order. nullable: true - type: integer + type: string + changeValue: + description: Change detail of a property of the insertion order. + nullable: true + type: string + required: + - changeValue + - currentValue + - previousValue type: object CampaignBudgetOverrides: additionalProperties: false @@ -12514,7 +13845,7 @@ components: nullable: true type: string type: object - ChangeDetails: + ChangeDetailsV2: additionalProperties: false description: Change details of a property of the insertion order. example: @@ -12616,63 +13947,6 @@ components: - dailyLineItemBudgetOverrides - monthlyLineItemBudgetOverrides type: object - RetailMediaBrandAccountCreation: - additionalProperties: false - description: the initial set up and configuration options for a new private - market demand brand account - example: - brands: - - 0 - - 0 - companyName: companyName - name: name - properties: - name: - description: "the name of the account, must be unique across all accounts" - nullable: true - type: string - companyName: - description: Display name for reporting the owning entity of ads for the - Digital Services Act in the European Union - nullable: true - type: string - brands: - description: list of brands to link to the new account - items: - format: int64 - type: integer - nullable: true - type: array - type: object - RetailMediaSellerAccountCreation: - additionalProperties: false - description: the initial set up and configuration options for a new private - market demand brand account - example: - companyName: companyName - name: name - sellers: - - sellerId: sellerId - retailerId: 0 - - sellerId: sellerId - retailerId: 0 - properties: - name: - description: "the name of the account, must be unique across all accounts" - nullable: true - type: string - companyName: - description: Display name for reporting the owning entity of ads for the - Digital Services Act in the European Union - nullable: true - type: string - sellers: - description: list of sellers to associate to the new account - items: - $ref: '#/components/schemas/RetailMediaSeller' - nullable: true - type: array - type: object CampaignMonthlyBudgetOverride: additionalProperties: false description: Campaign monthly budget override. @@ -12912,6 +14186,195 @@ components: nullable: true type: array type: object + PagedResourceCollectionOutcomeOfBalanceResponseV2: + description: Data model for a paged list of response resources + example: + metadata: + currentPageSize: 6 + previousPage: previousPage + nextPage: nextPage + totalPages: 5 + totalItemsAcrossAllPages: 0 + currentPageIndex: 1 + data: + - attributes: + privateMarketBillingType: notApplicable + endDate: endDate + deposited: 0.8008281904610115 + spent: 6.027456183070403 + memo: memo + spendType: Onsite + remaining: 1.4658129805029452 + createdAt: 2000-01-23T04:56:07.000+00:00 + balanceType: unknown + name: name + poNumber: poNumber + startDate: startDate + status: unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + - attributes: + privateMarketBillingType: notApplicable + endDate: endDate + deposited: 0.8008281904610115 + spent: 6.027456183070403 + memo: memo + spendType: Onsite + remaining: 1.4658129805029452 + createdAt: 2000-01-23T04:56:07.000+00:00 + balanceType: unknown + name: name + poNumber: poNumber + startDate: startDate + status: unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + metadata: + $ref: '#/components/schemas/PageMetadata' + data: + items: + $ref: '#/components/schemas/ResourceOfBalanceResponseV2' + type: array + x-nullable: false + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + readOnly: true + type: array + x-nullable: false + errors: + items: + $ref: '#/components/schemas/CommonProblem' + readOnly: true + type: array + x-nullable: false + type: object + BalanceResponseV2Response: + description: A top-level object that encapsulates a Criteo API response for + a single entity + example: + data: + attributes: + privateMarketBillingType: notApplicable + endDate: endDate + deposited: 0.8008281904610115 + spent: 6.027456183070403 + memo: memo + spendType: Onsite + remaining: 1.4658129805029452 + createdAt: 2000-01-23T04:56:07.000+00:00 + balanceType: unknown + name: name + poNumber: poNumber + startDate: startDate + status: unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + warnings: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + errors: + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + - traceId: traceId + traceIdentifier: traceIdentifier + code: code + instance: instance + detail: detail + source: + key: source + stackTrace: stackTrace + type: unknown + title: title + properties: + data: + $ref: '#/components/schemas/ResourceOfBalanceResponseV2' + warnings: + items: + $ref: '#/components/schemas/CommonProblem' + readOnly: true + type: array + x-nullable: false + errors: + items: + $ref: '#/components/schemas/CommonProblem' + readOnly: true + type: array + x-nullable: false + type: object + x-nullable: true PreferredLineItemV2PagedListResponse: description: Data model for a paged list of response resources example: @@ -13375,7 +14838,73 @@ components: type: array x-nullable: false type: object - x-nullable: false + x-nullable: false + CreateBalanceV2Request: + description: A top-level object that encapsulates a Criteo API request for a + single entity + example: + data: + attributes: + endDate: endDate + deposited: 0.8008281904610115 + name: name + memo: memo + poNumber: poNumber + spendType: Onsite + startDate: startDate + id: id + type: type + properties: + data: + $ref: '#/components/schemas/ResourceOfCreateBalanceV2' + type: object + UpdateBalanceModelV2Request: + description: A top-level object that encapsulates a Criteo API request for a + single entity + example: + data: + attributes: + endDate: endDate + name: name + memo: memo + poNumber: poNumber + startDate: startDate + id: id + type: type + properties: + data: + $ref: '#/components/schemas/ResourceOfUpdateBalanceModelV2' + type: object + AddFundsToBalanceV2Request: + description: A top-level object that encapsulates a Criteo API request for a + single entity + example: + data: + attributes: + deltaAmount: 0.8008281904610115 + memo: memo + poNumber: poNumber + id: id + type: type + properties: + data: + $ref: '#/components/schemas/ResourceOfAddFundsToBalanceV2' + type: object + ChangeDatesOfBalanceV2Request: + description: A top-level object that encapsulates a Criteo API request for a + single entity + example: + data: + attributes: + endDate: endDate + memo: memo + startDate: startDate + id: id + type: type + properties: + data: + $ref: '#/components/schemas/ResourceOfChangeDatesOfBalanceV2' + type: object PreferredLineItemCreateModelV2Request: description: Data model for a create input resource example: @@ -13512,6 +15041,38 @@ components: $ref: '#/components/schemas/ResourceOfPreferredLineItemUpdateModelV2' type: object x-nullable: false + ResourceOfBalanceResponseV2: + description: A class that represents a domain entity exposed by an API + example: + attributes: + privateMarketBillingType: notApplicable + endDate: endDate + deposited: 0.8008281904610115 + spent: 6.027456183070403 + memo: memo + spendType: Onsite + remaining: 1.4658129805029452 + createdAt: 2000-01-23T04:56:07.000+00:00 + balanceType: unknown + name: name + poNumber: poNumber + startDate: startDate + status: unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/BalanceResponseV2' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + nullable: true + type: string + type: object ResourceOfPreferredLineItemV2: description: Data model for a Resource example: @@ -13644,6 +15205,96 @@ components: type: string type: object x-nullable: false + ResourceOfCreateBalanceV2: + description: A class that represents a domain entity exposed by an API + example: + attributes: + endDate: endDate + deposited: 0.8008281904610115 + name: name + memo: memo + poNumber: poNumber + spendType: Onsite + startDate: startDate + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/CreateBalanceV2' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + nullable: true + type: string + type: object + ResourceOfUpdateBalanceModelV2: + description: A class that represents a domain entity exposed by an API + example: + attributes: + endDate: endDate + name: name + memo: memo + poNumber: poNumber + startDate: startDate + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/UpdateBalanceModelV2' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + nullable: true + type: string + type: object + ResourceOfAddFundsToBalanceV2: + description: A class that represents a domain entity exposed by an API + example: + attributes: + deltaAmount: 0.8008281904610115 + memo: memo + poNumber: poNumber + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/AddFundsToBalanceV2' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + nullable: true + type: string + type: object + ResourceOfChangeDatesOfBalanceV2: + description: A class that represents a domain entity exposed by an API + example: + attributes: + endDate: endDate + memo: memo + startDate: startDate + id: id + type: type + properties: + attributes: + $ref: '#/components/schemas/ChangeDatesOfBalanceV2' + id: + description: Id of the entity + nullable: true + type: string + type: + description: Canonical type name of the entity + nullable: true + type: string + type: object InputResourceOfPreferredLineItemCreateModelV2: description: Data model for a Resource example: @@ -13742,6 +15393,117 @@ components: $ref: '#/components/schemas/ExternalPreferredLineItemUpdateModelV2' type: object x-nullable: false + BalanceResponseV2: + description: A Retail Media Balance used to determine the funds available for + any or all campaigns in an account + example: + privateMarketBillingType: notApplicable + endDate: endDate + deposited: 0.8008281904610115 + spent: 6.027456183070403 + memo: memo + spendType: Onsite + remaining: 1.4658129805029452 + createdAt: 2000-01-23T04:56:07.000+00:00 + balanceType: unknown + name: name + poNumber: poNumber + startDate: startDate + status: unknown + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + name: + description: Name of the balance. + type: string + x-nullable: false + poNumber: + description: Purchase Order number. + nullable: true + type: string + x-nullable: true + memo: + description: Memo. + nullable: true + type: string + x-nullable: true + deposited: + description: Amount of billable funds allotted to the balance. + format: decimal + nullable: true + type: number + x-nullable: true + spent: + description: Amount of spent funds of the balance. + format: decimal + nullable: true + type: number + x-nullable: true + remaining: + description: Amount of remaining funds of the balance. + format: decimal + nullable: true + type: number + x-nullable: true + startDate: + description: Start date of the balance in the format YYYY-MM-DD. + type: string + x-nullable: false + endDate: + description: End date of the balance in the format YYYY-MM-DD. + nullable: true + type: string + x-nullable: true + status: + description: Status of the balance. + enum: + - unknown + - scheduled + - active + - ended + type: string + x-nullable: false + createdAt: + description: Creation time of the balance. + format: date-time + type: string + x-nullable: false + updatedAt: + description: Update time of the balance. + format: date-time + type: string + x-nullable: false + balanceType: + description: Type of the balance. + enum: + - unknown + - capped + - uncapped + type: string + x-nullable: false + spendType: + description: Spend Type of the balance. + enum: + - Onsite + - Offsite + - OffsiteAwareness + type: string + x-nullable: false + privateMarketBillingType: + description: Billing type for Private Market of the balance. + enum: + - notApplicable + - billByRetailer + - billByCriteo + - unknown + type: string + x-nullable: false + required: + - balanceType + - name + - privateMarketBillingType + - spendType + - startDate + type: object ExternalPreferredLineItemV2: description: A Retail Media Preferred Line Item used to hold bid settings for one or many promoted products on a single retailer @@ -13782,15 +15544,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: description: Line Item Status Enum @@ -13982,6 +15740,143 @@ components: - skus type: object x-nullable: false + CreateBalanceV2: + description: An object that represents the available options to set when creating + a Retail Media Balance + example: + endDate: endDate + deposited: 0.8008281904610115 + name: name + memo: memo + poNumber: poNumber + spendType: Onsite + startDate: startDate + properties: + name: + description: Name of the balance. + type: string + x-nullable: false + poNumber: + description: Purchase Order number. + nullable: true + type: string + deposited: + description: Amount of billable funds allotted to the balance. + format: decimal + nullable: true + type: number + startDate: + description: Start date of the balance in the format YYYY-MM-DD. + type: string + x-nullable: false + endDate: + description: End date of the balance in the format YYYY-MM-DD. + nullable: true + type: string + spendType: + description: Type of the balance spend. + enum: + - Onsite + - Offsite + - OffsiteAwareness + type: string + x-nullable: false + memo: + description: Memo + nullable: true + type: string + required: + - name + - spendType + - startDate + type: object + UpdateBalanceModelV2: + description: An object that represents the available options to set when updating + a Retail Media Balance. + example: + endDate: endDate + name: name + memo: memo + poNumber: poNumber + startDate: startDate + properties: + name: + description: Name of the balance. + nullable: true + type: string + x-nullable: true + poNumber: + description: Purchase Order number. + nullable: true + type: string + x-nullable: true + startDate: + description: Start date of the balance in the format YYYY-MM-DD. + nullable: true + type: string + x-nullable: true + endDate: + description: End date of the balance in the format YYYY-MM-DD. + nullable: true + type: string + x-nullable: true + memo: + description: Memo. + nullable: true + type: string + x-nullable: true + type: object + AddFundsToBalanceV2: + description: An object that represents the available options of adding funds + to a balance. + example: + deltaAmount: 0.8008281904610115 + memo: memo + poNumber: poNumber + properties: + deltaAmount: + description: Amount of billable funds to be added / decreased allotted to + the balance. + format: decimal + type: number + x-nullable: false + poNumber: + description: Purchase Order number. + nullable: true + type: string + x-nullable: true + memo: + description: Memo + nullable: true + type: string + x-nullable: true + required: + - deltaAmount + type: object + ChangeDatesOfBalanceV2: + description: An object that represents the available options to modify schedule + of a balance. + example: + endDate: endDate + memo: memo + startDate: startDate + properties: + startDate: + description: Start date of the balance in the format YYYY-MM-DD. + nullable: true + type: string + x-nullable: true + endDate: + description: End date of the balance in the format YYYY-MM-DD. + nullable: true + type: string + x-nullable: true + memo: + description: Memo. + nullable: true + type: string + x-nullable: true + type: object ExternalPreferredLineItemCreateModelV2: description: Model used to create a preferred line item example: @@ -14016,15 +15911,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: description: Line Item Status Enum @@ -14145,15 +16036,11 @@ components: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string endDate: description: "Represents the Date as a year, month, and day in the format\ \ YYYY-MM-DD" format: date - required: - - "true" type: string status: description: Line Item Status Enum @@ -14338,7 +16225,7 @@ components: identifiers: - identifiers - identifiers - identifierType: email + identifierType: Email operation: add properties: operation: @@ -14350,12 +16237,12 @@ components: identifierType: description: What type of identifiers are used enum: - - email - - madid - - identityLink - - gum - - customerid - - phoneNumber + - Email + - UserIdentifier + - IdentityLink + - Gum + - CustomerId + - PhoneNumber nullable: true type: string identifiers: diff --git a/sdks/retailmedia_preview/build.gradle b/sdks/retailmedia_preview/build.gradle index a91fa301..d513d9c1 100644 --- a/sdks/retailmedia_preview/build.gradle +++ b/sdks/retailmedia_preview/build.gradle @@ -23,7 +23,7 @@ if (JavaVersion.current().isJava8Compatible()) { } group = 'com.criteo' -version = '0.0.240626' +version = '0.0.240731' repositories { jcenter() @@ -74,7 +74,7 @@ publishing { mavenJava(MavenPublication) { groupId 'com.criteo' artifactId 'criteo-api-retailmedia-sdk' - version '0.0.240626' + version '0.0.240731' from components.java artifact sourcesJar artifact javadocJar diff --git a/sdks/retailmedia_preview/docs/AccountsApi.md b/sdks/retailmedia_preview/docs/AccountsApi.md index 04737303..2ce9481e 100644 --- a/sdks/retailmedia_preview/docs/AccountsApi.md +++ b/sdks/retailmedia_preview/docs/AccountsApi.md @@ -4,22 +4,18 @@ All URIs are relative to *https://api.criteo.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**addBrands**](AccountsApi.md#addBrands) | **POST** /preview/retail-media/account-management/accounts/{accountId}/brands/add | | -| [**createPrivateMarketDemandBrandAccount**](AccountsApi.md#createPrivateMarketDemandBrandAccount) | **POST** /preview/retail-media/account-management/accounts/{accountId}/create-brand-account | | -| [**createPrivateMarketDemandSellerAccount**](AccountsApi.md#createPrivateMarketDemandSellerAccount) | **POST** /preview/retail-media/account-management/accounts/{accountId}/create-seller-account | | +| [**getApiV1ExternalAccounts**](AccountsApi.md#getApiV1ExternalAccounts) | **GET** /preview/retail-media/accounts | | | [**grantConsent**](AccountsApi.md#grantConsent) | **POST** /preview/retail-media/accounts/{accountId}/grant-consent | | -| [**removeBrands**](AccountsApi.md#removeBrands) | **POST** /preview/retail-media/account-management/accounts/{accountId}/brands/remove | | -| [**updateSellers**](AccountsApi.md#updateSellers) | **PUT** /preview/retail-media/account-management/accounts/{accountId}/sellers | | -## addBrands +## getApiV1ExternalAccounts -> ValueResourceOfRetailMediaBrands addBrands(accountId, valueResourceInputOfRetailMediaBrands) +> JsonApiPageResponseOfAccount getApiV1ExternalAccounts(limitToId, pageIndex, pageSize) -Add brands to an account +Gets page of account objects that the current user can access ### Example @@ -60,13 +56,14 @@ public class Example { // oauth.setAccessToken("YOUR ACCESS TOKEN"); AccountsApi apiInstance = new AccountsApi(defaultClient); - String accountId = "accountId_example"; // String | the account id to update - ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands = new ValueResourceInputOfRetailMediaBrands(); // ValueResourceInputOfRetailMediaBrands | brands to associate to account + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { - ValueResourceOfRetailMediaBrands result = apiInstance.addBrands(accountId, valueResourceInputOfRetailMediaBrands); + JsonApiPageResponseOfAccount result = apiInstance.getApiV1ExternalAccounts(limitToId, pageIndex, pageSize); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountsApi#addBrands"); + System.err.println("Exception when calling AccountsApi#getApiV1ExternalAccounts"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -81,12 +78,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| the account id to update | | -| **valueResourceInputOfRetailMediaBrands** | [**ValueResourceInputOfRetailMediaBrands**](ValueResourceInputOfRetailMediaBrands.md)| brands to associate to account | [optional] | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type -[**ValueResourceOfRetailMediaBrands**](ValueResourceOfRetailMediaBrands.md) +[**JsonApiPageResponseOfAccount**](JsonApiPageResponseOfAccount.md) ### Authorization @@ -94,8 +92,8 @@ public class Example { ### HTTP request headers -- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json -- **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json ### HTTP response details @@ -104,188 +102,6 @@ public class Example { | **200** | Success | - | -## createPrivateMarketDemandBrandAccount - -> ResourceOutcomeOfRetailMediaAccount createPrivateMarketDemandBrandAccount(accountId, valueResourceInputOfRetailMediaBrandAccountCreation) - - - -Creates a new child Demand Brand Account for the provided parent private market account - -### Example - -```java -package com.criteo.api.retailmedia.preview; - -import com.criteo.api.retailmedia.preview.ApiClient; -import com.criteo.api.retailmedia.preview.ApiClientBuilder; -import com.criteo.api.retailmedia.preview.ApiException; -import com.criteo.api.retailmedia.preview.Configuration; -import com.criteo.api.retailmedia.preview.auth.*; -import com.criteo.api.retailmedia.preview.model.*; -import com.criteo.api.retailmedia.preview.api.AccountsApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - AccountsApi apiInstance = new AccountsApi(defaultClient); - String accountId = "accountId_example"; // String | Account Id for the parent private market account - ValueResourceInputOfRetailMediaBrandAccountCreation valueResourceInputOfRetailMediaBrandAccountCreation = new ValueResourceInputOfRetailMediaBrandAccountCreation(); // ValueResourceInputOfRetailMediaBrandAccountCreation | Initial creation and configuration options for the new account - try { - ResourceOutcomeOfRetailMediaAccount result = apiInstance.createPrivateMarketDemandBrandAccount(accountId, valueResourceInputOfRetailMediaBrandAccountCreation); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccountsApi#createPrivateMarketDemandBrandAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Account Id for the parent private market account | | -| **valueResourceInputOfRetailMediaBrandAccountCreation** | [**ValueResourceInputOfRetailMediaBrandAccountCreation**](ValueResourceInputOfRetailMediaBrandAccountCreation.md)| Initial creation and configuration options for the new account | [optional] | - -### Return type - -[**ResourceOutcomeOfRetailMediaAccount**](ResourceOutcomeOfRetailMediaAccount.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Success | - | - - -## createPrivateMarketDemandSellerAccount - -> ResourceOutcomeOfRetailMediaAccount createPrivateMarketDemandSellerAccount(accountId, valueResourceInputOfRetailMediaSellerAccountCreation) - - - -Creates a new child Demand Seller Account for the provided parent private market account - -### Example - -```java -package com.criteo.api.retailmedia.preview; - -import com.criteo.api.retailmedia.preview.ApiClient; -import com.criteo.api.retailmedia.preview.ApiClientBuilder; -import com.criteo.api.retailmedia.preview.ApiException; -import com.criteo.api.retailmedia.preview.Configuration; -import com.criteo.api.retailmedia.preview.auth.*; -import com.criteo.api.retailmedia.preview.model.*; -import com.criteo.api.retailmedia.preview.api.AccountsApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - AccountsApi apiInstance = new AccountsApi(defaultClient); - String accountId = "accountId_example"; // String | Account Id for the parent private market account - ValueResourceInputOfRetailMediaSellerAccountCreation valueResourceInputOfRetailMediaSellerAccountCreation = new ValueResourceInputOfRetailMediaSellerAccountCreation(); // ValueResourceInputOfRetailMediaSellerAccountCreation | Initial creation and configuration options for the new account - try { - ResourceOutcomeOfRetailMediaAccount result = apiInstance.createPrivateMarketDemandSellerAccount(accountId, valueResourceInputOfRetailMediaSellerAccountCreation); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccountsApi#createPrivateMarketDemandSellerAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Account Id for the parent private market account | | -| **valueResourceInputOfRetailMediaSellerAccountCreation** | [**ValueResourceInputOfRetailMediaSellerAccountCreation**](ValueResourceInputOfRetailMediaSellerAccountCreation.md)| Initial creation and configuration options for the new account | [optional] | - -### Return type - -[**ResourceOutcomeOfRetailMediaAccount**](ResourceOutcomeOfRetailMediaAccount.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Success | - | - - ## grantConsent > grantConsent(accountId, grantConsentInput) @@ -375,185 +191,3 @@ null (empty response body) |-------------|-------------|------------------| | **204** | Success | - | - -## removeBrands - -> ValueResourceOfRetailMediaBrands removeBrands(accountId, valueResourceInputOfRetailMediaBrands) - - - -Remove a brand from an account - -### Example - -```java -package com.criteo.api.retailmedia.preview; - -import com.criteo.api.retailmedia.preview.ApiClient; -import com.criteo.api.retailmedia.preview.ApiClientBuilder; -import com.criteo.api.retailmedia.preview.ApiException; -import com.criteo.api.retailmedia.preview.Configuration; -import com.criteo.api.retailmedia.preview.auth.*; -import com.criteo.api.retailmedia.preview.model.*; -import com.criteo.api.retailmedia.preview.api.AccountsApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - AccountsApi apiInstance = new AccountsApi(defaultClient); - String accountId = "accountId_example"; // String | the account id to update - ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands = new ValueResourceInputOfRetailMediaBrands(); // ValueResourceInputOfRetailMediaBrands | - try { - ValueResourceOfRetailMediaBrands result = apiInstance.removeBrands(accountId, valueResourceInputOfRetailMediaBrands); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccountsApi#removeBrands"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| the account id to update | | -| **valueResourceInputOfRetailMediaBrands** | [**ValueResourceInputOfRetailMediaBrands**](ValueResourceInputOfRetailMediaBrands.md)| | [optional] | - -### Return type - -[**ValueResourceOfRetailMediaBrands**](ValueResourceOfRetailMediaBrands.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## updateSellers - -> ValueResourceCollectionOutcomeOfRetailMediaSeller updateSellers(accountId, valueResourceCollectionInputOfRetailMediaSeller) - - - -replace the sellers assoiated with an account - -### Example - -```java -package com.criteo.api.retailmedia.preview; - -import com.criteo.api.retailmedia.preview.ApiClient; -import com.criteo.api.retailmedia.preview.ApiClientBuilder; -import com.criteo.api.retailmedia.preview.ApiException; -import com.criteo.api.retailmedia.preview.Configuration; -import com.criteo.api.retailmedia.preview.auth.*; -import com.criteo.api.retailmedia.preview.model.*; -import com.criteo.api.retailmedia.preview.api.AccountsApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - AccountsApi apiInstance = new AccountsApi(defaultClient); - String accountId = "accountId_example"; // String | the account id to update - ValueResourceCollectionInputOfRetailMediaSeller valueResourceCollectionInputOfRetailMediaSeller = new ValueResourceCollectionInputOfRetailMediaSeller(); // ValueResourceCollectionInputOfRetailMediaSeller | sellers to associate - try { - ValueResourceCollectionOutcomeOfRetailMediaSeller result = apiInstance.updateSellers(accountId, valueResourceCollectionInputOfRetailMediaSeller); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccountsApi#updateSellers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| the account id to update | | -| **valueResourceCollectionInputOfRetailMediaSeller** | [**ValueResourceCollectionInputOfRetailMediaSeller**](ValueResourceCollectionInputOfRetailMediaSeller.md)| sellers to associate | [optional] | - -### Return type - -[**ValueResourceCollectionOutcomeOfRetailMediaSeller**](ValueResourceCollectionOutcomeOfRetailMediaSeller.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - diff --git a/sdks/retailmedia_preview/docs/AddFundsToBalanceV2.md b/sdks/retailmedia_preview/docs/AddFundsToBalanceV2.md new file mode 100644 index 00000000..ab5e0f6b --- /dev/null +++ b/sdks/retailmedia_preview/docs/AddFundsToBalanceV2.md @@ -0,0 +1,16 @@ + + +# AddFundsToBalanceV2 + +An object that represents the available options of adding funds to a balance. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**deltaAmount** | **BigDecimal** | Amount of billable funds to be added / decreased allotted to the balance. | | +|**poNumber** | **String** | Purchase Order number. | [optional] | +|**memo** | **String** | Memo | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/AddFundsToBalanceV2Request.md b/sdks/retailmedia_preview/docs/AddFundsToBalanceV2Request.md new file mode 100644 index 00000000..339b1397 --- /dev/null +++ b/sdks/retailmedia_preview/docs/AddFundsToBalanceV2Request.md @@ -0,0 +1,14 @@ + + +# AddFundsToBalanceV2Request + +A top-level object that encapsulates a Criteo API request for a single entity + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ResourceOfAddFundsToBalanceV2**](ResourceOfAddFundsToBalanceV2.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/ApplicationSummaryModel.md b/sdks/retailmedia_preview/docs/ApplicationSummaryModel.md index 704b26ad..d5e84458 100644 --- a/sdks/retailmedia_preview/docs/ApplicationSummaryModel.md +++ b/sdks/retailmedia_preview/docs/ApplicationSummaryModel.md @@ -2,7 +2,7 @@ # ApplicationSummaryModel -Model of ApplicationSummary +Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients ## Properties diff --git a/sdks/retailmedia_preview/docs/ApplicationSummaryModelResource.md b/sdks/retailmedia_preview/docs/ApplicationSummaryModelResource.md index 81ed2c97..af688c5d 100644 --- a/sdks/retailmedia_preview/docs/ApplicationSummaryModelResource.md +++ b/sdks/retailmedia_preview/docs/ApplicationSummaryModelResource.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResource -A class that represents a ValueType in a guild compliant way +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/retailmedia_preview/docs/ApplicationSummaryModelResponse.md b/sdks/retailmedia_preview/docs/ApplicationSummaryModelResponse.md index 47b6bd74..658b5549 100644 --- a/sdks/retailmedia_preview/docs/ApplicationSummaryModelResponse.md +++ b/sdks/retailmedia_preview/docs/ApplicationSummaryModelResponse.md @@ -2,7 +2,7 @@ # ApplicationSummaryModelResponse -Response of ApplicationSummaryModel +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/retailmedia_preview/docs/AsyncAccountsReport.md b/sdks/retailmedia_preview/docs/AsyncAccountsReport.md index 360fabb3..b77b0abe 100644 --- a/sdks/retailmedia_preview/docs/AsyncAccountsReport.md +++ b/sdks/retailmedia_preview/docs/AsyncAccountsReport.md @@ -125,6 +125,8 @@ Async Accounts report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_preview/docs/AsyncCampaignsReport.md b/sdks/retailmedia_preview/docs/AsyncCampaignsReport.md index d735484a..18252b4c 100644 --- a/sdks/retailmedia_preview/docs/AsyncCampaignsReport.md +++ b/sdks/retailmedia_preview/docs/AsyncCampaignsReport.md @@ -116,6 +116,8 @@ Async Campaigns report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_preview/docs/AsyncLineItemsReport.md b/sdks/retailmedia_preview/docs/AsyncLineItemsReport.md index 9a3a2e0e..276cd5a1 100644 --- a/sdks/retailmedia_preview/docs/AsyncLineItemsReport.md +++ b/sdks/retailmedia_preview/docs/AsyncLineItemsReport.md @@ -116,6 +116,8 @@ Async Line Items report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_preview/docs/AudienceApi.md b/sdks/retailmedia_preview/docs/AudienceApi.md index 8de853be..cce45ab0 100644 --- a/sdks/retailmedia_preview/docs/AudienceApi.md +++ b/sdks/retailmedia_preview/docs/AudienceApi.md @@ -4,13 +4,300 @@ All URIs are relative to *https://api.criteo.com* | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**bulkCreateV1**](AudienceApi.md#bulkCreateV1) | **POST** /preview/retail-media/accounts/{account-id}/audience-segments/create | | +| [**bulkDeleteV1**](AudienceApi.md#bulkDeleteV1) | **POST** /preview/retail-media/accounts/{account-id}/audience-segments/delete | | +| [**bulkUpdateV1**](AudienceApi.md#bulkUpdateV1) | **PATCH** /preview/retail-media/accounts/{account-id}/audience-segments | | | [**deleteContactListIdentifiers**](AudienceApi.md#deleteContactListIdentifiers) | **POST** /preview/retail-media/audience-segments/{audience-segment-id}/contact-list/clear | | +| [**getContactListStatisticsV1**](AudienceApi.md#getContactListStatisticsV1) | **GET** /preview/retail-media/accounts/{account-id}/audience-segments/{audience-segment-id}/contact-list | | | [**legacyGetAudienceV1**](AudienceApi.md#legacyGetAudienceV1) | **GET** /preview/retail-media/accounts/{accountId}/audiences | | | [**legacyGetAudienceV2**](AudienceApi.md#legacyGetAudienceV2) | **GET** /preview/retail-media/v2/accounts/{accountId}/audiences | | +| [**searchV1**](AudienceApi.md#searchV1) | **POST** /preview/retail-media/accounts/{account-id}/audience-segments/search | | | [**updateContactListIdentifiers**](AudienceApi.md#updateContactListIdentifiers) | **POST** /preview/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove | | +## bulkCreateV1 + +> RmAudienceSegmentEntityV1ListResponse bulkCreateV1(accountId, rmAudienceSegmentBulkCreateInputV1) + + + +Creates all segments with a valid configuration, and returns the full segments. For those that cannot be created, one or multiple errors are returned. + +### Example + +```java +package com.criteo.api.retailmedia.preview; + +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiClientBuilder; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.auth.*; +import com.criteo.api.retailmedia.preview.model.*; +import com.criteo.api.retailmedia.preview.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + String accountId = "accountId_example"; // String | Account Id + RmAudienceSegmentBulkCreateInputV1 rmAudienceSegmentBulkCreateInputV1 = new RmAudienceSegmentBulkCreateInputV1(); // RmAudienceSegmentBulkCreateInputV1 | Segment creation parameter + try { + RmAudienceSegmentEntityV1ListResponse result = apiInstance.bulkCreateV1(accountId, rmAudienceSegmentBulkCreateInputV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#bulkCreateV1"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| Account Id | | +| **rmAudienceSegmentBulkCreateInputV1** | [**RmAudienceSegmentBulkCreateInputV1**](RmAudienceSegmentBulkCreateInputV1.md)| Segment creation parameter | | + +### Return type + +[**RmAudienceSegmentEntityV1ListResponse**](RmAudienceSegmentEntityV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## bulkDeleteV1 + +> RmAudienceSegmentIdEntityV1ListResponse bulkDeleteV1(accountId, rmAudienceSegmentBulkDeleteInputV1) + + + +Delete the segments associated to the given audience IDs. + +### Example + +```java +package com.criteo.api.retailmedia.preview; + +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiClientBuilder; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.auth.*; +import com.criteo.api.retailmedia.preview.model.*; +import com.criteo.api.retailmedia.preview.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + String accountId = "accountId_example"; // String | Account id + RmAudienceSegmentBulkDeleteInputV1 rmAudienceSegmentBulkDeleteInputV1 = new RmAudienceSegmentBulkDeleteInputV1(); // RmAudienceSegmentBulkDeleteInputV1 | Segment delete request. + try { + RmAudienceSegmentIdEntityV1ListResponse result = apiInstance.bulkDeleteV1(accountId, rmAudienceSegmentBulkDeleteInputV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#bulkDeleteV1"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| Account id | | +| **rmAudienceSegmentBulkDeleteInputV1** | [**RmAudienceSegmentBulkDeleteInputV1**](RmAudienceSegmentBulkDeleteInputV1.md)| Segment delete request. | | + +### Return type + +[**RmAudienceSegmentIdEntityV1ListResponse**](RmAudienceSegmentIdEntityV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + +## bulkUpdateV1 + +> RmAudienceSegmentEntityV1ListResponse bulkUpdateV1(accountId, rmAudienceSegmentBulkUpdateInputV1) + + + +Updates the properties of all segments with a valid configuration, and returns the full segments. For those that cannot be updated, one or multiple errors are returned. + +### Example + +```java +package com.criteo.api.retailmedia.preview; + +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiClientBuilder; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.auth.*; +import com.criteo.api.retailmedia.preview.model.*; +import com.criteo.api.retailmedia.preview.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + String accountId = "accountId_example"; // String | Account id + RmAudienceSegmentBulkUpdateInputV1 rmAudienceSegmentBulkUpdateInputV1 = new RmAudienceSegmentBulkUpdateInputV1(); // RmAudienceSegmentBulkUpdateInputV1 | Segment Update request + try { + RmAudienceSegmentEntityV1ListResponse result = apiInstance.bulkUpdateV1(accountId, rmAudienceSegmentBulkUpdateInputV1); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#bulkUpdateV1"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| Account id | | +| **rmAudienceSegmentBulkUpdateInputV1** | [**RmAudienceSegmentBulkUpdateInputV1**](RmAudienceSegmentBulkUpdateInputV1.md)| Segment Update request | | + +### Return type + +[**RmAudienceSegmentEntityV1ListResponse**](RmAudienceSegmentEntityV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + ## deleteContactListIdentifiers > deleteContactListIdentifiers(audienceSegmentId) @@ -100,6 +387,100 @@ null (empty response body) | **403** | Forbidden | - | +## getContactListStatisticsV1 + +> RmContactListStatisticsEntityV1Response getContactListStatisticsV1(accountId, audienceSegmentId) + + + +Returns the statistics of a contact list segment. + +### Example + +```java +package com.criteo.api.retailmedia.preview; + +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiClientBuilder; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.auth.*; +import com.criteo.api.retailmedia.preview.model.*; +import com.criteo.api.retailmedia.preview.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + String accountId = "accountId_example"; // String | Account Id + String audienceSegmentId = "audienceSegmentId_example"; // String | Segment Id. + try { + RmContactListStatisticsEntityV1Response result = apiInstance.getContactListStatisticsV1(accountId, audienceSegmentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#getContactListStatisticsV1"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| Account Id | | +| **audienceSegmentId** | **String**| Segment Id. | | + +### Return type + +[**RmContactListStatisticsEntityV1Response**](RmContactListStatisticsEntityV1Response.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + ## legacyGetAudienceV1 > RmLegacyAudienceGetEntityV1ListResponse legacyGetAudienceV1(accountId, limitToId, pageSize, pageIndex) @@ -296,6 +677,104 @@ public class Example { | **403** | The API client is not authorized to access this resource. | - | +## searchV1 + +> RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse searchV1(accountId, rmAudienceSegmentSearchInputV1, limit, offset) + + + +Search segments based on the provided filters.( by ids or retailer ids) + +### Example + +```java +package com.criteo.api.retailmedia.preview; + +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiClientBuilder; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.auth.*; +import com.criteo.api.retailmedia.preview.model.*; +import com.criteo.api.retailmedia.preview.api.AudienceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + AudienceApi apiInstance = new AudienceApi(defaultClient); + String accountId = "accountId_example"; // String | Account Id + RmAudienceSegmentSearchInputV1 rmAudienceSegmentSearchInputV1 = new RmAudienceSegmentSearchInputV1(); // RmAudienceSegmentSearchInputV1 | Segment creation parameter + Integer limit = 50; // Integer | The number of elements to be returned. The default is 50 and the maximum is 100. + Integer offset = 0; // Integer | The (zero-based) offset into the collection. The default is 0. + try { + RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse result = apiInstance.searchV1(accountId, rmAudienceSegmentSearchInputV1, limit, offset); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AudienceApi#searchV1"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| Account Id | | +| **rmAudienceSegmentSearchInputV1** | [**RmAudienceSegmentSearchInputV1**](RmAudienceSegmentSearchInputV1.md)| Segment creation parameter | | +| **limit** | **Integer**| The number of elements to be returned. The default is 50 and the maximum is 100. | [optional] [default to 50] | +| **offset** | **Integer**| The (zero-based) offset into the collection. The default is 0. | [optional] [default to 0] | + +### Return type + +[**RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse**](RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json-patch+json, application/json, text/json, application/*+json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success or partial success | - | +| **400** | Bad request | - | +| **401** | The API client is not properly authenticated. | - | +| **403** | The API client is not authorized to access this resource. | - | + + ## updateContactListIdentifiers > RetailMediaContactlistOperation updateContactListIdentifiers(audienceSegmentId, retailMediaContactlistAmendmentRequest) diff --git a/sdks/retailmedia_preview/docs/BalanceApi.md b/sdks/retailmedia_preview/docs/BalanceApi.md new file mode 100644 index 00000000..8a62efc6 --- /dev/null +++ b/sdks/retailmedia_preview/docs/BalanceApi.md @@ -0,0 +1,666 @@ +# BalanceApi + +All URIs are relative to *https://api.criteo.com* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getApiV2ExternalAccountBalancesByAccountId**](BalanceApi.md#getApiV2ExternalAccountBalancesByAccountId) | **GET** /preview/retail-media/accounts/{account-id}/balances | | +| [**getApiV2ExternalAccountByAccountIdBalancesbalanceId**](BalanceApi.md#getApiV2ExternalAccountByAccountIdBalancesbalanceId) | **GET** /preview/retail-media/accounts/{account-id}/balances/{balance-id} | | +| [**getBalanceHistory**](BalanceApi.md#getBalanceHistory) | **GET** /preview/retail-media/balances/{balanceId}/history | | +| [**patchApiV2ExternalAccountByAccountIdBalancesbalanceId**](BalanceApi.md#patchApiV2ExternalAccountByAccountIdBalancesbalanceId) | **PATCH** /preview/retail-media/accounts/{account-id}/balances/{balance-id} | | +| [**postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceId**](BalanceApi.md#postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceId) | **POST** /preview/retail-media/accounts/{account-id}/balances/{balance-id}/add-funds | | +| [**postApiV2ExternalAccountBalancesByAccountId**](BalanceApi.md#postApiV2ExternalAccountBalancesByAccountId) | **POST** /preview/retail-media/accounts/{account-id}/balances | | +| [**postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceId**](BalanceApi.md#postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceId) | **POST** /preview/retail-media/accounts/{account-id}/balances/{balance-id}/change-dates | | + + + +## getApiV2ExternalAccountBalancesByAccountId + +> PagedResourceCollectionOutcomeOfBalanceResponseV2 getApiV2ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize) + + + +Gets page of balance objects for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.preview; + +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiClientBuilder; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.auth.*; +import com.criteo.api.retailmedia.preview.model.*; +import com.criteo.api.retailmedia.preview.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account to get balances for + List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request + try { + PagedResourceCollectionOutcomeOfBalanceResponseV2 result = apiInstance.getApiV2ExternalAccountBalancesByAccountId(accountId, limitToId, pageIndex, pageSize); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApiV2ExternalAccountBalancesByAccountId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account to get balances for | | +| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [default to 25] | + +### Return type + +[**PagedResourceCollectionOutcomeOfBalanceResponseV2**](PagedResourceCollectionOutcomeOfBalanceResponseV2.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## getApiV2ExternalAccountByAccountIdBalancesbalanceId + +> BalanceResponseV2Response getApiV2ExternalAccountByAccountIdBalancesbalanceId(accountId, balanceId) + + + +Get a balance for the given account id and balance id + +### Example + +```java +package com.criteo.api.retailmedia.preview; + +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiClientBuilder; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.auth.*; +import com.criteo.api.retailmedia.preview.model.*; +import com.criteo.api.retailmedia.preview.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance id + try { + BalanceResponseV2Response result = apiInstance.getApiV2ExternalAccountByAccountIdBalancesbalanceId(accountId, balanceId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getApiV2ExternalAccountByAccountIdBalancesbalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance id | | + +### Return type + +[**BalanceResponseV2Response**](BalanceResponseV2Response.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## getBalanceHistory + +> PageOfBalanceHistoryChangeDataCaptureV1 getBalanceHistory(balanceId, offset, limit, limitToChangeTypes) + + + +Gets the balance's historical change data. + +### Example + +```java +package com.criteo.api.retailmedia.preview; + +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiClientBuilder; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.auth.*; +import com.criteo.api.retailmedia.preview.model.*; +import com.criteo.api.retailmedia.preview.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String balanceId = "balanceId_example"; // String | Balance id. + Integer offset = 0; // Integer | The (zero-based) starting offset in the collection. + Integer limit = 25; // Integer | The number of elements to be returned. + String limitToChangeTypes = "limitToChangeTypes_example"; // String | Comma separated change types string that will be queried. + try { + PageOfBalanceHistoryChangeDataCaptureV1 result = apiInstance.getBalanceHistory(balanceId, offset, limit, limitToChangeTypes); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#getBalanceHistory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **balanceId** | **String**| Balance id. | | +| **offset** | **Integer**| The (zero-based) starting offset in the collection. | [optional] [default to 0] | +| **limit** | **Integer**| The number of elements to be returned. | [optional] [default to 25] | +| **limitToChangeTypes** | **String**| Comma separated change types string that will be queried. | [optional] | + +### Return type + +[**PageOfBalanceHistoryChangeDataCaptureV1**](PageOfBalanceHistoryChangeDataCaptureV1.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## patchApiV2ExternalAccountByAccountIdBalancesbalanceId + +> BalanceResponseV2Response patchApiV2ExternalAccountByAccountIdBalancesbalanceId(accountId, balanceId, updateBalanceModelV2Request) + + + +Modify a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.preview; + +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiClientBuilder; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.auth.*; +import com.criteo.api.retailmedia.preview.model.*; +import com.criteo.api.retailmedia.preview.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to change the dates + UpdateBalanceModelV2Request updateBalanceModelV2Request = new UpdateBalanceModelV2Request(); // UpdateBalanceModelV2Request | An object that represents the available options to modify a balance. + try { + BalanceResponseV2Response result = apiInstance.patchApiV2ExternalAccountByAccountIdBalancesbalanceId(accountId, balanceId, updateBalanceModelV2Request); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#patchApiV2ExternalAccountByAccountIdBalancesbalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to change the dates | | +| **updateBalanceModelV2Request** | [**UpdateBalanceModelV2Request**](UpdateBalanceModelV2Request.md)| An object that represents the available options to modify a balance. | | + +### Return type + +[**BalanceResponseV2Response**](BalanceResponseV2Response.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceId + +> BalanceResponseV2Response postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceId(accountId, balanceId, addFundsToBalanceV2Request) + + + +Add funds to a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.preview; + +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiClientBuilder; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.auth.*; +import com.criteo.api.retailmedia.preview.model.*; +import com.criteo.api.retailmedia.preview.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to add funds to + AddFundsToBalanceV2Request addFundsToBalanceV2Request = new AddFundsToBalanceV2Request(); // AddFundsToBalanceV2Request | An object that represents the available options of adding funds to a balance. + try { + BalanceResponseV2Response result = apiInstance.postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceId(accountId, balanceId, addFundsToBalanceV2Request); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to add funds to | | +| **addFundsToBalanceV2Request** | [**AddFundsToBalanceV2Request**](AddFundsToBalanceV2Request.md)| An object that represents the available options of adding funds to a balance. | | + +### Return type + +[**BalanceResponseV2Response**](BalanceResponseV2Response.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## postApiV2ExternalAccountBalancesByAccountId + +> BalanceResponseV2Response postApiV2ExternalAccountBalancesByAccountId(accountId, createBalanceV2Request) + + + +Create balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.preview; + +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiClientBuilder; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.auth.*; +import com.criteo.api.retailmedia.preview.model.*; +import com.criteo.api.retailmedia.preview.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account to create balances for + CreateBalanceV2Request createBalanceV2Request = new CreateBalanceV2Request(); // CreateBalanceV2Request | An object that represents the available options to set when creating a Retail Media Balance + try { + BalanceResponseV2Response result = apiInstance.postApiV2ExternalAccountBalancesByAccountId(accountId, createBalanceV2Request); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV2ExternalAccountBalancesByAccountId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account to create balances for | | +| **createBalanceV2Request** | [**CreateBalanceV2Request**](CreateBalanceV2Request.md)| An object that represents the available options to set when creating a Retail Media Balance | | + +### Return type + +[**BalanceResponseV2Response**](BalanceResponseV2Response.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Success | - | + + +## postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceId + +> BalanceResponseV2Response postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceId(accountId, balanceId, changeDatesOfBalanceV2Request) + + + +Change dates of a balance for the given account id + +### Example + +```java +package com.criteo.api.retailmedia.preview; + +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiClientBuilder; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.auth.*; +import com.criteo.api.retailmedia.preview.model.*; +import com.criteo.api.retailmedia.preview.api.BalanceApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + BalanceApi apiInstance = new BalanceApi(defaultClient); + String accountId = "accountId_example"; // String | The account of the balance + String balanceId = "balanceId_example"; // String | The balance to change the dates + ChangeDatesOfBalanceV2Request changeDatesOfBalanceV2Request = new ChangeDatesOfBalanceV2Request(); // ChangeDatesOfBalanceV2Request | An object that represents the available options to modify schedule of a balance. + try { + BalanceResponseV2Response result = apiInstance.postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceId(accountId, balanceId, changeDatesOfBalanceV2Request); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalanceApi#postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account of the balance | | +| **balanceId** | **String**| The balance to change the dates | | +| **changeDatesOfBalanceV2Request** | [**ChangeDatesOfBalanceV2Request**](ChangeDatesOfBalanceV2Request.md)| An object that represents the available options to modify schedule of a balance. | | + +### Return type + +[**BalanceResponseV2Response**](BalanceResponseV2Response.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + diff --git a/sdks/retailmedia_preview/docs/BalanceHistoryChangeDataCaptureV1.md b/sdks/retailmedia_preview/docs/BalanceHistoryChangeDataCaptureV1.md new file mode 100644 index 00000000..1221b676 --- /dev/null +++ b/sdks/retailmedia_preview/docs/BalanceHistoryChangeDataCaptureV1.md @@ -0,0 +1,36 @@ + + +# BalanceHistoryChangeDataCaptureV1 + +Data model represents the data change capture of balance history. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dateOfModification** | **OffsetDateTime** | Date when data change has occured. | | +|**modifiedByUser** | **String** | Username who modified the insertion order. | | +|**changeType** | [**ChangeTypeEnum**](#ChangeTypeEnum) | Represent the type of change states of the history. | | +|**changeDetails** | [**ChangeDetailsV1**](ChangeDetailsV1.md) | | | +|**memo** | **String** | Memo associate with the insertion order modification. | [optional] | + + + +## Enum: ChangeTypeEnum + +| Name | Value | +|---- | -----| +| BALANCECREATED | "BalanceCreated" | +| BALANCEADDED | "BalanceAdded" | +| BALANCEREMOVED | "BalanceRemoved" | +| BALANCEUNCAPPED | "BalanceUncapped" | +| BALANCECAPPED | "BalanceCapped" | +| ENDDATE | "EndDate" | +| STARTDATE | "StartDate" | +| BALANCENAME | "BalanceName" | +| PONUMBER | "PoNumber" | +| VALUEADD | "ValueAdd" | +| UNKNOWN | "Unknown" | + + + diff --git a/sdks/retailmedia_preview/docs/BalanceResponseV2.md b/sdks/retailmedia_preview/docs/BalanceResponseV2.md new file mode 100644 index 00000000..bd93600d --- /dev/null +++ b/sdks/retailmedia_preview/docs/BalanceResponseV2.md @@ -0,0 +1,69 @@ + + +# BalanceResponseV2 + +A Retail Media Balance used to determine the funds available for any or all campaigns in an account + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the balance. | | +|**poNumber** | **String** | Purchase Order number. | [optional] | +|**memo** | **String** | Memo. | [optional] | +|**deposited** | **BigDecimal** | Amount of billable funds allotted to the balance. | [optional] | +|**spent** | **BigDecimal** | Amount of spent funds of the balance. | [optional] | +|**remaining** | **BigDecimal** | Amount of remaining funds of the balance. | [optional] | +|**startDate** | **String** | Start date of the balance in the format YYYY-MM-DD. | | +|**endDate** | **String** | End date of the balance in the format YYYY-MM-DD. | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Status of the balance. | [optional] | +|**createdAt** | **OffsetDateTime** | Creation time of the balance. | [optional] | +|**updatedAt** | **OffsetDateTime** | Update time of the balance. | [optional] | +|**balanceType** | [**BalanceTypeEnum**](#BalanceTypeEnum) | Type of the balance. | | +|**spendType** | [**SpendTypeEnum**](#SpendTypeEnum) | Spend Type of the balance. | | +|**privateMarketBillingType** | [**PrivateMarketBillingTypeEnum**](#PrivateMarketBillingTypeEnum) | Billing type for Private Market of the balance. | | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "unknown" | +| SCHEDULED | "scheduled" | +| ACTIVE | "active" | +| ENDED | "ended" | + + + +## Enum: BalanceTypeEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "unknown" | +| CAPPED | "capped" | +| UNCAPPED | "uncapped" | + + + +## Enum: SpendTypeEnum + +| Name | Value | +|---- | -----| +| ONSITE | "Onsite" | +| OFFSITE | "Offsite" | +| OFFSITEAWARENESS | "OffsiteAwareness" | + + + +## Enum: PrivateMarketBillingTypeEnum + +| Name | Value | +|---- | -----| +| NOTAPPLICABLE | "notApplicable" | +| BILLBYRETAILER | "billByRetailer" | +| BILLBYCRITEO | "billByCriteo" | +| UNKNOWN | "unknown" | + + + diff --git a/sdks/retailmedia_preview/docs/BalanceResponseV2Response.md b/sdks/retailmedia_preview/docs/BalanceResponseV2Response.md new file mode 100644 index 00000000..e12925d3 --- /dev/null +++ b/sdks/retailmedia_preview/docs/BalanceResponseV2Response.md @@ -0,0 +1,16 @@ + + +# BalanceResponseV2Response + +A top-level object that encapsulates a Criteo API response for a single entity + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ResourceOfBalanceResponseV2**](ResourceOfBalanceResponseV2.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/retailmedia_preview/docs/CampaignApi.md b/sdks/retailmedia_preview/docs/CampaignApi.md index 1342a407..7503b4b7 100644 --- a/sdks/retailmedia_preview/docs/CampaignApi.md +++ b/sdks/retailmedia_preview/docs/CampaignApi.md @@ -15,7 +15,6 @@ All URIs are relative to *https://api.criteo.com* | [**getApi202210ExternalLineItemProductButtonsByLineItemIdProductButtonId**](CampaignApi.md#getApi202210ExternalLineItemProductButtonsByLineItemIdProductButtonId) | **GET** /preview/retail-media/line-items/{line-item-id}/product-buttons/{product-button-id} | | | [**getApiV1ExternalAccountBrandsByAccountId**](CampaignApi.md#getApiV1ExternalAccountBrandsByAccountId) | **GET** /preview/retail-media/accounts/{accountId}/brands | | | [**getApiV1ExternalAccountRetailersByAccountId**](CampaignApi.md#getApiV1ExternalAccountRetailersByAccountId) | **GET** /preview/retail-media/accounts/{accountId}/retailers | | -| [**getApiV1ExternalAccounts**](CampaignApi.md#getApiV1ExternalAccounts) | **GET** /preview/retail-media/accounts | | | [**getApiV1ExternalRetailerBrandsByRetailerId**](CampaignApi.md#getApiV1ExternalRetailerBrandsByRetailerId) | **GET** /preview/retail-media/retailers/{retailerId}/brands | | | [**getApiV1ExternalRetailerByRetailerIdSellerBySeller**](CampaignApi.md#getApiV1ExternalRetailerByRetailerIdSellerBySeller) | **GET** /preview/retail-media/retailers/{retailerId}/sellers/{seller} | | | [**getApiV1ExternalRetailerCategoryCpcRatesByRetailerId**](CampaignApi.md#getApiV1ExternalRetailerCategoryCpcRatesByRetailerId) | **GET** /preview/retail-media/retailers/{retailer-id}/cpc-rates | | @@ -25,13 +24,14 @@ All URIs are relative to *https://api.criteo.com* | [**getApiV2ExternalLineItemBidMultipliersByLineItemId**](CampaignApi.md#getApiV2ExternalLineItemBidMultipliersByLineItemId) | **GET** /preview/retail-media/line-items/{line-item-id}/bid-multipliers | | | [**getApiV2ExternalPreferredLineItemByLineItemId**](CampaignApi.md#getApiV2ExternalPreferredLineItemByLineItemId) | **GET** /preview/retail-media/preferred-line-items/{line-item-id} | | | [**getCampaignBudgetOverrides**](CampaignApi.md#getCampaignBudgetOverrides) | **GET** /preview/retail-media/campaigns/{campaignId}/campaign-budget-overrides | | -| [**getInsertionOrderHistoryChangeDataCapture**](CampaignApi.md#getInsertionOrderHistoryChangeDataCapture) | **GET** /preview/retail-media/insertion-order-history/{insertionOrderId}/change-data-capture | | +| [**getInsertionOrderHistoryChangeDataCaptureV2**](CampaignApi.md#getInsertionOrderHistoryChangeDataCaptureV2) | **GET** /preview/retail-media/insertion-order-history/{insertionOrderId}/change-data-capture | | | [**getLineItemBudgetOverrides**](CampaignApi.md#getLineItemBudgetOverrides) | **GET** /preview/retail-media/line-items/{lineItemId}/line-item-budget-overrides | | | [**getRecommendedKeywords**](CampaignApi.md#getRecommendedKeywords) | **GET** /preview/retail-media/line-items/{externalLineItemId}/keywords/recommended | | | [**getSkuByProductId**](CampaignApi.md#getSkuByProductId) | **POST** /preview/retail-media/catalogs/sku/search/accounts/{accountId}/retailers/{retailerId}/by-id | | | [**pausePromotedProducts**](CampaignApi.md#pausePromotedProducts) | **POST** /preview/retail-media/line-items/{lineItemId}/products/pause | | | [**postApi202110ExternalCampaignPreferredLineItemsByCampaignId**](CampaignApi.md#postApi202110ExternalCampaignPreferredLineItemsByCampaignId) | **POST** /preview/retail-media/campaigns/{campaign-id}/preferred-line-items | | | [**postApi202210ExternalLineItemProductButtonsCreateByLineItemId**](CampaignApi.md#postApi202210ExternalLineItemProductButtonsCreateByLineItemId) | **POST** /preview/retail-media/line-items/{line-item-id}/product-buttons/create | | +| [**postApiV1ExternalAccountCatalogsSellersByAccountId**](CampaignApi.md#postApiV1ExternalAccountCatalogsSellersByAccountId) | **POST** /preview/retail-media/accounts/{accountId}/catalogs/sellers | | | [**postApiV1ExternalCatalogsSkuRetrieval**](CampaignApi.md#postApiV1ExternalCatalogsSkuRetrieval) | **POST** /preview/retail-media/catalogs/sku-retrieval | | | [**postApiV1ExternalCatalogsSkuSearch**](CampaignApi.md#postApiV1ExternalCatalogsSkuSearch) | **POST** /preview/retail-media/catalogs/sku-search | | | [**postApiV1ExternalCatalogsSkuSearchAccountIdAndRetailerId**](CampaignApi.md#postApiV1ExternalCatalogsSkuSearchAccountIdAndRetailerId) | **POST** /preview/retail-media/catalogs/sku-search/accounts/{account-id}/retailers/{retailer-id} | | @@ -922,8 +922,8 @@ public class Example { CampaignApi apiInstance = new CampaignApi(defaultClient); String accountId = "accountId_example"; // String | The given account id List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { JsonApiPageResponseOfBrand result = apiInstance.getApiV1ExternalAccountBrandsByAccountId(accountId, limitToId, pageIndex, pageSize); System.out.println(result); @@ -945,8 +945,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **accountId** | **String**| The given account id | | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type @@ -959,7 +959,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/plain, application/json, text/json ### HTTP response details @@ -1017,8 +1017,8 @@ public class Example { CampaignApi apiInstance = new CampaignApi(defaultClient); String accountId = "accountId_example"; // String | The given account id List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request + Integer pageIndex = 0; // Integer | The 0 indexed page index you would like to receive given the page size + Integer pageSize = 25; // Integer | The maximum number of items you would like to receive in this request try { JsonApiPageResponseOfRetailer result = apiInstance.getApiV1ExternalAccountRetailersByAccountId(accountId, limitToId, pageIndex, pageSize); System.out.println(result); @@ -1040,8 +1040,8 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **accountId** | **String**| The given account id | | | **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | +| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] [default to 0] | +| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] [default to 25] | ### Return type @@ -1054,100 +1054,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## getApiV1ExternalAccounts - -> JsonApiPageResponseOfAccount getApiV1ExternalAccounts(limitToId, pageIndex, pageSize) - - - -Gets page of account objects that the current user can access - -### Example - -```java -package com.criteo.api.retailmedia.preview; - -import com.criteo.api.retailmedia.preview.ApiClient; -import com.criteo.api.retailmedia.preview.ApiClientBuilder; -import com.criteo.api.retailmedia.preview.ApiException; -import com.criteo.api.retailmedia.preview.Configuration; -import com.criteo.api.retailmedia.preview.auth.*; -import com.criteo.api.retailmedia.preview.model.*; -import com.criteo.api.retailmedia.preview.api.CampaignApi; - -public class Example { - public static void main(String[] args) { - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - // Configure OAuth2, two options: - // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 - String clientId = "YOUR CLIENT ID"; - String clientSecret = "YOUR CLIENT SECRET"; - ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); - - // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client - // ApiClient defaultClient = Configuration.getDefaultApiClient(); - // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); - // oauth.setAccessToken("YOUR ACCESS TOKEN"); - - CampaignApi apiInstance = new CampaignApi(defaultClient); - List limitToId = Arrays.asList(); // List | The ids that you would like to limit your result set to - Integer pageIndex = 56; // Integer | The 0 indexed page index you would like to receive given the page size - Integer pageSize = 56; // Integer | The maximum number of items you would like to receive in this request - try { - JsonApiPageResponseOfAccount result = apiInstance.getApiV1ExternalAccounts(limitToId, pageIndex, pageSize); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getApiV1ExternalAccounts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **limitToId** | [**List<String>**](String.md)| The ids that you would like to limit your result set to | [optional] | -| **pageIndex** | **Integer**| The 0 indexed page index you would like to receive given the page size | [optional] | -| **pageSize** | **Integer**| The maximum number of items you would like to receive in this request | [optional] | - -### Return type - -[**JsonApiPageResponseOfAccount**](JsonApiPageResponseOfAccount.md) - -### Authorization - -[oauth](../README.md#oauth), [oauth](../README.md#oauth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: text/plain, application/json, text/json ### HTTP response details @@ -1977,9 +1884,9 @@ public class Example { | **200** | Success | - | -## getInsertionOrderHistoryChangeDataCapture +## getInsertionOrderHistoryChangeDataCaptureV2 -> PageOfInsertionOrderHistoryChangeDataCapture getInsertionOrderHistoryChangeDataCapture(insertionOrderId, offset, limit, limitToChangeTypes) +> PageOfInsertionOrderHistoryChangeDataCaptureV2 getInsertionOrderHistoryChangeDataCaptureV2(insertionOrderId, offset, limit, limitToChangeTypes) @@ -2029,10 +1936,10 @@ public class Example { Integer limit = 25; // Integer | The number of elements to be returned. String limitToChangeTypes = "limitToChangeTypes_example"; // String | Comma separated change types string that will be queried. try { - PageOfInsertionOrderHistoryChangeDataCapture result = apiInstance.getInsertionOrderHistoryChangeDataCapture(insertionOrderId, offset, limit, limitToChangeTypes); + PageOfInsertionOrderHistoryChangeDataCaptureV2 result = apiInstance.getInsertionOrderHistoryChangeDataCaptureV2(insertionOrderId, offset, limit, limitToChangeTypes); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CampaignApi#getInsertionOrderHistoryChangeDataCapture"); + System.err.println("Exception when calling CampaignApi#getInsertionOrderHistoryChangeDataCaptureV2"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -2054,7 +1961,7 @@ public class Example { ### Return type -[**PageOfInsertionOrderHistoryChangeDataCapture**](PageOfInsertionOrderHistoryChangeDataCapture.md) +[**PageOfInsertionOrderHistoryChangeDataCaptureV2**](PageOfInsertionOrderHistoryChangeDataCaptureV2.md) ### Authorization @@ -2622,6 +2529,98 @@ public class Example { | **200** | Success | - | +## postApiV1ExternalAccountCatalogsSellersByAccountId + +> JsonApiSingleResponseOfCatalogStatus postApiV1ExternalAccountCatalogsSellersByAccountId(accountId, jsonApiRequestOfSellerCatalogRequest) + + + +Create a request for a Catalog available to the indicated account. + +### Example + +```java +package com.criteo.api.retailmedia.preview; + +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiClientBuilder; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.auth.*; +import com.criteo.api.retailmedia.preview.model.*; +import com.criteo.api.retailmedia.preview.api.CampaignApi; + +public class Example { + public static void main(String[] args) { + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + // Configure OAuth2, two options: + // 1. Use ApiClientBuilder to create the ApiClient with the credentials you want, refresh token mechanism IS handled for you 💚 + String clientId = "YOUR CLIENT ID"; + String clientSecret = "YOUR CLIENT SECRET"; + ApiClient defaultClient = ApiClientBuilder.ForClientCredentials(clientId, clientSecret); + + // 2. Set your access token manually, refresh token mechanism IS NOT handled by the client + // ApiClient defaultClient = Configuration.getDefaultApiClient(); + // OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth"); + // oauth.setAccessToken("YOUR ACCESS TOKEN"); + + CampaignApi apiInstance = new CampaignApi(defaultClient); + String accountId = "accountId_example"; // String | The account to request the catalog for. + JsonApiRequestOfSellerCatalogRequest jsonApiRequestOfSellerCatalogRequest = new JsonApiRequestOfSellerCatalogRequest(); // JsonApiRequestOfSellerCatalogRequest | + try { + JsonApiSingleResponseOfCatalogStatus result = apiInstance.postApiV1ExternalAccountCatalogsSellersByAccountId(accountId, jsonApiRequestOfSellerCatalogRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CampaignApi#postApiV1ExternalAccountCatalogsSellersByAccountId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The account to request the catalog for. | | +| **jsonApiRequestOfSellerCatalogRequest** | [**JsonApiRequestOfSellerCatalogRequest**](JsonApiRequestOfSellerCatalogRequest.md)| | [optional] | + +### Return type + +[**JsonApiSingleResponseOfCatalogStatus**](JsonApiSingleResponseOfCatalogStatus.md) + +### Authorization + +[oauth](../README.md#oauth), [oauth](../README.md#oauth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain, application/json, text/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Catalog request successfully created | - | +| **400** | Bad Request | - | + + ## postApiV1ExternalCatalogsSkuRetrieval > SkuDataPreviewListResponse postApiV1ExternalCatalogsSkuRetrieval(pageIndex, pageSize, requestBody) diff --git a/sdks/retailmedia_preview/docs/ChangeDatesOfBalanceV2.md b/sdks/retailmedia_preview/docs/ChangeDatesOfBalanceV2.md new file mode 100644 index 00000000..133b1bc6 --- /dev/null +++ b/sdks/retailmedia_preview/docs/ChangeDatesOfBalanceV2.md @@ -0,0 +1,16 @@ + + +# ChangeDatesOfBalanceV2 + +An object that represents the available options to modify schedule of a balance. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startDate** | **String** | Start date of the balance in the format YYYY-MM-DD. | [optional] | +|**endDate** | **String** | End date of the balance in the format YYYY-MM-DD. | [optional] | +|**memo** | **String** | Memo. | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/ChangeDatesOfBalanceV2Request.md b/sdks/retailmedia_preview/docs/ChangeDatesOfBalanceV2Request.md new file mode 100644 index 00000000..ba11bbff --- /dev/null +++ b/sdks/retailmedia_preview/docs/ChangeDatesOfBalanceV2Request.md @@ -0,0 +1,14 @@ + + +# ChangeDatesOfBalanceV2Request + +A top-level object that encapsulates a Criteo API request for a single entity + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ResourceOfChangeDatesOfBalanceV2**](ResourceOfChangeDatesOfBalanceV2.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/ChangeDetailsV1.md b/sdks/retailmedia_preview/docs/ChangeDetailsV1.md new file mode 100644 index 00000000..14bb8a12 --- /dev/null +++ b/sdks/retailmedia_preview/docs/ChangeDetailsV1.md @@ -0,0 +1,16 @@ + + +# ChangeDetailsV1 + +Change details of a property of the balance. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**previousValue** | **String** | Previous value of a property of the insertion order. | | +|**currentValue** | **String** | Current value of a property of the insertion order. | | +|**changeValue** | **String** | Change detail of a property of the insertion order. | | + + + diff --git a/sdks/retailmedia_preview/docs/ChangeDetails.md b/sdks/retailmedia_preview/docs/ChangeDetailsV2.md similarity index 96% rename from sdks/retailmedia_preview/docs/ChangeDetails.md rename to sdks/retailmedia_preview/docs/ChangeDetailsV2.md index 6c417d12..623d4cfb 100644 --- a/sdks/retailmedia_preview/docs/ChangeDetails.md +++ b/sdks/retailmedia_preview/docs/ChangeDetailsV2.md @@ -1,6 +1,6 @@ -# ChangeDetails +# ChangeDetailsV2 Change details of a property of the insertion order. diff --git a/sdks/retailmedia_preview/docs/CommonProblem.md b/sdks/retailmedia_preview/docs/CommonProblem.md index 1ee7a1f1..3f7f164b 100644 --- a/sdks/retailmedia_preview/docs/CommonProblem.md +++ b/sdks/retailmedia_preview/docs/CommonProblem.md @@ -2,7 +2,7 @@ # CommonProblem -Common problem object. Can be specialized as needed. +Common problem object. ## Properties @@ -11,7 +11,7 @@ Common problem object. Can be specialized as needed. |**traceId** | **String** | The request correlation ID this problem comes from. | [optional] | |**traceIdentifier** | **String** | The request correlation ID this problem comes from. (deprecated, use traceId instead) | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The problem's category. | [optional] | -|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | +|**code** | **String** | A machine-readable error code, expressed as a string value. | [optional] | |**instance** | **String** | A URI that identifies the specific occurrence of the problem. | [optional] | |**title** | **String** | A short human-readable description of the problem type | [optional] | |**detail** | **String** | A human-readable explanation specific to this occurrence of the problem | [optional] | diff --git a/sdks/retailmedia_preview/docs/CreateBalanceV2.md b/sdks/retailmedia_preview/docs/CreateBalanceV2.md new file mode 100644 index 00000000..d5081742 --- /dev/null +++ b/sdks/retailmedia_preview/docs/CreateBalanceV2.md @@ -0,0 +1,30 @@ + + +# CreateBalanceV2 + +An object that represents the available options to set when creating a Retail Media Balance + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the balance. | | +|**poNumber** | **String** | Purchase Order number. | [optional] | +|**deposited** | **BigDecimal** | Amount of billable funds allotted to the balance. | [optional] | +|**startDate** | **String** | Start date of the balance in the format YYYY-MM-DD. | | +|**endDate** | **String** | End date of the balance in the format YYYY-MM-DD. | [optional] | +|**spendType** | [**SpendTypeEnum**](#SpendTypeEnum) | Type of the balance spend. | | +|**memo** | **String** | Memo | [optional] | + + + +## Enum: SpendTypeEnum + +| Name | Value | +|---- | -----| +| ONSITE | "Onsite" | +| OFFSITE | "Offsite" | +| OFFSITEAWARENESS | "OffsiteAwareness" | + + + diff --git a/sdks/retailmedia_preview/docs/CreateBalanceV2Request.md b/sdks/retailmedia_preview/docs/CreateBalanceV2Request.md new file mode 100644 index 00000000..30da4273 --- /dev/null +++ b/sdks/retailmedia_preview/docs/CreateBalanceV2Request.md @@ -0,0 +1,14 @@ + + +# CreateBalanceV2Request + +A top-level object that encapsulates a Criteo API request for a single entity + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ResourceOfCreateBalanceV2**](ResourceOfCreateBalanceV2.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/ExternalCatalogStatus.md b/sdks/retailmedia_preview/docs/ExternalCatalogStatus.md new file mode 100644 index 00000000..c5e2a657 --- /dev/null +++ b/sdks/retailmedia_preview/docs/ExternalCatalogStatus.md @@ -0,0 +1,32 @@ + + +# ExternalCatalogStatus + +The status of an asynchronous request to generate a catalog + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | [**StatusEnum**](#StatusEnum) | An enumeration of the status of the catalog. | | +|**currency** | **String** | An ISO4217 representation of the currency products are listed under in this catalog. | | +|**rowCount** | **Integer** | An indication of the number of products contained in this catalog. Available when this catalog reaches a success status. | | +|**fileSizeBytes** | **Integer** | The size of this catalog in bytes. Available when this catalog reaches a success status. | | +|**md5Checksum** | **String** | An MD5 checksum of the catalog for use in confirming complete and uncorrupted retrieval. Available when this catalog reaches a success status. | | +|**createdAt** | **OffsetDateTime** | The time this catalog was created. Represented as a UTC ISO8601 string. | | +|**message** | **String** | An optional information message intended for developer consumption. | | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "unknown" | +| PENDING | "pending" | +| SUCCESS | "success" | +| FAILURE | "failure" | +| EXPIRED | "expired" | + + + diff --git a/sdks/retailmedia_preview/docs/GrantConsentInput.md b/sdks/retailmedia_preview/docs/GrantConsentInput.md index 3bfe8c61..6d19fa57 100644 --- a/sdks/retailmedia_preview/docs/GrantConsentInput.md +++ b/sdks/retailmedia_preview/docs/GrantConsentInput.md @@ -2,7 +2,7 @@ # GrantConsentInput -A top-level object that encapsulates a Criteo API request for a single value. +An object that encapsulates GrantConsentModel ## Properties diff --git a/sdks/retailmedia_preview/docs/GrantConsentModel.md b/sdks/retailmedia_preview/docs/GrantConsentModel.md index 8ca05252..0de1dfcf 100644 --- a/sdks/retailmedia_preview/docs/GrantConsentModel.md +++ b/sdks/retailmedia_preview/docs/GrantConsentModel.md @@ -2,7 +2,7 @@ # GrantConsentModel -An object that represents the required (ClientId and CallbackUrl) and optional (CallbackState) parameters when granting consents on behalf of a Private Market demand account. +An object that represents the required (ClientId and CallbackUrl) and optional (CallbackState) parameters when granting consents on behalf of a Private Market demand account ## Properties diff --git a/sdks/retailmedia_preview/docs/GrantConsentModelValueResource.md b/sdks/retailmedia_preview/docs/GrantConsentModelValueResource.md index 84bacf1b..1169d6ef 100644 --- a/sdks/retailmedia_preview/docs/GrantConsentModelValueResource.md +++ b/sdks/retailmedia_preview/docs/GrantConsentModelValueResource.md @@ -2,7 +2,7 @@ # GrantConsentModelValueResource -A top-level object that encapsulates a Criteo API response for a single value. +A top-level object that encapsulates a Criteo API response for a single value ## Properties diff --git a/sdks/retailmedia_preview/docs/InsertionOrderHistoryChangeDataCapture.md b/sdks/retailmedia_preview/docs/InsertionOrderHistoryChangeDataCaptureV2.md similarity index 80% rename from sdks/retailmedia_preview/docs/InsertionOrderHistoryChangeDataCapture.md rename to sdks/retailmedia_preview/docs/InsertionOrderHistoryChangeDataCaptureV2.md index 43d192ec..aa7d1016 100644 --- a/sdks/retailmedia_preview/docs/InsertionOrderHistoryChangeDataCapture.md +++ b/sdks/retailmedia_preview/docs/InsertionOrderHistoryChangeDataCaptureV2.md @@ -1,6 +1,6 @@ -# InsertionOrderHistoryChangeDataCapture +# InsertionOrderHistoryChangeDataCaptureV2 Data model represents the data change capture of insertion order history. @@ -9,9 +9,9 @@ Data model represents the data change capture of insertion order history. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**dateOfModification** | **OffsetDateTime** | Date when data change has occured. | | -|**modifiedByUser** | **String** | User name who modified the insertion order. | | +|**modifiedByUser** | **String** | Username who modified the insertion order. | | |**changeType** | [**ChangeTypeEnum**](#ChangeTypeEnum) | Represent the type of change states of the history. | | -|**changeDetails** | [**ChangeDetails**](ChangeDetails.md) | | | +|**changeDetails** | [**ChangeDetailsV2**](ChangeDetailsV2.md) | | | |**memo** | **String** | Memo associate with the insertion order modification. | [optional] | @@ -30,7 +30,7 @@ Data model represents the data change capture of insertion order history. | BALANCENAME | "BalanceName" | | PONUMBER | "PoNumber" | | VALUEADD | "ValueAdd" | -| SALESFORCEID | "SalesforceId" | +| UNKNOWN | "Unknown" | diff --git a/sdks/retailmedia_preview/docs/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md b/sdks/retailmedia_preview/docs/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md new file mode 100644 index 00000000..aabd313e --- /dev/null +++ b/sdks/retailmedia_preview/docs/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md @@ -0,0 +1,16 @@ + + +# JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus + +A JSON:API wrapper class to format a with external Id, Type, and Attributes properties + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**type** | **String** | | | +|**attributes** | [**ExternalCatalogStatus**](ExternalCatalogStatus.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.md b/sdks/retailmedia_preview/docs/JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.md new file mode 100644 index 00000000..b4608371 --- /dev/null +++ b/sdks/retailmedia_preview/docs/JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.md @@ -0,0 +1,15 @@ + + +# JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest + +A JSON:API wrapper class to format a with Type, and Attributes properties + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | | +|**attributes** | [**SellerCatalogRequest**](SellerCatalogRequest.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/JsonApiPageResponseOfAccount.md b/sdks/retailmedia_preview/docs/JsonApiPageResponseOfAccount.md index af50ec88..aa059cfb 100644 --- a/sdks/retailmedia_preview/docs/JsonApiPageResponseOfAccount.md +++ b/sdks/retailmedia_preview/docs/JsonApiPageResponseOfAccount.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndAccountAndAccount>**](JsonApiBodyWithIdOfInt64AndAccountAndAccount.md) | | | diff --git a/sdks/retailmedia_preview/docs/JsonApiPageResponseOfBrand.md b/sdks/retailmedia_preview/docs/JsonApiPageResponseOfBrand.md index 0c2714ac..83498f93 100644 --- a/sdks/retailmedia_preview/docs/JsonApiPageResponseOfBrand.md +++ b/sdks/retailmedia_preview/docs/JsonApiPageResponseOfBrand.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndBrandAndBrand>**](JsonApiBodyWithIdOfInt64AndBrandAndBrand.md) | | | diff --git a/sdks/retailmedia_preview/docs/JsonApiPageResponseOfRetailer.md b/sdks/retailmedia_preview/docs/JsonApiPageResponseOfRetailer.md index e62ca2fd..4c29b7d7 100644 --- a/sdks/retailmedia_preview/docs/JsonApiPageResponseOfRetailer.md +++ b/sdks/retailmedia_preview/docs/JsonApiPageResponseOfRetailer.md @@ -10,7 +10,7 @@ A wrapper class to return a single page of with meta |------------ | ------------- | ------------- | -------------| |**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | |**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | -|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**metadata** | [**PageMetadata**](PageMetadata.md) | | | |**data** | [**List<JsonApiBodyWithIdOfInt64AndRetailerAndRetailer>**](JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.md) | | | diff --git a/sdks/retailmedia_preview/docs/JsonApiRequestOfSellerCatalogRequest.md b/sdks/retailmedia_preview/docs/JsonApiRequestOfSellerCatalogRequest.md new file mode 100644 index 00000000..d273183d --- /dev/null +++ b/sdks/retailmedia_preview/docs/JsonApiRequestOfSellerCatalogRequest.md @@ -0,0 +1,14 @@ + + +# JsonApiRequestOfSellerCatalogRequest + +A JSON:API wrapper class to format a with Type, and Attributes properties + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest**](JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/JsonApiSingleResponseOfCatalogStatus.md b/sdks/retailmedia_preview/docs/JsonApiSingleResponseOfCatalogStatus.md new file mode 100644 index 00000000..a7b56d42 --- /dev/null +++ b/sdks/retailmedia_preview/docs/JsonApiSingleResponseOfCatalogStatus.md @@ -0,0 +1,16 @@ + + +# JsonApiSingleResponseOfCatalogStatus + +A JSON:API wrapper class to add one JSON:API within a data property + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus**](JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.md) | | | +|**errors** | [**List<CommonError>**](CommonError.md) | | [optional] | +|**warnings** | [**List<CommonWarning>**](CommonWarning.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/NillableString.md b/sdks/retailmedia_preview/docs/NillableString.md new file mode 100644 index 00000000..3bff8f58 --- /dev/null +++ b/sdks/retailmedia_preview/docs/NillableString.md @@ -0,0 +1,14 @@ + + +# NillableString + +Placeholder object for string value for which \"null\" is a valid business value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **String** | The string's value. If missing or null the string's value is set to \"null\" | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/PageOfBalanceHistoryChangeDataCaptureV1.md b/sdks/retailmedia_preview/docs/PageOfBalanceHistoryChangeDataCaptureV1.md new file mode 100644 index 00000000..7cae5bde --- /dev/null +++ b/sdks/retailmedia_preview/docs/PageOfBalanceHistoryChangeDataCaptureV1.md @@ -0,0 +1,15 @@ + + +# PageOfBalanceHistoryChangeDataCaptureV1 + +A wrapper class to return a single page of items with metadata. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**meta** | [**Metadata**](Metadata.md) | | | +|**data** | [**List<BalanceHistoryChangeDataCaptureV1>**](BalanceHistoryChangeDataCaptureV1.md) | | | + + + diff --git a/sdks/retailmedia_preview/docs/PageOfInsertionOrderHistoryChangeDataCaptureV2.md b/sdks/retailmedia_preview/docs/PageOfInsertionOrderHistoryChangeDataCaptureV2.md new file mode 100644 index 00000000..ea2b7d51 --- /dev/null +++ b/sdks/retailmedia_preview/docs/PageOfInsertionOrderHistoryChangeDataCaptureV2.md @@ -0,0 +1,15 @@ + + +# PageOfInsertionOrderHistoryChangeDataCaptureV2 + +A wrapper class to return a single page of items with metadata. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**meta** | [**Metadata**](Metadata.md) | | | +|**data** | [**List<InsertionOrderHistoryChangeDataCaptureV2>**](InsertionOrderHistoryChangeDataCaptureV2.md) | | | + + + diff --git a/sdks/retailmedia_preview/docs/PagedResourceCollectionOutcomeOfBalanceResponseV2.md b/sdks/retailmedia_preview/docs/PagedResourceCollectionOutcomeOfBalanceResponseV2.md new file mode 100644 index 00000000..9b8afbd3 --- /dev/null +++ b/sdks/retailmedia_preview/docs/PagedResourceCollectionOutcomeOfBalanceResponseV2.md @@ -0,0 +1,17 @@ + + +# PagedResourceCollectionOutcomeOfBalanceResponseV2 + +Data model for a paged list of response resources + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**metadata** | [**PageMetadata**](PageMetadata.md) | | [optional] | +|**data** | [**List<ResourceOfBalanceResponseV2>**](ResourceOfBalanceResponseV2.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/retailmedia_preview/docs/ResourceOfAddFundsToBalanceV2.md b/sdks/retailmedia_preview/docs/ResourceOfAddFundsToBalanceV2.md new file mode 100644 index 00000000..cc3f729c --- /dev/null +++ b/sdks/retailmedia_preview/docs/ResourceOfAddFundsToBalanceV2.md @@ -0,0 +1,16 @@ + + +# ResourceOfAddFundsToBalanceV2 + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**AddFundsToBalanceV2**](AddFundsToBalanceV2.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | Canonical type name of the entity | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/ResourceOfBalanceResponseV2.md b/sdks/retailmedia_preview/docs/ResourceOfBalanceResponseV2.md new file mode 100644 index 00000000..d9269c5b --- /dev/null +++ b/sdks/retailmedia_preview/docs/ResourceOfBalanceResponseV2.md @@ -0,0 +1,16 @@ + + +# ResourceOfBalanceResponseV2 + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**BalanceResponseV2**](BalanceResponseV2.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | Canonical type name of the entity | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/ResourceOfChangeDatesOfBalanceV2.md b/sdks/retailmedia_preview/docs/ResourceOfChangeDatesOfBalanceV2.md new file mode 100644 index 00000000..aace899c --- /dev/null +++ b/sdks/retailmedia_preview/docs/ResourceOfChangeDatesOfBalanceV2.md @@ -0,0 +1,16 @@ + + +# ResourceOfChangeDatesOfBalanceV2 + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**ChangeDatesOfBalanceV2**](ChangeDatesOfBalanceV2.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | Canonical type name of the entity | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/ResourceOfCreateBalanceV2.md b/sdks/retailmedia_preview/docs/ResourceOfCreateBalanceV2.md new file mode 100644 index 00000000..28ce8cbc --- /dev/null +++ b/sdks/retailmedia_preview/docs/ResourceOfCreateBalanceV2.md @@ -0,0 +1,16 @@ + + +# ResourceOfCreateBalanceV2 + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**CreateBalanceV2**](CreateBalanceV2.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | Canonical type name of the entity | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/ResourceOfUpdateBalanceModelV2.md b/sdks/retailmedia_preview/docs/ResourceOfUpdateBalanceModelV2.md new file mode 100644 index 00000000..674a1914 --- /dev/null +++ b/sdks/retailmedia_preview/docs/ResourceOfUpdateBalanceModelV2.md @@ -0,0 +1,16 @@ + + +# ResourceOfUpdateBalanceModelV2 + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**UpdateBalanceModelV2**](UpdateBalanceModelV2.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | Canonical type name of the entity | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RetailMediaContactlistAmendmentAttributes.md b/sdks/retailmedia_preview/docs/RetailMediaContactlistAmendmentAttributes.md index 81f87299..d6918735 100644 --- a/sdks/retailmedia_preview/docs/RetailMediaContactlistAmendmentAttributes.md +++ b/sdks/retailmedia_preview/docs/RetailMediaContactlistAmendmentAttributes.md @@ -27,12 +27,12 @@ Attributes of retail media contact list amendment | Name | Value | |---- | -----| -| EMAIL | "email" | -| MADID | "madid" | -| IDENTITYLINK | "identityLink" | -| GUM | "gum" | -| CUSTOMERID | "customerid" | -| PHONENUMBER | "phoneNumber" | +| EMAIL | "Email" | +| USERIDENTIFIER | "UserIdentifier" | +| IDENTITYLINK | "IdentityLink" | +| GUM | "Gum" | +| CUSTOMERID | "CustomerId" | +| PHONENUMBER | "PhoneNumber" | diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentBulkCreateInputV1.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentBulkCreateInputV1.md new file mode 100644 index 00000000..55c39e29 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentBulkCreateInputV1.md @@ -0,0 +1,14 @@ + + +# RmAudienceSegmentBulkCreateInputV1 + +Input to create one or more audience segments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<RmAudienceSegmentCreateEntityV1Resource>**](RmAudienceSegmentCreateEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentBulkDeleteInputV1.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentBulkDeleteInputV1.md new file mode 100644 index 00000000..dc825753 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentBulkDeleteInputV1.md @@ -0,0 +1,14 @@ + + +# RmAudienceSegmentBulkDeleteInputV1 + +Input to delete one or more segments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<RmAudienceSegmentDeleteEntityV1Resource>**](RmAudienceSegmentDeleteEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentBulkUpdateInputV1.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentBulkUpdateInputV1.md new file mode 100644 index 00000000..a8348a0a --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentBulkUpdateInputV1.md @@ -0,0 +1,14 @@ + + +# RmAudienceSegmentBulkUpdateInputV1 + +Input to update one or more segments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<RmAudienceSegmentUpdateEntityV1Resource>**](RmAudienceSegmentUpdateEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentCreateEntityV1.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentCreateEntityV1.md new file mode 100644 index 00000000..df80905e --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentCreateEntityV1.md @@ -0,0 +1,17 @@ + + +# RmAudienceSegmentCreateEntityV1 + +Set of rules that defines specific people to target. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the segment | [optional] | +|**description** | **String** | Description of the segment | [optional] | +|**retailerId** | **String** | Retailer associated to the segment | [optional] | +|**contactList** | [**RmContactListCreateV1**](RmContactListCreateV1.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentCreateEntityV1Resource.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentCreateEntityV1Resource.md new file mode 100644 index 00000000..59eaeb56 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentCreateEntityV1Resource.md @@ -0,0 +1,15 @@ + + +# RmAudienceSegmentCreateEntityV1Resource + +A top-level object that encapsulates a Criteo API response for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**RmAudienceSegmentCreateEntityV1**](RmAudienceSegmentCreateEntityV1.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentDeleteEntityV1Resource.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentDeleteEntityV1Resource.md new file mode 100644 index 00000000..b7a6df9e --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentDeleteEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# RmAudienceSegmentDeleteEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | **Object** | Segment to delete | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1.md new file mode 100644 index 00000000..59178e59 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1.md @@ -0,0 +1,41 @@ + + +# RmAudienceSegmentEntityV1 + +Set of rules that defines specific people to target. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountId** | **String** | Account associated to the segment | [optional] | +|**name** | **String** | Name of the segment | [optional] | +|**description** | **String** | Description of the segment | [optional] | +|**retailerId** | **String** | Retailer associated to the segment | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Type of segment (read-only) | [optional] | +|**createdAt** | **OffsetDateTime** | ISO-8601 timestamp in UTC of segment creation (read-only) | [optional] | +|**updatedAt** | **OffsetDateTime** | ISO-8601 timestamp in UTC of segment update (read-only) | [optional] | +|**contactList** | [**RmContactListV1**](RmContactListV1.md) | | [optional] | +|**channels** | [**List<ChannelsEnum>**](#List<ChannelsEnum>) | Channels associated to the segment (read-only) | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "Unknown" | +| CONTACTLIST | "ContactList" | + + + +## Enum: List<ChannelsEnum> + +| Name | Value | +|---- | -----| +| UNKNOWN | "Unknown" | +| ONSITE | "Onsite" | +| OFFSITE | "Offsite" | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1ListResponse.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1ListResponse.md new file mode 100644 index 00000000..603b9bfe --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1ListResponse.md @@ -0,0 +1,16 @@ + + +# RmAudienceSegmentEntityV1ListResponse + +A top-level object that encapsulates a Criteo API response for several entities + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<RmAudienceSegmentEntityV1Resource>**](RmAudienceSegmentEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1Resource.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1Resource.md new file mode 100644 index 00000000..4234a048 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# RmAudienceSegmentEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**RmAudienceSegmentEntityV1**](RmAudienceSegmentEntityV1.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.md new file mode 100644 index 00000000..53486af3 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.md @@ -0,0 +1,17 @@ + + +# RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse + +A top-level object that encapsulates a Criteo API response for several entities and metadata + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**meta** | [**RmAudienceSegmentSearchMetadataV1**](RmAudienceSegmentSearchMetadataV1.md) | | [optional] | +|**data** | [**List<RmAudienceSegmentEntityV1Resource>**](RmAudienceSegmentEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentIdEntityV1ListResponse.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentIdEntityV1ListResponse.md new file mode 100644 index 00000000..a612acd7 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentIdEntityV1ListResponse.md @@ -0,0 +1,16 @@ + + +# RmAudienceSegmentIdEntityV1ListResponse + +A top-level object that encapsulates a Criteo API response for several entities + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<RmAudienceSegmentIdEntityV1Resource>**](RmAudienceSegmentIdEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentIdEntityV1Resource.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentIdEntityV1Resource.md new file mode 100644 index 00000000..821f14c8 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentIdEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# RmAudienceSegmentIdEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | **Object** | Audience Segment entity only with its ID | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentSearchEntityV1.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentSearchEntityV1.md new file mode 100644 index 00000000..19a69b7d --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentSearchEntityV1.md @@ -0,0 +1,15 @@ + + +# RmAudienceSegmentSearchEntityV1 + +Available filters to perform a search on audience segments. If present, the filters are AND'ed together when applied. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**audienceSegmentIds** | **List<String>** | List of segment ids | [optional] | +|**retailerIds** | **List<String>** | List of retailer ids | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentSearchEntityV1Resource.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentSearchEntityV1Resource.md new file mode 100644 index 00000000..b7842607 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentSearchEntityV1Resource.md @@ -0,0 +1,15 @@ + + +# RmAudienceSegmentSearchEntityV1Resource + +A top-level object that encapsulates a Criteo API response for a single value + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **String** | | [optional] | +|**attributes** | [**RmAudienceSegmentSearchEntityV1**](RmAudienceSegmentSearchEntityV1.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentSearchInputV1.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentSearchInputV1.md new file mode 100644 index 00000000..9088937a --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentSearchInputV1.md @@ -0,0 +1,14 @@ + + +# RmAudienceSegmentSearchInputV1 + +Audience segment search parameter + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**RmAudienceSegmentSearchEntityV1Resource**](RmAudienceSegmentSearchEntityV1Resource.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentSearchMetadataV1.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentSearchMetadataV1.md new file mode 100644 index 00000000..a8d7727d --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentSearchMetadataV1.md @@ -0,0 +1,16 @@ + + +# RmAudienceSegmentSearchMetadataV1 + +Metadata for the audience segment search response. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**totalItems** | **Integer** | Total number of items | [optional] | +|**limit** | **Integer** | Max item of the current page | [optional] | +|**offset** | **Integer** | Number of item to skip | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentUpdateEntityV1.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentUpdateEntityV1.md new file mode 100644 index 00000000..8b1cc3b2 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentUpdateEntityV1.md @@ -0,0 +1,16 @@ + + +# RmAudienceSegmentUpdateEntityV1 + +Set of rules that defines specific people to target. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the segment | [optional] | +|**description** | [**NillableString**](NillableString.md) | | [optional] | +|**contactList** | **Object** | Settings to update the contact list of the segment | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmAudienceSegmentUpdateEntityV1Resource.md b/sdks/retailmedia_preview/docs/RmAudienceSegmentUpdateEntityV1Resource.md new file mode 100644 index 00000000..30baea39 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmAudienceSegmentUpdateEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# RmAudienceSegmentUpdateEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**RmAudienceSegmentUpdateEntityV1**](RmAudienceSegmentUpdateEntityV1.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmContactListCreateV1.md b/sdks/retailmedia_preview/docs/RmContactListCreateV1.md new file mode 100644 index 00000000..c55f85ab --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmContactListCreateV1.md @@ -0,0 +1,25 @@ + + +# RmContactListCreateV1 + +Settings to target users with your contact lists. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifierType** | [**IdentifierTypeEnum**](#IdentifierTypeEnum) | Indicates contact list type | [optional] | + + + +## Enum: IdentifierTypeEnum + +| Name | Value | +|---- | -----| +| EMAIL | "Email" | +| USERIDENTIFIER | "UserIdentifier" | +| IDENTITYLINK | "IdentityLink" | +| CUSTOMERID | "CustomerId" | + + + diff --git a/sdks/retailmedia_preview/docs/RmContactListStatisticsEntityV1.md b/sdks/retailmedia_preview/docs/RmContactListStatisticsEntityV1.md new file mode 100644 index 00000000..183bbf59 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmContactListStatisticsEntityV1.md @@ -0,0 +1,16 @@ + + +# RmContactListStatisticsEntityV1 + +Contact list statistics. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**numberOfIdentifiers** | **Integer** | Number of identifiers in the contact list. | [optional] | +|**numberOfMatches** | **Integer** | Number of matched identifiers in the contact list. | [optional] | +|**matchRate** | **Double** | Percentage of matched identifiers in the contact list. Can differ from matches/identifiers depending on the contact list type. | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmContactListStatisticsEntityV1Resource.md b/sdks/retailmedia_preview/docs/RmContactListStatisticsEntityV1Resource.md new file mode 100644 index 00000000..128efbe8 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmContactListStatisticsEntityV1Resource.md @@ -0,0 +1,16 @@ + + +# RmContactListStatisticsEntityV1Resource + +A class that represents a domain entity exposed by an API + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**attributes** | [**RmContactListStatisticsEntityV1**](RmContactListStatisticsEntityV1.md) | | [optional] | +|**id** | **String** | Id of the entity | [optional] | +|**type** | **String** | | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/RmContactListStatisticsEntityV1Response.md b/sdks/retailmedia_preview/docs/RmContactListStatisticsEntityV1Response.md new file mode 100644 index 00000000..f9fffb1b --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmContactListStatisticsEntityV1Response.md @@ -0,0 +1,16 @@ + + +# RmContactListStatisticsEntityV1Response + +A top-level object that encapsulates a Criteo API response for a single entity + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**RmContactListStatisticsEntityV1Resource**](RmContactListStatisticsEntityV1Resource.md) | | [optional] | +|**warnings** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | +|**errors** | [**List<CommonProblem>**](CommonProblem.md) | | [optional] [readonly] | + + + diff --git a/sdks/retailmedia_preview/docs/RmContactListV1.md b/sdks/retailmedia_preview/docs/RmContactListV1.md new file mode 100644 index 00000000..80c63e88 --- /dev/null +++ b/sdks/retailmedia_preview/docs/RmContactListV1.md @@ -0,0 +1,27 @@ + + +# RmContactListV1 + +Settings to target users with your contact lists. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isReadOnly** | **Boolean** | Is the segment read-only | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Indicates contact list type | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "Unknown" | +| EMAIL | "Email" | +| USERIDENTIFIER | "UserIdentifier" | +| IDENTITYLINK | "IdentityLink" | +| CUSTOMERID | "CustomerId" | + + + diff --git a/sdks/retailmedia_preview/docs/SellerCatalogRequest.md b/sdks/retailmedia_preview/docs/SellerCatalogRequest.md new file mode 100644 index 00000000..745347e9 --- /dev/null +++ b/sdks/retailmedia_preview/docs/SellerCatalogRequest.md @@ -0,0 +1,14 @@ + + +# SellerCatalogRequest + +Used to requst a catalog of seller SKUs + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**sellers** | [**List<SellerIdentifier>**](SellerIdentifier.md) | A list of sellers to restict the catalog to. | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/SellerIdentifier.md b/sdks/retailmedia_preview/docs/SellerIdentifier.md new file mode 100644 index 00000000..418d4897 --- /dev/null +++ b/sdks/retailmedia_preview/docs/SellerIdentifier.md @@ -0,0 +1,15 @@ + + +# SellerIdentifier + +Identifies a Unique Seller + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**retailerId** | **String** | The retailer Id that the seller operates under | | +|**sellerId** | **String** | The id for the seller based on the corresponding retailer | | + + + diff --git a/sdks/retailmedia_preview/docs/SkuDataPreview.md b/sdks/retailmedia_preview/docs/SkuDataPreview.md index 971113c1..90d14a97 100644 --- a/sdks/retailmedia_preview/docs/SkuDataPreview.md +++ b/sdks/retailmedia_preview/docs/SkuDataPreview.md @@ -11,7 +11,7 @@ Metadata and usage info of a sku search |**skuKey** | **String** | The product SKU Key. | | |**name** | **String** | A short product name. | [optional] | |**description** | **String** | A product description. | [optional] | -|**categoryId** | **String** | The category Id. | [optional] | +|**categoryId** | **String** | The category Id. | | |**category** | **String** | The full category breadcrumb in the retailers catalog. | [optional] | |**isSellerSku** | **Boolean** | An indication of if the sku is seller sku. | [optional] | |**isBuybox** | **Boolean** | Whether the Sku is a Buybox Winner. | [optional] | diff --git a/sdks/retailmedia_preview/docs/SkuSlimDataPreview.md b/sdks/retailmedia_preview/docs/SkuSlimDataPreview.md index 60b217a1..2f96eb26 100644 --- a/sdks/retailmedia_preview/docs/SkuSlimDataPreview.md +++ b/sdks/retailmedia_preview/docs/SkuSlimDataPreview.md @@ -9,7 +9,7 @@ Slim version of Sku Data model | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**name** | **String** | A short product name. | [optional] | -|**categoryId** | **String** | The category Id. | [optional] | +|**categoryId** | **String** | The category Id. | | |**globalCategoryId** | **String** | The global category Id. | [optional] | |**category** | **String** | The full category breadcrumb in the retailers catalog. | [optional] | |**globalBrandId** | **String** | The global brand id associated to the product. | | diff --git a/sdks/retailmedia_preview/docs/SyncCampaignsReport.md b/sdks/retailmedia_preview/docs/SyncCampaignsReport.md index 7ca586f8..a9786396 100644 --- a/sdks/retailmedia_preview/docs/SyncCampaignsReport.md +++ b/sdks/retailmedia_preview/docs/SyncCampaignsReport.md @@ -103,6 +103,8 @@ Campaigns report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_preview/docs/SyncLineItemsReport.md b/sdks/retailmedia_preview/docs/SyncLineItemsReport.md index b7cda58e..5a2e4288 100644 --- a/sdks/retailmedia_preview/docs/SyncLineItemsReport.md +++ b/sdks/retailmedia_preview/docs/SyncLineItemsReport.md @@ -104,6 +104,8 @@ Line Items report body request | SALESCHANNEL | "salesChannel" | | ENVIRONMENT | "environment" | | PAGETYPENAME | "pageTypeName" | +| PAGECATEGORY | "pageCategory" | +| TAXONOMYBREADCRUMB | "taxonomyBreadcrumb" | | KEYWORD | "keyword" | | SEARCHTERM | "searchTerm" | diff --git a/sdks/retailmedia_preview/docs/UpdateBalanceModelV2.md b/sdks/retailmedia_preview/docs/UpdateBalanceModelV2.md new file mode 100644 index 00000000..c732e419 --- /dev/null +++ b/sdks/retailmedia_preview/docs/UpdateBalanceModelV2.md @@ -0,0 +1,18 @@ + + +# UpdateBalanceModelV2 + +An object that represents the available options to set when updating a Retail Media Balance. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the balance. | [optional] | +|**poNumber** | **String** | Purchase Order number. | [optional] | +|**startDate** | **String** | Start date of the balance in the format YYYY-MM-DD. | [optional] | +|**endDate** | **String** | End date of the balance in the format YYYY-MM-DD. | [optional] | +|**memo** | **String** | Memo. | [optional] | + + + diff --git a/sdks/retailmedia_preview/docs/UpdateBalanceModelV2Request.md b/sdks/retailmedia_preview/docs/UpdateBalanceModelV2Request.md new file mode 100644 index 00000000..6e0eb037 --- /dev/null +++ b/sdks/retailmedia_preview/docs/UpdateBalanceModelV2Request.md @@ -0,0 +1,14 @@ + + +# UpdateBalanceModelV2Request + +A top-level object that encapsulates a Criteo API request for a single entity + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**ResourceOfUpdateBalanceModelV2**](ResourceOfUpdateBalanceModelV2.md) | | [optional] | + + + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/ApiClient.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/ApiClient.java index 3b7b7783..5bfbcc82 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/ApiClient.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/ApiClient.java @@ -213,7 +213,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/0.0.240626/java"); + setUserAgent("OpenAPI-Generator/0.0.240731/java"); authentications = new HashMap(); } diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/JSON.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/JSON.java index 375566b3..3c54fb2e 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/JSON.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/JSON.java @@ -93,6 +93,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.AddFundsToBalanceV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.AddFundsToBalanceV2Request.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.AddRemoveKeywordModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.AddRemoveKeywordsModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.AddRemoveKeywordsModelRequest.CustomTypeAdapterFactory()); @@ -112,6 +114,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.AsyncReportResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.AudienceError.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.AudienceWarning.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.BalanceHistoryChangeDataCaptureV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.BalanceResponseV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.BalanceResponseV2Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.BatchAcceptedResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.Brand.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.BrandPreview.CustomTypeAdapterFactory()); @@ -121,12 +126,17 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.CampaignMonthlyBudgetOverride.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.Category.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.Category202204.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ChangeDetails.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ChangeDatesOfBalanceV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ChangeDatesOfBalanceV2Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ChangeDetailsV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ChangeDetailsV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.CommonError.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.CommonProblem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.CommonWarning.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.CpcRateCardPreview.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.CpcRateCardPreviewResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.CreateBalanceV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.CreateBalanceV2Request.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.CreativeV2ListResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.CreativeV2Response.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.CustomAttribute.CustomTypeAdapterFactory()); @@ -136,6 +146,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ExportReportMetaData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ExternalAccount.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ExternalBrand.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ExternalCatalogStatus.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ExternalChoiceVariableValue.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ExternalColorVariableValue.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ExternalCreativeCreateModelV2.CustomTypeAdapterFactory()); @@ -164,15 +175,19 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.InputKeywords.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.InputKeywordsModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.InputResourceOfPreferredLineItemCreateModelV2.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.InsertionOrderHistoryChangeDataCapture.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.InsertionOrderHistoryChangeDataCaptureV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.Installment.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.JsonApiBodyWithIdOfInt64AndAccountAndAccount.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.JsonApiBodyWithIdOfInt64AndBrandAndBrand.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.JsonApiBodyWithIdOfInt64AndLineItemBidMultipliersV2AndLineItemBidMultipliersV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.JsonApiBodyWithIdOfInt64AndRetailerAndRetailer.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.JsonApiPageResponseOfAccount.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.JsonApiPageResponseOfBrand.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.JsonApiPageResponseOfRetailer.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.JsonApiRequestOfSellerCatalogRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.JsonApiSingleResponseOfCatalogStatus.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.JsonApiSingleResponseOfLineItemBidMultipliersV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.KeywordDataModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.Keywords.CustomTypeAdapterFactory()); @@ -185,8 +200,11 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.LoyaltyPoints.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.Metadata.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.MonthlyLineItemBudegetOverride.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.NillableString.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.PageMetadata.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.PageOfInsertionOrderHistoryChangeDataCapture.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.PageOfBalanceHistoryChangeDataCaptureV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.PageOfInsertionOrderHistoryChangeDataCaptureV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.PagedResourceCollectionOutcomeOfBalanceResponseV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.PlacementPreview.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.PlacementPreviewListResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.PreferredLineItemCreateModelV2Request.CustomTypeAdapterFactory()); @@ -226,8 +244,12 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ReportOutcome.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ReportResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceCollectionOutcomeOfSkuSearchResult.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfAddFundsToBalanceV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfBalanceResponseV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfBrandPreview.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfChangeDatesOfBalanceV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfCpcRateCardPreview.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfCreateBalanceV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfCreativeV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfLineItemBidMultipliersV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfPlacementPreview.CustomTypeAdapterFactory()); @@ -235,7 +257,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfPreferredLineItemV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfProductButtonRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfProductButtonResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfRetailMediaAccount.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfSellerPreview.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfSkuDataPreview.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfSkuSearchRequestPreview.CustomTypeAdapterFactory()); @@ -244,19 +265,37 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfSkuSearchResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfSkuSlimDataPreview.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfSkuSlimDataV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOfUpdateBalanceModelV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOutcome.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ResourceOutcomeOfRetailMediaAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RetailMediaAccount.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RetailMediaBrandAccountCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RetailMediaBrands.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RetailMediaContactlistAmendment.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RetailMediaContactlistAmendmentAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RetailMediaContactlistAmendmentRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RetailMediaContactlistOperation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RetailMediaContactlistOperationResponseAttributes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RetailMediaContactlistOperationResponseAttributesAttributes.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RetailMediaSeller.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RetailMediaSellerAccountCreation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentBulkCreateInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentBulkDeleteInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentBulkUpdateInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentCreateEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentCreateEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentDeleteEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentEntityV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentIdEntityV1ListResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentIdEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentSearchEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentSearchEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentSearchInputV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentSearchMetadataV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentUpdateEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmAudienceSegmentUpdateEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmContactListCreateV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmContactListStatisticsEntityV1.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmContactListStatisticsEntityV1Resource.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmContactListStatisticsEntityV1Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmContactListV1.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmLegacyAudienceGetEntityV1.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmLegacyAudienceGetEntityV1ListResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmLegacyAudienceGetEntityV1Resource.CustomTypeAdapterFactory()); @@ -268,6 +307,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmLegacySegmentUserBehaviorV1.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmLegacySegmentUserBehaviorV2.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.RmcaCommonProblem.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.SellerCatalogRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.SellerIdentifier.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.SellerPreview.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.SellerPreviewResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.SetBidModel.CustomTypeAdapterFactory()); @@ -300,20 +341,13 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.SyncLineItemsReport.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.SyncLineItemsReportRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.SyncLineItemsReportResource.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceCollectionInputOfRetailMediaSeller.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceCollectionOutcomeOfRetailMediaSeller.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.UpdateBalanceModelV2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.UpdateBalanceModelV2Request.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceInputOfCampaignBudgetOverrides.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceInputOfLineItemBudgetOverrides.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceInputOfRetailMediaBrandAccountCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceInputOfRetailMediaBrands.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceInputOfRetailMediaSellerAccountCreation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceOfCampaignBudgetOverrides.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceOfLineItemBudgetOverrides.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceOfRecommendedKeywordsResult.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceOfRetailMediaBrandAccountCreation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceOfRetailMediaBrands.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceOfRetailMediaSeller.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceOfRetailMediaSellerAccountCreation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceOutcomeOfCampaignBudgetOverrides.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceOutcomeOfLineItemBudgetOverrides.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.criteo.api.retailmedia.preview.model.ValueResourceOutcomeOfRecommendedKeywordsResult.CustomTypeAdapterFactory()); diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/AccountsApi.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/AccountsApi.java index 837b4d4e..83ff1339 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/AccountsApi.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/AccountsApi.java @@ -28,13 +28,7 @@ import com.criteo.api.retailmedia.preview.model.GrantConsentInput; -import com.criteo.api.retailmedia.preview.model.ResourceOutcomeOfRetailMediaAccount; -import com.criteo.api.retailmedia.preview.model.ValueResourceCollectionInputOfRetailMediaSeller; -import com.criteo.api.retailmedia.preview.model.ValueResourceCollectionOutcomeOfRetailMediaSeller; -import com.criteo.api.retailmedia.preview.model.ValueResourceInputOfRetailMediaBrandAccountCreation; -import com.criteo.api.retailmedia.preview.model.ValueResourceInputOfRetailMediaBrands; -import com.criteo.api.retailmedia.preview.model.ValueResourceInputOfRetailMediaSellerAccountCreation; -import com.criteo.api.retailmedia.preview.model.ValueResourceOfRetailMediaBrands; +import com.criteo.api.retailmedia.preview.model.JsonApiPageResponseOfAccount; import java.lang.reflect.Type; import java.util.ArrayList; @@ -81,9 +75,10 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for addBrands - * @param accountId the account id to update (required) - * @param valueResourceInputOfRetailMediaBrands brands to associate to account (optional) + * Build call for getApiV1ExternalAccounts + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -93,7 +88,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 200 Success - */ - public okhttp3.Call addBrandsCall(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -107,11 +102,10 @@ public okhttp3.Call addBrandsCall(String accountId, ValueResourceInputOfRetailMe basePath = null; } - Object localVarPostBody = valueResourceInputOfRetailMediaBrands; + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/preview/retail-media/account-management/accounts/{accountId}/brands/add" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); + String localVarPath = "/preview/retail-media/accounts"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -119,270 +113,22 @@ public okhttp3.Call addBrandsCall(String accountId, ValueResourceInputOfRetailMe Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); } - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call addBrandsValidateBeforeCall(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling addBrands(Async)"); + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); } - return addBrandsCall(accountId, valueResourceInputOfRetailMediaBrands, _callback); - - } - - /** - * - * Add brands to an account - * @param accountId the account id to update (required) - * @param valueResourceInputOfRetailMediaBrands brands to associate to account (optional) - * @return ValueResourceOfRetailMediaBrands - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ValueResourceOfRetailMediaBrands addBrands(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands) throws ApiException { - ApiResponse localVarResp = addBrandsWithHttpInfo(accountId, valueResourceInputOfRetailMediaBrands); - return localVarResp.getData(); - } - - /** - * - * Add brands to an account - * @param accountId the account id to update (required) - * @param valueResourceInputOfRetailMediaBrands brands to associate to account (optional) - * @return ApiResponse<ValueResourceOfRetailMediaBrands> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse addBrandsWithHttpInfo(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands) throws ApiException { - okhttp3.Call localVarCall = addBrandsValidateBeforeCall(accountId, valueResourceInputOfRetailMediaBrands, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Add brands to an account - * @param accountId the account id to update (required) - * @param valueResourceInputOfRetailMediaBrands brands to associate to account (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call addBrandsAsync(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = addBrandsValidateBeforeCall(accountId, valueResourceInputOfRetailMediaBrands, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createPrivateMarketDemandBrandAccount - * @param accountId Account Id for the parent private market account (required) - * @param valueResourceInputOfRetailMediaBrandAccountCreation Initial creation and configuration options for the new account (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
201 Success -
- */ - public okhttp3.Call createPrivateMarketDemandBrandAccountCall(String accountId, ValueResourceInputOfRetailMediaBrandAccountCreation valueResourceInputOfRetailMediaBrandAccountCreation, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); } - Object localVarPostBody = valueResourceInputOfRetailMediaBrandAccountCreation; - - // create path and map variables - String localVarPath = "/preview/retail-media/account-management/accounts/{accountId}/create-brand-account" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json-patch+json", + "text/plain", "application/json", - "text/json", - "application/*+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createPrivateMarketDemandBrandAccountValidateBeforeCall(String accountId, ValueResourceInputOfRetailMediaBrandAccountCreation valueResourceInputOfRetailMediaBrandAccountCreation, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling createPrivateMarketDemandBrandAccount(Async)"); - } - - return createPrivateMarketDemandBrandAccountCall(accountId, valueResourceInputOfRetailMediaBrandAccountCreation, _callback); - - } - - /** - * - * Creates a new child Demand Brand Account for the provided parent private market account - * @param accountId Account Id for the parent private market account (required) - * @param valueResourceInputOfRetailMediaBrandAccountCreation Initial creation and configuration options for the new account (optional) - * @return ResourceOutcomeOfRetailMediaAccount - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
201 Success -
- */ - public ResourceOutcomeOfRetailMediaAccount createPrivateMarketDemandBrandAccount(String accountId, ValueResourceInputOfRetailMediaBrandAccountCreation valueResourceInputOfRetailMediaBrandAccountCreation) throws ApiException { - ApiResponse localVarResp = createPrivateMarketDemandBrandAccountWithHttpInfo(accountId, valueResourceInputOfRetailMediaBrandAccountCreation); - return localVarResp.getData(); - } - - /** - * - * Creates a new child Demand Brand Account for the provided parent private market account - * @param accountId Account Id for the parent private market account (required) - * @param valueResourceInputOfRetailMediaBrandAccountCreation Initial creation and configuration options for the new account (optional) - * @return ApiResponse<ResourceOutcomeOfRetailMediaAccount> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
201 Success -
- */ - public ApiResponse createPrivateMarketDemandBrandAccountWithHttpInfo(String accountId, ValueResourceInputOfRetailMediaBrandAccountCreation valueResourceInputOfRetailMediaBrandAccountCreation) throws ApiException { - okhttp3.Call localVarCall = createPrivateMarketDemandBrandAccountValidateBeforeCall(accountId, valueResourceInputOfRetailMediaBrandAccountCreation, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Creates a new child Demand Brand Account for the provided parent private market account - * @param accountId Account Id for the parent private market account (required) - * @param valueResourceInputOfRetailMediaBrandAccountCreation Initial creation and configuration options for the new account (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
201 Success -
- */ - public okhttp3.Call createPrivateMarketDemandBrandAccountAsync(String accountId, ValueResourceInputOfRetailMediaBrandAccountCreation valueResourceInputOfRetailMediaBrandAccountCreation, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createPrivateMarketDemandBrandAccountValidateBeforeCall(accountId, valueResourceInputOfRetailMediaBrandAccountCreation, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createPrivateMarketDemandSellerAccount - * @param accountId Account Id for the parent private market account (required) - * @param valueResourceInputOfRetailMediaSellerAccountCreation Initial creation and configuration options for the new account (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
201 Success -
- */ - public okhttp3.Call createPrivateMarketDemandSellerAccountCall(String accountId, ValueResourceInputOfRetailMediaSellerAccountCreation valueResourceInputOfRetailMediaSellerAccountCreation, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = valueResourceInputOfRetailMediaSellerAccountCreation; - - // create path and map variables - String localVarPath = "/preview/retail-media/account-management/accounts/{accountId}/create-seller-account" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" + "text/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -390,10 +136,6 @@ public okhttp3.Call createPrivateMarketDemandSellerAccountCall(String accountId, } final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -401,75 +143,73 @@ public okhttp3.Call createPrivateMarketDemandSellerAccountCall(String accountId, } String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createPrivateMarketDemandSellerAccountValidateBeforeCall(String accountId, ValueResourceInputOfRetailMediaSellerAccountCreation valueResourceInputOfRetailMediaSellerAccountCreation, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling createPrivateMarketDemandSellerAccount(Async)"); - } - - return createPrivateMarketDemandSellerAccountCall(accountId, valueResourceInputOfRetailMediaSellerAccountCreation, _callback); + private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + return getApiV1ExternalAccountsCall(limitToId, pageIndex, pageSize, _callback); } /** * - * Creates a new child Demand Seller Account for the provided parent private market account - * @param accountId Account Id for the parent private market account (required) - * @param valueResourceInputOfRetailMediaSellerAccountCreation Initial creation and configuration options for the new account (optional) - * @return ResourceOutcomeOfRetailMediaAccount + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return JsonApiPageResponseOfAccount * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
*/ - public ResourceOutcomeOfRetailMediaAccount createPrivateMarketDemandSellerAccount(String accountId, ValueResourceInputOfRetailMediaSellerAccountCreation valueResourceInputOfRetailMediaSellerAccountCreation) throws ApiException { - ApiResponse localVarResp = createPrivateMarketDemandSellerAccountWithHttpInfo(accountId, valueResourceInputOfRetailMediaSellerAccountCreation); + public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV1ExternalAccountsWithHttpInfo(limitToId, pageIndex, pageSize); return localVarResp.getData(); } /** * - * Creates a new child Demand Seller Account for the provided parent private market account - * @param accountId Account Id for the parent private market account (required) - * @param valueResourceInputOfRetailMediaSellerAccountCreation Initial creation and configuration options for the new account (optional) - * @return ApiResponse<ResourceOutcomeOfRetailMediaAccount> + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) + * @return ApiResponse<JsonApiPageResponseOfAccount> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
*/ - public ApiResponse createPrivateMarketDemandSellerAccountWithHttpInfo(String accountId, ValueResourceInputOfRetailMediaSellerAccountCreation valueResourceInputOfRetailMediaSellerAccountCreation) throws ApiException { - okhttp3.Call localVarCall = createPrivateMarketDemandSellerAccountValidateBeforeCall(accountId, valueResourceInputOfRetailMediaSellerAccountCreation, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getApiV1ExternalAccountsWithHttpInfo(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) - * Creates a new child Demand Seller Account for the provided parent private market account - * @param accountId Account Id for the parent private market account (required) - * @param valueResourceInputOfRetailMediaSellerAccountCreation Initial creation and configuration options for the new account (optional) + * Gets page of account objects that the current user can access + * @param limitToId The ids that you would like to limit your result set to (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
201 Success -
200 Success -
*/ - public okhttp3.Call createPrivateMarketDemandSellerAccountAsync(String accountId, ValueResourceInputOfRetailMediaSellerAccountCreation valueResourceInputOfRetailMediaSellerAccountCreation, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getApiV1ExternalAccountsAsync(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createPrivateMarketDemandSellerAccountValidateBeforeCall(accountId, valueResourceInputOfRetailMediaSellerAccountCreation, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -599,266 +339,4 @@ public okhttp3.Call grantConsentAsync(String accountId, GrantConsentInput grantC localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } - /** - * Build call for removeBrands - * @param accountId the account id to update (required) - * @param valueResourceInputOfRetailMediaBrands (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call removeBrandsCall(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = valueResourceInputOfRetailMediaBrands; - - // create path and map variables - String localVarPath = "/preview/retail-media/account-management/accounts/{accountId}/brands/remove" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call removeBrandsValidateBeforeCall(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling removeBrands(Async)"); - } - - return removeBrandsCall(accountId, valueResourceInputOfRetailMediaBrands, _callback); - - } - - /** - * - * Remove a brand from an account - * @param accountId the account id to update (required) - * @param valueResourceInputOfRetailMediaBrands (optional) - * @return ValueResourceOfRetailMediaBrands - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ValueResourceOfRetailMediaBrands removeBrands(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands) throws ApiException { - ApiResponse localVarResp = removeBrandsWithHttpInfo(accountId, valueResourceInputOfRetailMediaBrands); - return localVarResp.getData(); - } - - /** - * - * Remove a brand from an account - * @param accountId the account id to update (required) - * @param valueResourceInputOfRetailMediaBrands (optional) - * @return ApiResponse<ValueResourceOfRetailMediaBrands> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse removeBrandsWithHttpInfo(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands) throws ApiException { - okhttp3.Call localVarCall = removeBrandsValidateBeforeCall(accountId, valueResourceInputOfRetailMediaBrands, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Remove a brand from an account - * @param accountId the account id to update (required) - * @param valueResourceInputOfRetailMediaBrands (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call removeBrandsAsync(String accountId, ValueResourceInputOfRetailMediaBrands valueResourceInputOfRetailMediaBrands, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = removeBrandsValidateBeforeCall(accountId, valueResourceInputOfRetailMediaBrands, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateSellers - * @param accountId the account id to update (required) - * @param valueResourceCollectionInputOfRetailMediaSeller sellers to associate (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call updateSellersCall(String accountId, ValueResourceCollectionInputOfRetailMediaSeller valueResourceCollectionInputOfRetailMediaSeller, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = valueResourceCollectionInputOfRetailMediaSeller; - - // create path and map variables - String localVarPath = "/preview/retail-media/account-management/accounts/{accountId}/sellers" - .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateSellersValidateBeforeCall(String accountId, ValueResourceCollectionInputOfRetailMediaSeller valueResourceCollectionInputOfRetailMediaSeller, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'accountId' is set - if (accountId == null) { - throw new ApiException("Missing the required parameter 'accountId' when calling updateSellers(Async)"); - } - - return updateSellersCall(accountId, valueResourceCollectionInputOfRetailMediaSeller, _callback); - - } - - /** - * - * replace the sellers assoiated with an account - * @param accountId the account id to update (required) - * @param valueResourceCollectionInputOfRetailMediaSeller sellers to associate (optional) - * @return ValueResourceCollectionOutcomeOfRetailMediaSeller - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ValueResourceCollectionOutcomeOfRetailMediaSeller updateSellers(String accountId, ValueResourceCollectionInputOfRetailMediaSeller valueResourceCollectionInputOfRetailMediaSeller) throws ApiException { - ApiResponse localVarResp = updateSellersWithHttpInfo(accountId, valueResourceCollectionInputOfRetailMediaSeller); - return localVarResp.getData(); - } - - /** - * - * replace the sellers assoiated with an account - * @param accountId the account id to update (required) - * @param valueResourceCollectionInputOfRetailMediaSeller sellers to associate (optional) - * @return ApiResponse<ValueResourceCollectionOutcomeOfRetailMediaSeller> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse updateSellersWithHttpInfo(String accountId, ValueResourceCollectionInputOfRetailMediaSeller valueResourceCollectionInputOfRetailMediaSeller) throws ApiException { - okhttp3.Call localVarCall = updateSellersValidateBeforeCall(accountId, valueResourceCollectionInputOfRetailMediaSeller, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * replace the sellers assoiated with an account - * @param accountId the account id to update (required) - * @param valueResourceCollectionInputOfRetailMediaSeller sellers to associate (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call updateSellersAsync(String accountId, ValueResourceCollectionInputOfRetailMediaSeller valueResourceCollectionInputOfRetailMediaSeller, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateSellersValidateBeforeCall(accountId, valueResourceCollectionInputOfRetailMediaSeller, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } } diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/AudienceApi.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/AudienceApi.java index a6d6972c..f65cb270 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/AudienceApi.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/AudienceApi.java @@ -30,6 +30,14 @@ import com.criteo.api.retailmedia.preview.model.ErrorCodeResponse; import com.criteo.api.retailmedia.preview.model.RetailMediaContactlistAmendmentRequest; import com.criteo.api.retailmedia.preview.model.RetailMediaContactlistOperation; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentBulkCreateInputV1; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentBulkDeleteInputV1; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentBulkUpdateInputV1; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentEntityV1ListResponse; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentIdEntityV1ListResponse; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentSearchInputV1; +import com.criteo.api.retailmedia.preview.model.RmContactListStatisticsEntityV1Response; import com.criteo.api.retailmedia.preview.model.RmLegacyAudienceGetEntityV1ListResponse; import com.criteo.api.retailmedia.preview.model.RmLegacyAudienceGetEntityV2ListResponse; @@ -77,6 +85,456 @@ public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } + /** + * Build call for bulkCreateV1 + * @param accountId Account Id (required) + * @param rmAudienceSegmentBulkCreateInputV1 Segment creation parameter (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkCreateV1Call(String accountId, RmAudienceSegmentBulkCreateInputV1 rmAudienceSegmentBulkCreateInputV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = rmAudienceSegmentBulkCreateInputV1; + + // create path and map variables + String localVarPath = "/preview/retail-media/accounts/{account-id}/audience-segments/create" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call bulkCreateV1ValidateBeforeCall(String accountId, RmAudienceSegmentBulkCreateInputV1 rmAudienceSegmentBulkCreateInputV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling bulkCreateV1(Async)"); + } + + // verify the required parameter 'rmAudienceSegmentBulkCreateInputV1' is set + if (rmAudienceSegmentBulkCreateInputV1 == null) { + throw new ApiException("Missing the required parameter 'rmAudienceSegmentBulkCreateInputV1' when calling bulkCreateV1(Async)"); + } + + return bulkCreateV1Call(accountId, rmAudienceSegmentBulkCreateInputV1, _callback); + + } + + /** + * + * Creates all segments with a valid configuration, and returns the full segments. For those that cannot be created, one or multiple errors are returned. + * @param accountId Account Id (required) + * @param rmAudienceSegmentBulkCreateInputV1 Segment creation parameter (required) + * @return RmAudienceSegmentEntityV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public RmAudienceSegmentEntityV1ListResponse bulkCreateV1(String accountId, RmAudienceSegmentBulkCreateInputV1 rmAudienceSegmentBulkCreateInputV1) throws ApiException { + ApiResponse localVarResp = bulkCreateV1WithHttpInfo(accountId, rmAudienceSegmentBulkCreateInputV1); + return localVarResp.getData(); + } + + /** + * + * Creates all segments with a valid configuration, and returns the full segments. For those that cannot be created, one or multiple errors are returned. + * @param accountId Account Id (required) + * @param rmAudienceSegmentBulkCreateInputV1 Segment creation parameter (required) + * @return ApiResponse<RmAudienceSegmentEntityV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse bulkCreateV1WithHttpInfo(String accountId, RmAudienceSegmentBulkCreateInputV1 rmAudienceSegmentBulkCreateInputV1) throws ApiException { + okhttp3.Call localVarCall = bulkCreateV1ValidateBeforeCall(accountId, rmAudienceSegmentBulkCreateInputV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Creates all segments with a valid configuration, and returns the full segments. For those that cannot be created, one or multiple errors are returned. + * @param accountId Account Id (required) + * @param rmAudienceSegmentBulkCreateInputV1 Segment creation parameter (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkCreateV1Async(String accountId, RmAudienceSegmentBulkCreateInputV1 rmAudienceSegmentBulkCreateInputV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = bulkCreateV1ValidateBeforeCall(accountId, rmAudienceSegmentBulkCreateInputV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for bulkDeleteV1 + * @param accountId Account id (required) + * @param rmAudienceSegmentBulkDeleteInputV1 Segment delete request. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkDeleteV1Call(String accountId, RmAudienceSegmentBulkDeleteInputV1 rmAudienceSegmentBulkDeleteInputV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = rmAudienceSegmentBulkDeleteInputV1; + + // create path and map variables + String localVarPath = "/preview/retail-media/accounts/{account-id}/audience-segments/delete" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call bulkDeleteV1ValidateBeforeCall(String accountId, RmAudienceSegmentBulkDeleteInputV1 rmAudienceSegmentBulkDeleteInputV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling bulkDeleteV1(Async)"); + } + + // verify the required parameter 'rmAudienceSegmentBulkDeleteInputV1' is set + if (rmAudienceSegmentBulkDeleteInputV1 == null) { + throw new ApiException("Missing the required parameter 'rmAudienceSegmentBulkDeleteInputV1' when calling bulkDeleteV1(Async)"); + } + + return bulkDeleteV1Call(accountId, rmAudienceSegmentBulkDeleteInputV1, _callback); + + } + + /** + * + * Delete the segments associated to the given audience IDs. + * @param accountId Account id (required) + * @param rmAudienceSegmentBulkDeleteInputV1 Segment delete request. (required) + * @return RmAudienceSegmentIdEntityV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public RmAudienceSegmentIdEntityV1ListResponse bulkDeleteV1(String accountId, RmAudienceSegmentBulkDeleteInputV1 rmAudienceSegmentBulkDeleteInputV1) throws ApiException { + ApiResponse localVarResp = bulkDeleteV1WithHttpInfo(accountId, rmAudienceSegmentBulkDeleteInputV1); + return localVarResp.getData(); + } + + /** + * + * Delete the segments associated to the given audience IDs. + * @param accountId Account id (required) + * @param rmAudienceSegmentBulkDeleteInputV1 Segment delete request. (required) + * @return ApiResponse<RmAudienceSegmentIdEntityV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse bulkDeleteV1WithHttpInfo(String accountId, RmAudienceSegmentBulkDeleteInputV1 rmAudienceSegmentBulkDeleteInputV1) throws ApiException { + okhttp3.Call localVarCall = bulkDeleteV1ValidateBeforeCall(accountId, rmAudienceSegmentBulkDeleteInputV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Delete the segments associated to the given audience IDs. + * @param accountId Account id (required) + * @param rmAudienceSegmentBulkDeleteInputV1 Segment delete request. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkDeleteV1Async(String accountId, RmAudienceSegmentBulkDeleteInputV1 rmAudienceSegmentBulkDeleteInputV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = bulkDeleteV1ValidateBeforeCall(accountId, rmAudienceSegmentBulkDeleteInputV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for bulkUpdateV1 + * @param accountId Account id (required) + * @param rmAudienceSegmentBulkUpdateInputV1 Segment Update request (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkUpdateV1Call(String accountId, RmAudienceSegmentBulkUpdateInputV1 rmAudienceSegmentBulkUpdateInputV1, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = rmAudienceSegmentBulkUpdateInputV1; + + // create path and map variables + String localVarPath = "/preview/retail-media/accounts/{account-id}/audience-segments" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call bulkUpdateV1ValidateBeforeCall(String accountId, RmAudienceSegmentBulkUpdateInputV1 rmAudienceSegmentBulkUpdateInputV1, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling bulkUpdateV1(Async)"); + } + + // verify the required parameter 'rmAudienceSegmentBulkUpdateInputV1' is set + if (rmAudienceSegmentBulkUpdateInputV1 == null) { + throw new ApiException("Missing the required parameter 'rmAudienceSegmentBulkUpdateInputV1' when calling bulkUpdateV1(Async)"); + } + + return bulkUpdateV1Call(accountId, rmAudienceSegmentBulkUpdateInputV1, _callback); + + } + + /** + * + * Updates the properties of all segments with a valid configuration, and returns the full segments. For those that cannot be updated, one or multiple errors are returned. + * @param accountId Account id (required) + * @param rmAudienceSegmentBulkUpdateInputV1 Segment Update request (required) + * @return RmAudienceSegmentEntityV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public RmAudienceSegmentEntityV1ListResponse bulkUpdateV1(String accountId, RmAudienceSegmentBulkUpdateInputV1 rmAudienceSegmentBulkUpdateInputV1) throws ApiException { + ApiResponse localVarResp = bulkUpdateV1WithHttpInfo(accountId, rmAudienceSegmentBulkUpdateInputV1); + return localVarResp.getData(); + } + + /** + * + * Updates the properties of all segments with a valid configuration, and returns the full segments. For those that cannot be updated, one or multiple errors are returned. + * @param accountId Account id (required) + * @param rmAudienceSegmentBulkUpdateInputV1 Segment Update request (required) + * @return ApiResponse<RmAudienceSegmentEntityV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse bulkUpdateV1WithHttpInfo(String accountId, RmAudienceSegmentBulkUpdateInputV1 rmAudienceSegmentBulkUpdateInputV1) throws ApiException { + okhttp3.Call localVarCall = bulkUpdateV1ValidateBeforeCall(accountId, rmAudienceSegmentBulkUpdateInputV1, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Updates the properties of all segments with a valid configuration, and returns the full segments. For those that cannot be updated, one or multiple errors are returned. + * @param accountId Account id (required) + * @param rmAudienceSegmentBulkUpdateInputV1 Segment Update request (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call bulkUpdateV1Async(String accountId, RmAudienceSegmentBulkUpdateInputV1 rmAudienceSegmentBulkUpdateInputV1, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = bulkUpdateV1ValidateBeforeCall(accountId, rmAudienceSegmentBulkUpdateInputV1, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for deleteContactListIdentifiers * @param audienceSegmentId The id of the contact list audience-segment to amend, we only accept external Id here (required) @@ -200,6 +658,153 @@ public okhttp3.Call deleteContactListIdentifiersAsync(Long audienceSegmentId, fi localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } + /** + * Build call for getContactListStatisticsV1 + * @param accountId Account Id (required) + * @param audienceSegmentId Segment Id. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call getContactListStatisticsV1Call(String accountId, String audienceSegmentId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/preview/retail-media/accounts/{account-id}/audience-segments/{audience-segment-id}/contact-list" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "audience-segment-id" + "}", localVarApiClient.escapeString(audienceSegmentId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getContactListStatisticsV1ValidateBeforeCall(String accountId, String audienceSegmentId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getContactListStatisticsV1(Async)"); + } + + // verify the required parameter 'audienceSegmentId' is set + if (audienceSegmentId == null) { + throw new ApiException("Missing the required parameter 'audienceSegmentId' when calling getContactListStatisticsV1(Async)"); + } + + return getContactListStatisticsV1Call(accountId, audienceSegmentId, _callback); + + } + + /** + * + * Returns the statistics of a contact list segment. + * @param accountId Account Id (required) + * @param audienceSegmentId Segment Id. (required) + * @return RmContactListStatisticsEntityV1Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public RmContactListStatisticsEntityV1Response getContactListStatisticsV1(String accountId, String audienceSegmentId) throws ApiException { + ApiResponse localVarResp = getContactListStatisticsV1WithHttpInfo(accountId, audienceSegmentId); + return localVarResp.getData(); + } + + /** + * + * Returns the statistics of a contact list segment. + * @param accountId Account Id (required) + * @param audienceSegmentId Segment Id. (required) + * @return ApiResponse<RmContactListStatisticsEntityV1Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse getContactListStatisticsV1WithHttpInfo(String accountId, String audienceSegmentId) throws ApiException { + okhttp3.Call localVarCall = getContactListStatisticsV1ValidateBeforeCall(accountId, audienceSegmentId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Returns the statistics of a contact list segment. + * @param accountId Account Id (required) + * @param audienceSegmentId Segment Id. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call getContactListStatisticsV1Async(String accountId, String audienceSegmentId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getContactListStatisticsV1ValidateBeforeCall(accountId, audienceSegmentId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for legacyGetAudienceV1 * @param accountId ID of the account to which this audience belongs. (required) @@ -522,6 +1127,172 @@ public okhttp3.Call legacyGetAudienceV2Async(Long accountId, List limit localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for searchV1 + * @param accountId Account Id (required) + * @param rmAudienceSegmentSearchInputV1 Segment creation parameter (required) + * @param limit The number of elements to be returned. The default is 50 and the maximum is 100. (optional, default to 50) + * @param offset The (zero-based) offset into the collection. The default is 0. (optional, default to 0) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call searchV1Call(String accountId, RmAudienceSegmentSearchInputV1 rmAudienceSegmentSearchInputV1, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = rmAudienceSegmentSearchInputV1; + + // create path and map variables + String localVarPath = "/preview/retail-media/accounts/{account-id}/audience-segments/search" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json-patch+json", + "application/json", + "text/json", + "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call searchV1ValidateBeforeCall(String accountId, RmAudienceSegmentSearchInputV1 rmAudienceSegmentSearchInputV1, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling searchV1(Async)"); + } + + // verify the required parameter 'rmAudienceSegmentSearchInputV1' is set + if (rmAudienceSegmentSearchInputV1 == null) { + throw new ApiException("Missing the required parameter 'rmAudienceSegmentSearchInputV1' when calling searchV1(Async)"); + } + + return searchV1Call(accountId, rmAudienceSegmentSearchInputV1, limit, offset, _callback); + + } + + /** + * + * Search segments based on the provided filters.( by ids or retailer ids) + * @param accountId Account Id (required) + * @param rmAudienceSegmentSearchInputV1 Segment creation parameter (required) + * @param limit The number of elements to be returned. The default is 50 and the maximum is 100. (optional, default to 50) + * @param offset The (zero-based) offset into the collection. The default is 0. (optional, default to 0) + * @return RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse searchV1(String accountId, RmAudienceSegmentSearchInputV1 rmAudienceSegmentSearchInputV1, Integer limit, Integer offset) throws ApiException { + ApiResponse localVarResp = searchV1WithHttpInfo(accountId, rmAudienceSegmentSearchInputV1, limit, offset); + return localVarResp.getData(); + } + + /** + * + * Search segments based on the provided filters.( by ids or retailer ids) + * @param accountId Account Id (required) + * @param rmAudienceSegmentSearchInputV1 Segment creation parameter (required) + * @param limit The number of elements to be returned. The default is 50 and the maximum is 100. (optional, default to 50) + * @param offset The (zero-based) offset into the collection. The default is 0. (optional, default to 0) + * @return ApiResponse<RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public ApiResponse searchV1WithHttpInfo(String accountId, RmAudienceSegmentSearchInputV1 rmAudienceSegmentSearchInputV1, Integer limit, Integer offset) throws ApiException { + okhttp3.Call localVarCall = searchV1ValidateBeforeCall(accountId, rmAudienceSegmentSearchInputV1, limit, offset, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Search segments based on the provided filters.( by ids or retailer ids) + * @param accountId Account Id (required) + * @param rmAudienceSegmentSearchInputV1 Segment creation parameter (required) + * @param limit The number of elements to be returned. The default is 50 and the maximum is 100. (optional, default to 50) + * @param offset The (zero-based) offset into the collection. The default is 0. (optional, default to 0) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success or partial success -
400 Bad request -
401 The API client is not properly authenticated. -
403 The API client is not authorized to access this resource. -
+ */ + public okhttp3.Call searchV1Async(String accountId, RmAudienceSegmentSearchInputV1 rmAudienceSegmentSearchInputV1, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = searchV1ValidateBeforeCall(accountId, rmAudienceSegmentSearchInputV1, limit, offset, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for updateContactListIdentifiers * @param audienceSegmentId The id of the contact list audience-segment to amend, we only accept external Id here (required) diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/BalanceApi.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/BalanceApi.java new file mode 100644 index 00000000..04d11f6a --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/BalanceApi.java @@ -0,0 +1,1098 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.api; + +import com.criteo.api.retailmedia.preview.ApiCallback; +import com.criteo.api.retailmedia.preview.ApiClient; +import com.criteo.api.retailmedia.preview.ApiException; +import com.criteo.api.retailmedia.preview.ApiResponse; +import com.criteo.api.retailmedia.preview.Configuration; +import com.criteo.api.retailmedia.preview.Pair; +import com.criteo.api.retailmedia.preview.ProgressRequestBody; +import com.criteo.api.retailmedia.preview.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.criteo.api.retailmedia.preview.model.AddFundsToBalanceV2Request; +import com.criteo.api.retailmedia.preview.model.BalanceResponseV2Response; +import com.criteo.api.retailmedia.preview.model.ChangeDatesOfBalanceV2Request; +import com.criteo.api.retailmedia.preview.model.CreateBalanceV2Request; +import com.criteo.api.retailmedia.preview.model.PageOfBalanceHistoryChangeDataCaptureV1; +import com.criteo.api.retailmedia.preview.model.PagedResourceCollectionOutcomeOfBalanceResponseV2; +import com.criteo.api.retailmedia.preview.model.UpdateBalanceModelV2Request; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class BalanceApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public BalanceApi() { + this(Configuration.getDefaultApiClient()); + } + + public BalanceApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for getApiV2ExternalAccountBalancesByAccountId + * @param accountId The account to get balances for (required) + * @param limitToId The ids that you would like to limit your result set to (required) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (required) + * @param pageSize The maximum number of items you would like to receive in this request (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV2ExternalAccountBalancesByAccountIdCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/preview/retail-media/accounts/{account-id}/balances" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limitToId != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); + } + + if (pageIndex != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); + } + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV2ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV2ExternalAccountBalancesByAccountId(Async)"); + } + + // verify the required parameter 'limitToId' is set + if (limitToId == null) { + throw new ApiException("Missing the required parameter 'limitToId' when calling getApiV2ExternalAccountBalancesByAccountId(Async)"); + } + + // verify the required parameter 'pageIndex' is set + if (pageIndex == null) { + throw new ApiException("Missing the required parameter 'pageIndex' when calling getApiV2ExternalAccountBalancesByAccountId(Async)"); + } + + // verify the required parameter 'pageSize' is set + if (pageSize == null) { + throw new ApiException("Missing the required parameter 'pageSize' when calling getApiV2ExternalAccountBalancesByAccountId(Async)"); + } + + return getApiV2ExternalAccountBalancesByAccountIdCall(accountId, limitToId, pageIndex, pageSize, _callback); + + } + + /** + * + * Gets page of balance objects for the given account id + * @param accountId The account to get balances for (required) + * @param limitToId The ids that you would like to limit your result set to (required) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (required) + * @param pageSize The maximum number of items you would like to receive in this request (required) + * @return PagedResourceCollectionOutcomeOfBalanceResponseV2 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public PagedResourceCollectionOutcomeOfBalanceResponseV2 getApiV2ExternalAccountBalancesByAccountId(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, limitToId, pageIndex, pageSize); + return localVarResp.getData(); + } + + /** + * + * Gets page of balance objects for the given account id + * @param accountId The account to get balances for (required) + * @param limitToId The ids that you would like to limit your result set to (required) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (required) + * @param pageSize The maximum number of items you would like to receive in this request (required) + * @return ApiResponse<PagedResourceCollectionOutcomeOfBalanceResponseV2> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV2ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets page of balance objects for the given account id + * @param accountId The account to get balances for (required) + * @param limitToId The ids that you would like to limit your result set to (required) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (required) + * @param pageSize The maximum number of items you would like to receive in this request (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV2ExternalAccountBalancesByAccountIdAsync(String accountId, List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV2ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, limitToId, pageIndex, pageSize, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getApiV2ExternalAccountByAccountIdBalancesbalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV2ExternalAccountByAccountIdBalancesbalanceIdCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/preview/retail-media/accounts/{account-id}/balances/{balance-id}" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getApiV2ExternalAccountByAccountIdBalancesbalanceIdValidateBeforeCall(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling getApiV2ExternalAccountByAccountIdBalancesbalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling getApiV2ExternalAccountByAccountIdBalancesbalanceId(Async)"); + } + + return getApiV2ExternalAccountByAccountIdBalancesbalanceIdCall(accountId, balanceId, _callback); + + } + + /** + * + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @return BalanceResponseV2Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponseV2Response getApiV2ExternalAccountByAccountIdBalancesbalanceId(String accountId, String balanceId) throws ApiException { + ApiResponse localVarResp = getApiV2ExternalAccountByAccountIdBalancesbalanceIdWithHttpInfo(accountId, balanceId); + return localVarResp.getData(); + } + + /** + * + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @return ApiResponse<BalanceResponseV2Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getApiV2ExternalAccountByAccountIdBalancesbalanceIdWithHttpInfo(String accountId, String balanceId) throws ApiException { + okhttp3.Call localVarCall = getApiV2ExternalAccountByAccountIdBalancesbalanceIdValidateBeforeCall(accountId, balanceId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get a balance for the given account id and balance id + * @param accountId The account of the balance (required) + * @param balanceId The balance id (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getApiV2ExternalAccountByAccountIdBalancesbalanceIdAsync(String accountId, String balanceId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getApiV2ExternalAccountByAccountIdBalancesbalanceIdValidateBeforeCall(accountId, balanceId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getBalanceHistory + * @param balanceId Balance id. (required) + * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) + * @param limit The number of elements to be returned. (optional, default to 25) + * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getBalanceHistoryCall(String balanceId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/preview/retail-media/balances/{balanceId}/history" + .replace("{" + "balanceId" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (limitToChangeTypes != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limitToChangeTypes", limitToChangeTypes)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getBalanceHistoryValidateBeforeCall(String balanceId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling getBalanceHistory(Async)"); + } + + return getBalanceHistoryCall(balanceId, offset, limit, limitToChangeTypes, _callback); + + } + + /** + * + * Gets the balance's historical change data. + * @param balanceId Balance id. (required) + * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) + * @param limit The number of elements to be returned. (optional, default to 25) + * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) + * @return PageOfBalanceHistoryChangeDataCaptureV1 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public PageOfBalanceHistoryChangeDataCaptureV1 getBalanceHistory(String balanceId, Integer offset, Integer limit, String limitToChangeTypes) throws ApiException { + ApiResponse localVarResp = getBalanceHistoryWithHttpInfo(balanceId, offset, limit, limitToChangeTypes); + return localVarResp.getData(); + } + + /** + * + * Gets the balance's historical change data. + * @param balanceId Balance id. (required) + * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) + * @param limit The number of elements to be returned. (optional, default to 25) + * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) + * @return ApiResponse<PageOfBalanceHistoryChangeDataCaptureV1> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse getBalanceHistoryWithHttpInfo(String balanceId, Integer offset, Integer limit, String limitToChangeTypes) throws ApiException { + okhttp3.Call localVarCall = getBalanceHistoryValidateBeforeCall(balanceId, offset, limit, limitToChangeTypes, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Gets the balance's historical change data. + * @param balanceId Balance id. (required) + * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) + * @param limit The number of elements to be returned. (optional, default to 25) + * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call getBalanceHistoryAsync(String balanceId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getBalanceHistoryValidateBeforeCall(balanceId, offset, limit, limitToChangeTypes, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for patchApiV2ExternalAccountByAccountIdBalancesbalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelV2Request An object that represents the available options to modify a balance. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call patchApiV2ExternalAccountByAccountIdBalancesbalanceIdCall(String accountId, String balanceId, UpdateBalanceModelV2Request updateBalanceModelV2Request, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateBalanceModelV2Request; + + // create path and map variables + String localVarPath = "/preview/retail-media/accounts/{account-id}/balances/{balance-id}" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call patchApiV2ExternalAccountByAccountIdBalancesbalanceIdValidateBeforeCall(String accountId, String balanceId, UpdateBalanceModelV2Request updateBalanceModelV2Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling patchApiV2ExternalAccountByAccountIdBalancesbalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling patchApiV2ExternalAccountByAccountIdBalancesbalanceId(Async)"); + } + + // verify the required parameter 'updateBalanceModelV2Request' is set + if (updateBalanceModelV2Request == null) { + throw new ApiException("Missing the required parameter 'updateBalanceModelV2Request' when calling patchApiV2ExternalAccountByAccountIdBalancesbalanceId(Async)"); + } + + return patchApiV2ExternalAccountByAccountIdBalancesbalanceIdCall(accountId, balanceId, updateBalanceModelV2Request, _callback); + + } + + /** + * + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelV2Request An object that represents the available options to modify a balance. (required) + * @return BalanceResponseV2Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponseV2Response patchApiV2ExternalAccountByAccountIdBalancesbalanceId(String accountId, String balanceId, UpdateBalanceModelV2Request updateBalanceModelV2Request) throws ApiException { + ApiResponse localVarResp = patchApiV2ExternalAccountByAccountIdBalancesbalanceIdWithHttpInfo(accountId, balanceId, updateBalanceModelV2Request); + return localVarResp.getData(); + } + + /** + * + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelV2Request An object that represents the available options to modify a balance. (required) + * @return ApiResponse<BalanceResponseV2Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse patchApiV2ExternalAccountByAccountIdBalancesbalanceIdWithHttpInfo(String accountId, String balanceId, UpdateBalanceModelV2Request updateBalanceModelV2Request) throws ApiException { + okhttp3.Call localVarCall = patchApiV2ExternalAccountByAccountIdBalancesbalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelV2Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Modify a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param updateBalanceModelV2Request An object that represents the available options to modify a balance. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call patchApiV2ExternalAccountByAccountIdBalancesbalanceIdAsync(String accountId, String balanceId, UpdateBalanceModelV2Request updateBalanceModelV2Request, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = patchApiV2ExternalAccountByAccountIdBalancesbalanceIdValidateBeforeCall(accountId, balanceId, updateBalanceModelV2Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceV2Request An object that represents the available options of adding funds to a balance. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceIdCall(String accountId, String balanceId, AddFundsToBalanceV2Request addFundsToBalanceV2Request, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = addFundsToBalanceV2Request; + + // create path and map variables + String localVarPath = "/preview/retail-media/accounts/{account-id}/balances/{balance-id}/add-funds" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceIdValidateBeforeCall(String accountId, String balanceId, AddFundsToBalanceV2Request addFundsToBalanceV2Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceId(Async)"); + } + + // verify the required parameter 'addFundsToBalanceV2Request' is set + if (addFundsToBalanceV2Request == null) { + throw new ApiException("Missing the required parameter 'addFundsToBalanceV2Request' when calling postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceId(Async)"); + } + + return postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceIdCall(accountId, balanceId, addFundsToBalanceV2Request, _callback); + + } + + /** + * + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceV2Request An object that represents the available options of adding funds to a balance. (required) + * @return BalanceResponseV2Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponseV2Response postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceId(String accountId, String balanceId, AddFundsToBalanceV2Request addFundsToBalanceV2Request) throws ApiException { + ApiResponse localVarResp = postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceIdWithHttpInfo(accountId, balanceId, addFundsToBalanceV2Request); + return localVarResp.getData(); + } + + /** + * + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceV2Request An object that represents the available options of adding funds to a balance. (required) + * @return ApiResponse<BalanceResponseV2Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceIdWithHttpInfo(String accountId, String balanceId, AddFundsToBalanceV2Request addFundsToBalanceV2Request) throws ApiException { + okhttp3.Call localVarCall = postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceV2Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Add funds to a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to add funds to (required) + * @param addFundsToBalanceV2Request An object that represents the available options of adding funds to a balance. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceIdAsync(String accountId, String balanceId, AddFundsToBalanceV2Request addFundsToBalanceV2Request, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV2ExternalAccountAddFundsByAccountIdBalancesbalanceIdValidateBeforeCall(accountId, balanceId, addFundsToBalanceV2Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV2ExternalAccountBalancesByAccountId + * @param accountId The account to create balances for (required) + * @param createBalanceV2Request An object that represents the available options to set when creating a Retail Media Balance (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call postApiV2ExternalAccountBalancesByAccountIdCall(String accountId, CreateBalanceV2Request createBalanceV2Request, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createBalanceV2Request; + + // create path and map variables + String localVarPath = "/preview/retail-media/accounts/{account-id}/balances" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV2ExternalAccountBalancesByAccountIdValidateBeforeCall(String accountId, CreateBalanceV2Request createBalanceV2Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV2ExternalAccountBalancesByAccountId(Async)"); + } + + // verify the required parameter 'createBalanceV2Request' is set + if (createBalanceV2Request == null) { + throw new ApiException("Missing the required parameter 'createBalanceV2Request' when calling postApiV2ExternalAccountBalancesByAccountId(Async)"); + } + + return postApiV2ExternalAccountBalancesByAccountIdCall(accountId, createBalanceV2Request, _callback); + + } + + /** + * + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceV2Request An object that represents the available options to set when creating a Retail Media Balance (required) + * @return BalanceResponseV2Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public BalanceResponseV2Response postApiV2ExternalAccountBalancesByAccountId(String accountId, CreateBalanceV2Request createBalanceV2Request) throws ApiException { + ApiResponse localVarResp = postApiV2ExternalAccountBalancesByAccountIdWithHttpInfo(accountId, createBalanceV2Request); + return localVarResp.getData(); + } + + /** + * + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceV2Request An object that represents the available options to set when creating a Retail Media Balance (required) + * @return ApiResponse<BalanceResponseV2Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public ApiResponse postApiV2ExternalAccountBalancesByAccountIdWithHttpInfo(String accountId, CreateBalanceV2Request createBalanceV2Request) throws ApiException { + okhttp3.Call localVarCall = postApiV2ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceV2Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create balance for the given account id + * @param accountId The account to create balances for (required) + * @param createBalanceV2Request An object that represents the available options to set when creating a Retail Media Balance (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
201 Success -
+ */ + public okhttp3.Call postApiV2ExternalAccountBalancesByAccountIdAsync(String accountId, CreateBalanceV2Request createBalanceV2Request, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV2ExternalAccountBalancesByAccountIdValidateBeforeCall(accountId, createBalanceV2Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceId + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceV2Request An object that represents the available options to modify schedule of a balance. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceIdCall(String accountId, String balanceId, ChangeDatesOfBalanceV2Request changeDatesOfBalanceV2Request, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = changeDatesOfBalanceV2Request; + + // create path and map variables + String localVarPath = "/preview/retail-media/accounts/{account-id}/balances/{balance-id}/change-dates" + .replace("{" + "account-id" + "}", localVarApiClient.escapeString(accountId.toString())) + .replace("{" + "balance-id" + "}", localVarApiClient.escapeString(balanceId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceIdValidateBeforeCall(String accountId, String balanceId, ChangeDatesOfBalanceV2Request changeDatesOfBalanceV2Request, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceId(Async)"); + } + + // verify the required parameter 'balanceId' is set + if (balanceId == null) { + throw new ApiException("Missing the required parameter 'balanceId' when calling postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceId(Async)"); + } + + // verify the required parameter 'changeDatesOfBalanceV2Request' is set + if (changeDatesOfBalanceV2Request == null) { + throw new ApiException("Missing the required parameter 'changeDatesOfBalanceV2Request' when calling postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceId(Async)"); + } + + return postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceIdCall(accountId, balanceId, changeDatesOfBalanceV2Request, _callback); + + } + + /** + * + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceV2Request An object that represents the available options to modify schedule of a balance. (required) + * @return BalanceResponseV2Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public BalanceResponseV2Response postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceId(String accountId, String balanceId, ChangeDatesOfBalanceV2Request changeDatesOfBalanceV2Request) throws ApiException { + ApiResponse localVarResp = postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceIdWithHttpInfo(accountId, balanceId, changeDatesOfBalanceV2Request); + return localVarResp.getData(); + } + + /** + * + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceV2Request An object that represents the available options to modify schedule of a balance. (required) + * @return ApiResponse<BalanceResponseV2Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public ApiResponse postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceIdWithHttpInfo(String accountId, String balanceId, ChangeDatesOfBalanceV2Request changeDatesOfBalanceV2Request) throws ApiException { + okhttp3.Call localVarCall = postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceV2Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Change dates of a balance for the given account id + * @param accountId The account of the balance (required) + * @param balanceId The balance to change the dates (required) + * @param changeDatesOfBalanceV2Request An object that represents the available options to modify schedule of a balance. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Success -
+ */ + public okhttp3.Call postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceIdAsync(String accountId, String balanceId, ChangeDatesOfBalanceV2Request changeDatesOfBalanceV2Request, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV2ExternalAccountChangeDatesByAccountIdBalancesbalanceIdValidateBeforeCall(accountId, balanceId, changeDatesOfBalanceV2Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/CampaignApi.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/CampaignApi.java index bb99de28..82ed6cde 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/CampaignApi.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/api/CampaignApi.java @@ -34,14 +34,15 @@ import com.criteo.api.retailmedia.preview.model.CreativeV2Response; import com.criteo.api.retailmedia.preview.model.ExternalCreativeCreateModelV2; import com.criteo.api.retailmedia.preview.model.ExternalCreativeUpdateModelV2; -import com.criteo.api.retailmedia.preview.model.JsonApiPageResponseOfAccount; import com.criteo.api.retailmedia.preview.model.JsonApiPageResponseOfBrand; import com.criteo.api.retailmedia.preview.model.JsonApiPageResponseOfRetailer; +import com.criteo.api.retailmedia.preview.model.JsonApiRequestOfSellerCatalogRequest; +import com.criteo.api.retailmedia.preview.model.JsonApiSingleResponseOfCatalogStatus; import com.criteo.api.retailmedia.preview.model.JsonApiSingleResponseOfLineItemBidMultipliersV2; import com.criteo.api.retailmedia.preview.model.KeywordsModelResponse; import com.criteo.api.retailmedia.preview.model.LineItemBidMultipliersV2Request; import com.criteo.api.retailmedia.preview.model.LineItemBidMultipliersV2Response; -import com.criteo.api.retailmedia.preview.model.PageOfInsertionOrderHistoryChangeDataCapture; +import com.criteo.api.retailmedia.preview.model.PageOfInsertionOrderHistoryChangeDataCaptureV2; import com.criteo.api.retailmedia.preview.model.PlacementPreviewListResponse; import com.criteo.api.retailmedia.preview.model.PreferredLineItemCreateModelV2Request; import com.criteo.api.retailmedia.preview.model.PreferredLineItemUpdateModelV2Request; @@ -1308,8 +1309,8 @@ public okhttp3.Call getApi202210ExternalLineItemProductButtonsByLineItemIdProduc * Build call for getApiV1ExternalAccountBrandsByAccountId * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1358,7 +1359,9 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdCall(String accountI } final String[] localVarAccepts = { - "application/json" + "text/plain", + "application/json", + "text/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1392,8 +1395,8 @@ private okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdValidateBeforeCall( * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @return JsonApiPageResponseOfBrand * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1412,8 +1415,8 @@ public JsonApiPageResponseOfBrand getApiV1ExternalAccountBrandsByAccountId(Strin * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @return ApiResponse<JsonApiPageResponseOfBrand> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1433,8 +1436,8 @@ public ApiResponse getApiV1ExternalAccountBrandsByAc * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -1455,8 +1458,8 @@ public okhttp3.Call getApiV1ExternalAccountBrandsByAccountIdAsync(String account * Build call for getApiV1ExternalAccountRetailersByAccountId * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1505,7 +1508,9 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdCall(String accou } final String[] localVarAccepts = { - "application/json" + "text/plain", + "application/json", + "text/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1539,8 +1544,8 @@ private okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdValidateBeforeCa * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @return JsonApiPageResponseOfRetailer * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1559,8 +1564,8 @@ public JsonApiPageResponseOfRetailer getApiV1ExternalAccountRetailersByAccountId * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @return ApiResponse<JsonApiPageResponseOfRetailer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1580,8 +1585,8 @@ public ApiResponse getApiV1ExternalAccountRetaile * Gets page of retailer objects that are associated with the given account * @param accountId The given account id (required) * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) + * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional, default to 0) + * @param pageSize The maximum number of items you would like to receive in this request (optional, default to 25) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -1598,143 +1603,6 @@ public okhttp3.Call getApiV1ExternalAccountRetailersByAccountIdAsync(String acco localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getApiV1ExternalAccounts - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV1ExternalAccountsCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/preview/retail-media/accounts"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limitToId != null) { - localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "limitToId", limitToId)); - } - - if (pageIndex != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageIndex", pageIndex)); - } - - if (pageSize != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageSize", pageSize)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth", "oauth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getApiV1ExternalAccountsValidateBeforeCall(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - return getApiV1ExternalAccountsCall(limitToId, pageIndex, pageSize, _callback); - - } - - /** - * - * Gets page of account objects that the current user can access - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return JsonApiPageResponseOfAccount - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public JsonApiPageResponseOfAccount getApiV1ExternalAccounts(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - ApiResponse localVarResp = getApiV1ExternalAccountsWithHttpInfo(limitToId, pageIndex, pageSize); - return localVarResp.getData(); - } - - /** - * - * Gets page of account objects that the current user can access - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @return ApiResponse<JsonApiPageResponseOfAccount> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public ApiResponse getApiV1ExternalAccountsWithHttpInfo(List limitToId, Integer pageIndex, Integer pageSize) throws ApiException { - okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * (asynchronously) - * Gets page of account objects that the current user can access - * @param limitToId The ids that you would like to limit your result set to (optional) - * @param pageIndex The 0 indexed page index you would like to receive given the page size (optional) - * @param pageSize The maximum number of items you would like to receive in this request (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Success -
- */ - public okhttp3.Call getApiV1ExternalAccountsAsync(List limitToId, Integer pageIndex, Integer pageSize, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getApiV1ExternalAccountsValidateBeforeCall(limitToId, pageIndex, pageSize, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getApiV1ExternalRetailerBrandsByRetailerId * @param retailerId The retailer id for which brands should be fetched. (required) @@ -2931,7 +2799,7 @@ public okhttp3.Call getCampaignBudgetOverridesAsync(Long campaignId, final ApiCa return localVarCall; } /** - * Build call for getInsertionOrderHistoryChangeDataCapture + * Build call for getInsertionOrderHistoryChangeDataCaptureV2 * @param insertionOrderId External insertion order id. (required) * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) * @param limit The number of elements to be returned. (optional, default to 25) @@ -2945,7 +2813,7 @@ public okhttp3.Call getCampaignBudgetOverridesAsync(Long campaignId, final ApiCa 200 Success - */ - public okhttp3.Call getInsertionOrderHistoryChangeDataCaptureCall(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInsertionOrderHistoryChangeDataCaptureV2Call(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -3003,13 +2871,13 @@ public okhttp3.Call getInsertionOrderHistoryChangeDataCaptureCall(String inserti } @SuppressWarnings("rawtypes") - private okhttp3.Call getInsertionOrderHistoryChangeDataCaptureValidateBeforeCall(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getInsertionOrderHistoryChangeDataCaptureV2ValidateBeforeCall(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { // verify the required parameter 'insertionOrderId' is set if (insertionOrderId == null) { - throw new ApiException("Missing the required parameter 'insertionOrderId' when calling getInsertionOrderHistoryChangeDataCapture(Async)"); + throw new ApiException("Missing the required parameter 'insertionOrderId' when calling getInsertionOrderHistoryChangeDataCaptureV2(Async)"); } - return getInsertionOrderHistoryChangeDataCaptureCall(insertionOrderId, offset, limit, limitToChangeTypes, _callback); + return getInsertionOrderHistoryChangeDataCaptureV2Call(insertionOrderId, offset, limit, limitToChangeTypes, _callback); } @@ -3020,7 +2888,7 @@ private okhttp3.Call getInsertionOrderHistoryChangeDataCaptureValidateBeforeCall * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) * @param limit The number of elements to be returned. (optional, default to 25) * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) - * @return PageOfInsertionOrderHistoryChangeDataCapture + * @return PageOfInsertionOrderHistoryChangeDataCaptureV2 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3028,8 +2896,8 @@ private okhttp3.Call getInsertionOrderHistoryChangeDataCaptureValidateBeforeCall
200 Success -
*/ - public PageOfInsertionOrderHistoryChangeDataCapture getInsertionOrderHistoryChangeDataCapture(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes) throws ApiException { - ApiResponse localVarResp = getInsertionOrderHistoryChangeDataCaptureWithHttpInfo(insertionOrderId, offset, limit, limitToChangeTypes); + public PageOfInsertionOrderHistoryChangeDataCaptureV2 getInsertionOrderHistoryChangeDataCaptureV2(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes) throws ApiException { + ApiResponse localVarResp = getInsertionOrderHistoryChangeDataCaptureV2WithHttpInfo(insertionOrderId, offset, limit, limitToChangeTypes); return localVarResp.getData(); } @@ -3040,7 +2908,7 @@ public PageOfInsertionOrderHistoryChangeDataCapture getInsertionOrderHistoryChan * @param offset The (zero-based) starting offset in the collection. (optional, default to 0) * @param limit The number of elements to be returned. (optional, default to 25) * @param limitToChangeTypes Comma separated change types string that will be queried. (optional) - * @return ApiResponse<PageOfInsertionOrderHistoryChangeDataCapture> + * @return ApiResponse<PageOfInsertionOrderHistoryChangeDataCaptureV2> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -3048,9 +2916,9 @@ public PageOfInsertionOrderHistoryChangeDataCapture getInsertionOrderHistoryChan
200 Success -
*/ - public ApiResponse getInsertionOrderHistoryChangeDataCaptureWithHttpInfo(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes) throws ApiException { - okhttp3.Call localVarCall = getInsertionOrderHistoryChangeDataCaptureValidateBeforeCall(insertionOrderId, offset, limit, limitToChangeTypes, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getInsertionOrderHistoryChangeDataCaptureV2WithHttpInfo(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes) throws ApiException { + okhttp3.Call localVarCall = getInsertionOrderHistoryChangeDataCaptureV2ValidateBeforeCall(insertionOrderId, offset, limit, limitToChangeTypes, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -3070,10 +2938,10 @@ public ApiResponse getInsertionOrd 200 Success - */ - public okhttp3.Call getInsertionOrderHistoryChangeDataCaptureAsync(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getInsertionOrderHistoryChangeDataCaptureV2Async(String insertionOrderId, Integer offset, Integer limit, String limitToChangeTypes, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getInsertionOrderHistoryChangeDataCaptureValidateBeforeCall(insertionOrderId, offset, limit, limitToChangeTypes, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getInsertionOrderHistoryChangeDataCaptureV2ValidateBeforeCall(insertionOrderId, offset, limit, limitToChangeTypes, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -3877,6 +3745,140 @@ public okhttp3.Call postApi202210ExternalLineItemProductButtonsCreateByLineItemI localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for postApiV1ExternalAccountCatalogsSellersByAccountId + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfSellerCatalogRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 Catalog request successfully created -
400 Bad Request -
+ */ + public okhttp3.Call postApiV1ExternalAccountCatalogsSellersByAccountIdCall(String accountId, JsonApiRequestOfSellerCatalogRequest jsonApiRequestOfSellerCatalogRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = jsonApiRequestOfSellerCatalogRequest; + + // create path and map variables + String localVarPath = "/preview/retail-media/accounts/{accountId}/catalogs/sellers" + .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/plain", + "application/json", + "text/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth", "oauth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call postApiV1ExternalAccountCatalogsSellersByAccountIdValidateBeforeCall(String accountId, JsonApiRequestOfSellerCatalogRequest jsonApiRequestOfSellerCatalogRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling postApiV1ExternalAccountCatalogsSellersByAccountId(Async)"); + } + + return postApiV1ExternalAccountCatalogsSellersByAccountIdCall(accountId, jsonApiRequestOfSellerCatalogRequest, _callback); + + } + + /** + * + * Create a request for a Catalog available to the indicated account. + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfSellerCatalogRequest (optional) + * @return JsonApiSingleResponseOfCatalogStatus + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 Catalog request successfully created -
400 Bad Request -
+ */ + public JsonApiSingleResponseOfCatalogStatus postApiV1ExternalAccountCatalogsSellersByAccountId(String accountId, JsonApiRequestOfSellerCatalogRequest jsonApiRequestOfSellerCatalogRequest) throws ApiException { + ApiResponse localVarResp = postApiV1ExternalAccountCatalogsSellersByAccountIdWithHttpInfo(accountId, jsonApiRequestOfSellerCatalogRequest); + return localVarResp.getData(); + } + + /** + * + * Create a request for a Catalog available to the indicated account. + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfSellerCatalogRequest (optional) + * @return ApiResponse<JsonApiSingleResponseOfCatalogStatus> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 Catalog request successfully created -
400 Bad Request -
+ */ + public ApiResponse postApiV1ExternalAccountCatalogsSellersByAccountIdWithHttpInfo(String accountId, JsonApiRequestOfSellerCatalogRequest jsonApiRequestOfSellerCatalogRequest) throws ApiException { + okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsSellersByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfSellerCatalogRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create a request for a Catalog available to the indicated account. + * @param accountId The account to request the catalog for. (required) + * @param jsonApiRequestOfSellerCatalogRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 Catalog request successfully created -
400 Bad Request -
+ */ + public okhttp3.Call postApiV1ExternalAccountCatalogsSellersByAccountIdAsync(String accountId, JsonApiRequestOfSellerCatalogRequest jsonApiRequestOfSellerCatalogRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = postApiV1ExternalAccountCatalogsSellersByAccountIdValidateBeforeCall(accountId, jsonApiRequestOfSellerCatalogRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for postApiV1ExternalCatalogsSkuRetrieval * @param pageIndex The start position in the overall list of matches. Must be zero or greater. (optional, default to 0) diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AddFundsToBalanceV2.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AddFundsToBalanceV2.java new file mode 100644 index 00000000..c93c38f0 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AddFundsToBalanceV2.java @@ -0,0 +1,362 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * An object that represents the available options of adding funds to a balance. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AddFundsToBalanceV2 { + public static final String SERIALIZED_NAME_DELTA_AMOUNT = "deltaAmount"; + @SerializedName(SERIALIZED_NAME_DELTA_AMOUNT) + private BigDecimal deltaAmount; + + public static final String SERIALIZED_NAME_PO_NUMBER = "poNumber"; + @SerializedName(SERIALIZED_NAME_PO_NUMBER) + private String poNumber; + + public static final String SERIALIZED_NAME_MEMO = "memo"; + @SerializedName(SERIALIZED_NAME_MEMO) + private String memo; + + public AddFundsToBalanceV2() { + } + + public AddFundsToBalanceV2 deltaAmount(BigDecimal deltaAmount) { + + this.deltaAmount = deltaAmount; + return this; + } + + /** + * Amount of billable funds to be added / decreased allotted to the balance. + * @return deltaAmount + **/ + @javax.annotation.Nonnull + + public BigDecimal getDeltaAmount() { + return deltaAmount; + } + + + public void setDeltaAmount(BigDecimal deltaAmount) { + this.deltaAmount = deltaAmount; + } + + + public AddFundsToBalanceV2 poNumber(String poNumber) { + + this.poNumber = poNumber; + return this; + } + + /** + * Purchase Order number. + * @return poNumber + **/ + @javax.annotation.Nullable + + public String getPoNumber() { + return poNumber; + } + + + public void setPoNumber(String poNumber) { + this.poNumber = poNumber; + } + + + public AddFundsToBalanceV2 memo(String memo) { + + this.memo = memo; + return this; + } + + /** + * Memo + * @return memo + **/ + @javax.annotation.Nullable + + public String getMemo() { + return memo; + } + + + public void setMemo(String memo) { + this.memo = memo; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AddFundsToBalanceV2 instance itself + */ + public AddFundsToBalanceV2 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddFundsToBalanceV2 addFundsToBalanceV2 = (AddFundsToBalanceV2) o; + return Objects.equals(this.deltaAmount, addFundsToBalanceV2.deltaAmount) && + Objects.equals(this.poNumber, addFundsToBalanceV2.poNumber) && + Objects.equals(this.memo, addFundsToBalanceV2.memo)&& + Objects.equals(this.additionalProperties, addFundsToBalanceV2.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(deltaAmount, poNumber, memo, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddFundsToBalanceV2 {\n"); + sb.append(" deltaAmount: ").append(toIndentedString(deltaAmount)).append("\n"); + sb.append(" poNumber: ").append(toIndentedString(poNumber)).append("\n"); + sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("deltaAmount"); + openapiFields.add("poNumber"); + openapiFields.add("memo"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("deltaAmount"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AddFundsToBalanceV2 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AddFundsToBalanceV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AddFundsToBalanceV2 is not found in the empty JSON string", AddFundsToBalanceV2.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AddFundsToBalanceV2.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if ((jsonObj.get("poNumber") != null && !jsonObj.get("poNumber").isJsonNull()) && !jsonObj.get("poNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `poNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("poNumber").toString())); + } + if ((jsonObj.get("memo") != null && !jsonObj.get("memo").isJsonNull()) && !jsonObj.get("memo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AddFundsToBalanceV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AddFundsToBalanceV2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AddFundsToBalanceV2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AddFundsToBalanceV2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AddFundsToBalanceV2 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AddFundsToBalanceV2 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AddFundsToBalanceV2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of AddFundsToBalanceV2 + * @throws IOException if the JSON string is invalid with respect to AddFundsToBalanceV2 + */ + public static AddFundsToBalanceV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AddFundsToBalanceV2.class); + } + + /** + * Convert an instance of AddFundsToBalanceV2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AddFundsToBalanceV2Request.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AddFundsToBalanceV2Request.java new file mode 100644 index 00000000..f215d7ab --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AddFundsToBalanceV2Request.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.ResourceOfAddFundsToBalanceV2; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API request for a single entity + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AddFundsToBalanceV2Request { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ResourceOfAddFundsToBalanceV2 data; + + public AddFundsToBalanceV2Request() { + } + + public AddFundsToBalanceV2Request data(ResourceOfAddFundsToBalanceV2 data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ResourceOfAddFundsToBalanceV2 getData() { + return data; + } + + + public void setData(ResourceOfAddFundsToBalanceV2 data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AddFundsToBalanceV2Request instance itself + */ + public AddFundsToBalanceV2Request putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddFundsToBalanceV2Request addFundsToBalanceV2Request = (AddFundsToBalanceV2Request) o; + return Objects.equals(this.data, addFundsToBalanceV2Request.data)&& + Objects.equals(this.additionalProperties, addFundsToBalanceV2Request.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddFundsToBalanceV2Request {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to AddFundsToBalanceV2Request + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!AddFundsToBalanceV2Request.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in AddFundsToBalanceV2Request is not found in the empty JSON string", AddFundsToBalanceV2Request.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ResourceOfAddFundsToBalanceV2.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AddFundsToBalanceV2Request.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AddFundsToBalanceV2Request' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AddFundsToBalanceV2Request.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AddFundsToBalanceV2Request value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AddFundsToBalanceV2Request read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + AddFundsToBalanceV2Request instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AddFundsToBalanceV2Request given an JSON string + * + * @param jsonString JSON string + * @return An instance of AddFundsToBalanceV2Request + * @throws IOException if the JSON string is invalid with respect to AddFundsToBalanceV2Request + */ + public static AddFundsToBalanceV2Request fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AddFundsToBalanceV2Request.class); + } + + /** + * Convert an instance of AddFundsToBalanceV2Request to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ApplicationSummaryModel.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ApplicationSummaryModel.java index aba6ff02..8f8ea8ae 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ApplicationSummaryModel.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ApplicationSummaryModel.java @@ -45,7 +45,7 @@ import com.criteo.api.retailmedia.preview.JSON; /** - * Model of ApplicationSummary + * Used for the /me endpoint. Contains information about the currently authenticated application that we accept to give to our clients */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModel { diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ApplicationSummaryModelResource.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ApplicationSummaryModelResource.java index c1f078a1..484dda98 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ApplicationSummaryModelResource.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ApplicationSummaryModelResource.java @@ -46,7 +46,7 @@ import com.criteo.api.retailmedia.preview.JSON; /** - * A class that represents a ValueType in a guild compliant way + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResource { diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ApplicationSummaryModelResponse.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ApplicationSummaryModelResponse.java index 12bb578d..c2f9bc10 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ApplicationSummaryModelResponse.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ApplicationSummaryModelResponse.java @@ -49,7 +49,7 @@ import com.criteo.api.retailmedia.preview.JSON; /** - * Response of ApplicationSummaryModel + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApplicationSummaryModelResponse { diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AsyncAccountsReport.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AsyncAccountsReport.java index cd094a0b..67619f22 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AsyncAccountsReport.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AsyncAccountsReport.java @@ -486,6 +486,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AsyncCampaignsReport.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AsyncCampaignsReport.java index 2c7aebaa..7d9b1388 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AsyncCampaignsReport.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AsyncCampaignsReport.java @@ -439,6 +439,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AsyncLineItemsReport.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AsyncLineItemsReport.java index 72b1b9fc..1961ee57 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AsyncLineItemsReport.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/AsyncLineItemsReport.java @@ -439,6 +439,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/BalanceHistoryChangeDataCaptureV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/BalanceHistoryChangeDataCaptureV1.java new file mode 100644 index 00000000..3edca258 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/BalanceHistoryChangeDataCaptureV1.java @@ -0,0 +1,419 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.ChangeDetailsV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Data model represents the data change capture of balance history. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BalanceHistoryChangeDataCaptureV1 { + public static final String SERIALIZED_NAME_DATE_OF_MODIFICATION = "dateOfModification"; + @SerializedName(SERIALIZED_NAME_DATE_OF_MODIFICATION) + private OffsetDateTime dateOfModification; + + public static final String SERIALIZED_NAME_MODIFIED_BY_USER = "modifiedByUser"; + @SerializedName(SERIALIZED_NAME_MODIFIED_BY_USER) + private String modifiedByUser; + + /** + * Represent the type of change states of the history. + */ + @JsonAdapter(ChangeTypeEnum.Adapter.class) + public enum ChangeTypeEnum { + BALANCECREATED("BalanceCreated"), + + BALANCEADDED("BalanceAdded"), + + BALANCEREMOVED("BalanceRemoved"), + + BALANCEUNCAPPED("BalanceUncapped"), + + BALANCECAPPED("BalanceCapped"), + + ENDDATE("EndDate"), + + STARTDATE("StartDate"), + + BALANCENAME("BalanceName"), + + PONUMBER("PoNumber"), + + VALUEADD("ValueAdd"), + + UNKNOWN("Unknown"); + + private String value; + + ChangeTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ChangeTypeEnum fromValue(String value) { + for (ChangeTypeEnum b : ChangeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ChangeTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ChangeTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ChangeTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_CHANGE_TYPE = "changeType"; + @SerializedName(SERIALIZED_NAME_CHANGE_TYPE) + private ChangeTypeEnum changeType; + + public static final String SERIALIZED_NAME_CHANGE_DETAILS = "changeDetails"; + @SerializedName(SERIALIZED_NAME_CHANGE_DETAILS) + private ChangeDetailsV1 changeDetails; + + public static final String SERIALIZED_NAME_MEMO = "memo"; + @SerializedName(SERIALIZED_NAME_MEMO) + private String memo; + + public BalanceHistoryChangeDataCaptureV1() { + } + + public BalanceHistoryChangeDataCaptureV1 dateOfModification(OffsetDateTime dateOfModification) { + + this.dateOfModification = dateOfModification; + return this; + } + + /** + * Date when data change has occured. + * @return dateOfModification + **/ + @javax.annotation.Nonnull + + public OffsetDateTime getDateOfModification() { + return dateOfModification; + } + + + public void setDateOfModification(OffsetDateTime dateOfModification) { + this.dateOfModification = dateOfModification; + } + + + public BalanceHistoryChangeDataCaptureV1 modifiedByUser(String modifiedByUser) { + + this.modifiedByUser = modifiedByUser; + return this; + } + + /** + * Username who modified the insertion order. + * @return modifiedByUser + **/ + @javax.annotation.Nonnull + + public String getModifiedByUser() { + return modifiedByUser; + } + + + public void setModifiedByUser(String modifiedByUser) { + this.modifiedByUser = modifiedByUser; + } + + + public BalanceHistoryChangeDataCaptureV1 changeType(ChangeTypeEnum changeType) { + + this.changeType = changeType; + return this; + } + + /** + * Represent the type of change states of the history. + * @return changeType + **/ + @javax.annotation.Nonnull + + public ChangeTypeEnum getChangeType() { + return changeType; + } + + + public void setChangeType(ChangeTypeEnum changeType) { + this.changeType = changeType; + } + + + public BalanceHistoryChangeDataCaptureV1 changeDetails(ChangeDetailsV1 changeDetails) { + + this.changeDetails = changeDetails; + return this; + } + + /** + * Get changeDetails + * @return changeDetails + **/ + @javax.annotation.Nonnull + + public ChangeDetailsV1 getChangeDetails() { + return changeDetails; + } + + + public void setChangeDetails(ChangeDetailsV1 changeDetails) { + this.changeDetails = changeDetails; + } + + + public BalanceHistoryChangeDataCaptureV1 memo(String memo) { + + this.memo = memo; + return this; + } + + /** + * Memo associate with the insertion order modification. + * @return memo + **/ + @javax.annotation.Nullable + + public String getMemo() { + return memo; + } + + + public void setMemo(String memo) { + this.memo = memo; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceHistoryChangeDataCaptureV1 balanceHistoryChangeDataCaptureV1 = (BalanceHistoryChangeDataCaptureV1) o; + return Objects.equals(this.dateOfModification, balanceHistoryChangeDataCaptureV1.dateOfModification) && + Objects.equals(this.modifiedByUser, balanceHistoryChangeDataCaptureV1.modifiedByUser) && + Objects.equals(this.changeType, balanceHistoryChangeDataCaptureV1.changeType) && + Objects.equals(this.changeDetails, balanceHistoryChangeDataCaptureV1.changeDetails) && + Objects.equals(this.memo, balanceHistoryChangeDataCaptureV1.memo); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(dateOfModification, modifiedByUser, changeType, changeDetails, memo); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceHistoryChangeDataCaptureV1 {\n"); + sb.append(" dateOfModification: ").append(toIndentedString(dateOfModification)).append("\n"); + sb.append(" modifiedByUser: ").append(toIndentedString(modifiedByUser)).append("\n"); + sb.append(" changeType: ").append(toIndentedString(changeType)).append("\n"); + sb.append(" changeDetails: ").append(toIndentedString(changeDetails)).append("\n"); + sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("dateOfModification"); + openapiFields.add("modifiedByUser"); + openapiFields.add("changeType"); + openapiFields.add("changeDetails"); + openapiFields.add("memo"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("dateOfModification"); + openapiRequiredFields.add("modifiedByUser"); + openapiRequiredFields.add("changeType"); + openapiRequiredFields.add("changeDetails"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to BalanceHistoryChangeDataCaptureV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!BalanceHistoryChangeDataCaptureV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BalanceHistoryChangeDataCaptureV1 is not found in the empty JSON string", BalanceHistoryChangeDataCaptureV1.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!BalanceHistoryChangeDataCaptureV1.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BalanceHistoryChangeDataCaptureV1` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : BalanceHistoryChangeDataCaptureV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("modifiedByUser").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `modifiedByUser` to be a primitive type in the JSON string but got `%s`", jsonObj.get("modifiedByUser").toString())); + } + if (!jsonObj.get("changeType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `changeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("changeType").toString())); + } + // validate the required field `changeDetails` + ChangeDetailsV1.validateJsonObject(jsonObj.getAsJsonObject("changeDetails")); + if ((jsonObj.get("memo") != null && !jsonObj.get("memo").isJsonNull()) && !jsonObj.get("memo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BalanceHistoryChangeDataCaptureV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BalanceHistoryChangeDataCaptureV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BalanceHistoryChangeDataCaptureV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BalanceHistoryChangeDataCaptureV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BalanceHistoryChangeDataCaptureV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BalanceHistoryChangeDataCaptureV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalanceHistoryChangeDataCaptureV1 + * @throws IOException if the JSON string is invalid with respect to BalanceHistoryChangeDataCaptureV1 + */ + public static BalanceHistoryChangeDataCaptureV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BalanceHistoryChangeDataCaptureV1.class); + } + + /** + * Convert an instance of BalanceHistoryChangeDataCaptureV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/BalanceResponseV2.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/BalanceResponseV2.java new file mode 100644 index 00000000..3f0362a2 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/BalanceResponseV2.java @@ -0,0 +1,907 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A Retail Media Balance used to determine the funds available for any or all campaigns in an account + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BalanceResponseV2 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_PO_NUMBER = "poNumber"; + @SerializedName(SERIALIZED_NAME_PO_NUMBER) + private String poNumber; + + public static final String SERIALIZED_NAME_MEMO = "memo"; + @SerializedName(SERIALIZED_NAME_MEMO) + private String memo; + + public static final String SERIALIZED_NAME_DEPOSITED = "deposited"; + @SerializedName(SERIALIZED_NAME_DEPOSITED) + private BigDecimal deposited; + + public static final String SERIALIZED_NAME_SPENT = "spent"; + @SerializedName(SERIALIZED_NAME_SPENT) + private BigDecimal spent; + + public static final String SERIALIZED_NAME_REMAINING = "remaining"; + @SerializedName(SERIALIZED_NAME_REMAINING) + private BigDecimal remaining; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private String endDate; + + /** + * Status of the balance. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + UNKNOWN("unknown"), + + SCHEDULED("scheduled"), + + ACTIVE("active"), + + ENDED("ended"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; + + /** + * Type of the balance. + */ + @JsonAdapter(BalanceTypeEnum.Adapter.class) + public enum BalanceTypeEnum { + UNKNOWN("unknown"), + + CAPPED("capped"), + + UNCAPPED("uncapped"); + + private String value; + + BalanceTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BalanceTypeEnum fromValue(String value) { + for (BalanceTypeEnum b : BalanceTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BalanceTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BalanceTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BalanceTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_BALANCE_TYPE = "balanceType"; + @SerializedName(SERIALIZED_NAME_BALANCE_TYPE) + private BalanceTypeEnum balanceType; + + /** + * Spend Type of the balance. + */ + @JsonAdapter(SpendTypeEnum.Adapter.class) + public enum SpendTypeEnum { + ONSITE("Onsite"), + + OFFSITE("Offsite"), + + OFFSITEAWARENESS("OffsiteAwareness"); + + private String value; + + SpendTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SpendTypeEnum fromValue(String value) { + for (SpendTypeEnum b : SpendTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SpendTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SpendTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SpendTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_SPEND_TYPE = "spendType"; + @SerializedName(SERIALIZED_NAME_SPEND_TYPE) + private SpendTypeEnum spendType; + + /** + * Billing type for Private Market of the balance. + */ + @JsonAdapter(PrivateMarketBillingTypeEnum.Adapter.class) + public enum PrivateMarketBillingTypeEnum { + NOTAPPLICABLE("notApplicable"), + + BILLBYRETAILER("billByRetailer"), + + BILLBYCRITEO("billByCriteo"), + + UNKNOWN("unknown"); + + private String value; + + PrivateMarketBillingTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PrivateMarketBillingTypeEnum fromValue(String value) { + for (PrivateMarketBillingTypeEnum b : PrivateMarketBillingTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PrivateMarketBillingTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PrivateMarketBillingTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PrivateMarketBillingTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_PRIVATE_MARKET_BILLING_TYPE = "privateMarketBillingType"; + @SerializedName(SERIALIZED_NAME_PRIVATE_MARKET_BILLING_TYPE) + private PrivateMarketBillingTypeEnum privateMarketBillingType; + + public BalanceResponseV2() { + } + + public BalanceResponseV2 name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the balance. + * @return name + **/ + @javax.annotation.Nonnull + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public BalanceResponseV2 poNumber(String poNumber) { + + this.poNumber = poNumber; + return this; + } + + /** + * Purchase Order number. + * @return poNumber + **/ + @javax.annotation.Nullable + + public String getPoNumber() { + return poNumber; + } + + + public void setPoNumber(String poNumber) { + this.poNumber = poNumber; + } + + + public BalanceResponseV2 memo(String memo) { + + this.memo = memo; + return this; + } + + /** + * Memo. + * @return memo + **/ + @javax.annotation.Nullable + + public String getMemo() { + return memo; + } + + + public void setMemo(String memo) { + this.memo = memo; + } + + + public BalanceResponseV2 deposited(BigDecimal deposited) { + + this.deposited = deposited; + return this; + } + + /** + * Amount of billable funds allotted to the balance. + * @return deposited + **/ + @javax.annotation.Nullable + + public BigDecimal getDeposited() { + return deposited; + } + + + public void setDeposited(BigDecimal deposited) { + this.deposited = deposited; + } + + + public BalanceResponseV2 spent(BigDecimal spent) { + + this.spent = spent; + return this; + } + + /** + * Amount of spent funds of the balance. + * @return spent + **/ + @javax.annotation.Nullable + + public BigDecimal getSpent() { + return spent; + } + + + public void setSpent(BigDecimal spent) { + this.spent = spent; + } + + + public BalanceResponseV2 remaining(BigDecimal remaining) { + + this.remaining = remaining; + return this; + } + + /** + * Amount of remaining funds of the balance. + * @return remaining + **/ + @javax.annotation.Nullable + + public BigDecimal getRemaining() { + return remaining; + } + + + public void setRemaining(BigDecimal remaining) { + this.remaining = remaining; + } + + + public BalanceResponseV2 startDate(String startDate) { + + this.startDate = startDate; + return this; + } + + /** + * Start date of the balance in the format YYYY-MM-DD. + * @return startDate + **/ + @javax.annotation.Nonnull + + public String getStartDate() { + return startDate; + } + + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + + public BalanceResponseV2 endDate(String endDate) { + + this.endDate = endDate; + return this; + } + + /** + * End date of the balance in the format YYYY-MM-DD. + * @return endDate + **/ + @javax.annotation.Nullable + + public String getEndDate() { + return endDate; + } + + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + + public BalanceResponseV2 status(StatusEnum status) { + + this.status = status; + return this; + } + + /** + * Status of the balance. + * @return status + **/ + @javax.annotation.Nullable + + public StatusEnum getStatus() { + return status; + } + + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public BalanceResponseV2 createdAt(OffsetDateTime createdAt) { + + this.createdAt = createdAt; + return this; + } + + /** + * Creation time of the balance. + * @return createdAt + **/ + @javax.annotation.Nullable + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public BalanceResponseV2 updatedAt(OffsetDateTime updatedAt) { + + this.updatedAt = updatedAt; + return this; + } + + /** + * Update time of the balance. + * @return updatedAt + **/ + @javax.annotation.Nullable + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public BalanceResponseV2 balanceType(BalanceTypeEnum balanceType) { + + this.balanceType = balanceType; + return this; + } + + /** + * Type of the balance. + * @return balanceType + **/ + @javax.annotation.Nonnull + + public BalanceTypeEnum getBalanceType() { + return balanceType; + } + + + public void setBalanceType(BalanceTypeEnum balanceType) { + this.balanceType = balanceType; + } + + + public BalanceResponseV2 spendType(SpendTypeEnum spendType) { + + this.spendType = spendType; + return this; + } + + /** + * Spend Type of the balance. + * @return spendType + **/ + @javax.annotation.Nonnull + + public SpendTypeEnum getSpendType() { + return spendType; + } + + + public void setSpendType(SpendTypeEnum spendType) { + this.spendType = spendType; + } + + + public BalanceResponseV2 privateMarketBillingType(PrivateMarketBillingTypeEnum privateMarketBillingType) { + + this.privateMarketBillingType = privateMarketBillingType; + return this; + } + + /** + * Billing type for Private Market of the balance. + * @return privateMarketBillingType + **/ + @javax.annotation.Nonnull + + public PrivateMarketBillingTypeEnum getPrivateMarketBillingType() { + return privateMarketBillingType; + } + + + public void setPrivateMarketBillingType(PrivateMarketBillingTypeEnum privateMarketBillingType) { + this.privateMarketBillingType = privateMarketBillingType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the BalanceResponseV2 instance itself + */ + public BalanceResponseV2 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceResponseV2 balanceResponseV2 = (BalanceResponseV2) o; + return Objects.equals(this.name, balanceResponseV2.name) && + Objects.equals(this.poNumber, balanceResponseV2.poNumber) && + Objects.equals(this.memo, balanceResponseV2.memo) && + Objects.equals(this.deposited, balanceResponseV2.deposited) && + Objects.equals(this.spent, balanceResponseV2.spent) && + Objects.equals(this.remaining, balanceResponseV2.remaining) && + Objects.equals(this.startDate, balanceResponseV2.startDate) && + Objects.equals(this.endDate, balanceResponseV2.endDate) && + Objects.equals(this.status, balanceResponseV2.status) && + Objects.equals(this.createdAt, balanceResponseV2.createdAt) && + Objects.equals(this.updatedAt, balanceResponseV2.updatedAt) && + Objects.equals(this.balanceType, balanceResponseV2.balanceType) && + Objects.equals(this.spendType, balanceResponseV2.spendType) && + Objects.equals(this.privateMarketBillingType, balanceResponseV2.privateMarketBillingType)&& + Objects.equals(this.additionalProperties, balanceResponseV2.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, poNumber, memo, deposited, spent, remaining, startDate, endDate, status, createdAt, updatedAt, balanceType, spendType, privateMarketBillingType, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceResponseV2 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" poNumber: ").append(toIndentedString(poNumber)).append("\n"); + sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); + sb.append(" deposited: ").append(toIndentedString(deposited)).append("\n"); + sb.append(" spent: ").append(toIndentedString(spent)).append("\n"); + sb.append(" remaining: ").append(toIndentedString(remaining)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" balanceType: ").append(toIndentedString(balanceType)).append("\n"); + sb.append(" spendType: ").append(toIndentedString(spendType)).append("\n"); + sb.append(" privateMarketBillingType: ").append(toIndentedString(privateMarketBillingType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("poNumber"); + openapiFields.add("memo"); + openapiFields.add("deposited"); + openapiFields.add("spent"); + openapiFields.add("remaining"); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + openapiFields.add("status"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("balanceType"); + openapiFields.add("spendType"); + openapiFields.add("privateMarketBillingType"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("startDate"); + openapiRequiredFields.add("balanceType"); + openapiRequiredFields.add("spendType"); + openapiRequiredFields.add("privateMarketBillingType"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to BalanceResponseV2 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!BalanceResponseV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BalanceResponseV2 is not found in the empty JSON string", BalanceResponseV2.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : BalanceResponseV2.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("poNumber") != null && !jsonObj.get("poNumber").isJsonNull()) && !jsonObj.get("poNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `poNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("poNumber").toString())); + } + if ((jsonObj.get("memo") != null && !jsonObj.get("memo").isJsonNull()) && !jsonObj.get("memo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); + } + if (!jsonObj.get("startDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `startDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("startDate").toString())); + } + if ((jsonObj.get("endDate") != null && !jsonObj.get("endDate").isJsonNull()) && !jsonObj.get("endDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (!jsonObj.get("balanceType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `balanceType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("balanceType").toString())); + } + if (!jsonObj.get("spendType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `spendType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("spendType").toString())); + } + if (!jsonObj.get("privateMarketBillingType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `privateMarketBillingType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privateMarketBillingType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BalanceResponseV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BalanceResponseV2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BalanceResponseV2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BalanceResponseV2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public BalanceResponseV2 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + BalanceResponseV2 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BalanceResponseV2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalanceResponseV2 + * @throws IOException if the JSON string is invalid with respect to BalanceResponseV2 + */ + public static BalanceResponseV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BalanceResponseV2.class); + } + + /** + * Convert an instance of BalanceResponseV2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/BalanceResponseV2Response.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/BalanceResponseV2Response.java new file mode 100644 index 00000000..42c40d63 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/BalanceResponseV2Response.java @@ -0,0 +1,363 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.CommonProblem; +import com.criteo.api.retailmedia.preview.model.ResourceOfBalanceResponseV2; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single entity + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BalanceResponseV2Response { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ResourceOfBalanceResponseV2 data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public BalanceResponseV2Response() { + } + + + public BalanceResponseV2Response( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public BalanceResponseV2Response data(ResourceOfBalanceResponseV2 data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ResourceOfBalanceResponseV2 getData() { + return data; + } + + + public void setData(ResourceOfBalanceResponseV2 data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the BalanceResponseV2Response instance itself + */ + public BalanceResponseV2Response putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceResponseV2Response balanceResponseV2Response = (BalanceResponseV2Response) o; + return Objects.equals(this.data, balanceResponseV2Response.data) && + Objects.equals(this.warnings, balanceResponseV2Response.warnings) && + Objects.equals(this.errors, balanceResponseV2Response.errors)&& + Objects.equals(this.additionalProperties, balanceResponseV2Response.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceResponseV2Response {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to BalanceResponseV2Response + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!BalanceResponseV2Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BalanceResponseV2Response is not found in the empty JSON string", BalanceResponseV2Response.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ResourceOfBalanceResponseV2.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BalanceResponseV2Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BalanceResponseV2Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BalanceResponseV2Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BalanceResponseV2Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public BalanceResponseV2Response read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + BalanceResponseV2Response instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BalanceResponseV2Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalanceResponseV2Response + * @throws IOException if the JSON string is invalid with respect to BalanceResponseV2Response + */ + public static BalanceResponseV2Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BalanceResponseV2Response.class); + } + + /** + * Convert an instance of BalanceResponseV2Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDatesOfBalanceV2.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDatesOfBalanceV2.java new file mode 100644 index 00000000..b81d9d98 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDatesOfBalanceV2.java @@ -0,0 +1,356 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * An object that represents the available options to modify schedule of a balance. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ChangeDatesOfBalanceV2 { + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private String endDate; + + public static final String SERIALIZED_NAME_MEMO = "memo"; + @SerializedName(SERIALIZED_NAME_MEMO) + private String memo; + + public ChangeDatesOfBalanceV2() { + } + + public ChangeDatesOfBalanceV2 startDate(String startDate) { + + this.startDate = startDate; + return this; + } + + /** + * Start date of the balance in the format YYYY-MM-DD. + * @return startDate + **/ + @javax.annotation.Nullable + + public String getStartDate() { + return startDate; + } + + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + + public ChangeDatesOfBalanceV2 endDate(String endDate) { + + this.endDate = endDate; + return this; + } + + /** + * End date of the balance in the format YYYY-MM-DD. + * @return endDate + **/ + @javax.annotation.Nullable + + public String getEndDate() { + return endDate; + } + + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + + public ChangeDatesOfBalanceV2 memo(String memo) { + + this.memo = memo; + return this; + } + + /** + * Memo. + * @return memo + **/ + @javax.annotation.Nullable + + public String getMemo() { + return memo; + } + + + public void setMemo(String memo) { + this.memo = memo; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChangeDatesOfBalanceV2 instance itself + */ + public ChangeDatesOfBalanceV2 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChangeDatesOfBalanceV2 changeDatesOfBalanceV2 = (ChangeDatesOfBalanceV2) o; + return Objects.equals(this.startDate, changeDatesOfBalanceV2.startDate) && + Objects.equals(this.endDate, changeDatesOfBalanceV2.endDate) && + Objects.equals(this.memo, changeDatesOfBalanceV2.memo)&& + Objects.equals(this.additionalProperties, changeDatesOfBalanceV2.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(startDate, endDate, memo, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChangeDatesOfBalanceV2 {\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + openapiFields.add("memo"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ChangeDatesOfBalanceV2 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ChangeDatesOfBalanceV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ChangeDatesOfBalanceV2 is not found in the empty JSON string", ChangeDatesOfBalanceV2.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("startDate") != null && !jsonObj.get("startDate").isJsonNull()) && !jsonObj.get("startDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `startDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("startDate").toString())); + } + if ((jsonObj.get("endDate") != null && !jsonObj.get("endDate").isJsonNull()) && !jsonObj.get("endDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); + } + if ((jsonObj.get("memo") != null && !jsonObj.get("memo").isJsonNull()) && !jsonObj.get("memo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChangeDatesOfBalanceV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChangeDatesOfBalanceV2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ChangeDatesOfBalanceV2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ChangeDatesOfBalanceV2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChangeDatesOfBalanceV2 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ChangeDatesOfBalanceV2 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ChangeDatesOfBalanceV2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChangeDatesOfBalanceV2 + * @throws IOException if the JSON string is invalid with respect to ChangeDatesOfBalanceV2 + */ + public static ChangeDatesOfBalanceV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChangeDatesOfBalanceV2.class); + } + + /** + * Convert an instance of ChangeDatesOfBalanceV2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDatesOfBalanceV2Request.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDatesOfBalanceV2Request.java new file mode 100644 index 00000000..2703165c --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDatesOfBalanceV2Request.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.ResourceOfChangeDatesOfBalanceV2; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API request for a single entity + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ChangeDatesOfBalanceV2Request { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ResourceOfChangeDatesOfBalanceV2 data; + + public ChangeDatesOfBalanceV2Request() { + } + + public ChangeDatesOfBalanceV2Request data(ResourceOfChangeDatesOfBalanceV2 data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ResourceOfChangeDatesOfBalanceV2 getData() { + return data; + } + + + public void setData(ResourceOfChangeDatesOfBalanceV2 data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ChangeDatesOfBalanceV2Request instance itself + */ + public ChangeDatesOfBalanceV2Request putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChangeDatesOfBalanceV2Request changeDatesOfBalanceV2Request = (ChangeDatesOfBalanceV2Request) o; + return Objects.equals(this.data, changeDatesOfBalanceV2Request.data)&& + Objects.equals(this.additionalProperties, changeDatesOfBalanceV2Request.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChangeDatesOfBalanceV2Request {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ChangeDatesOfBalanceV2Request + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ChangeDatesOfBalanceV2Request.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ChangeDatesOfBalanceV2Request is not found in the empty JSON string", ChangeDatesOfBalanceV2Request.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ResourceOfChangeDatesOfBalanceV2.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChangeDatesOfBalanceV2Request.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChangeDatesOfBalanceV2Request' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ChangeDatesOfBalanceV2Request.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ChangeDatesOfBalanceV2Request value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ChangeDatesOfBalanceV2Request read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ChangeDatesOfBalanceV2Request instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ChangeDatesOfBalanceV2Request given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChangeDatesOfBalanceV2Request + * @throws IOException if the JSON string is invalid with respect to ChangeDatesOfBalanceV2Request + */ + public static ChangeDatesOfBalanceV2Request fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChangeDatesOfBalanceV2Request.class); + } + + /** + * Convert an instance of ChangeDatesOfBalanceV2Request to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDetailsV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDetailsV1.java new file mode 100644 index 00000000..b6a8b8e0 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDetailsV1.java @@ -0,0 +1,279 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Change details of a property of the balance. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ChangeDetailsV1 { + public static final String SERIALIZED_NAME_PREVIOUS_VALUE = "previousValue"; + @SerializedName(SERIALIZED_NAME_PREVIOUS_VALUE) + private String previousValue; + + public static final String SERIALIZED_NAME_CURRENT_VALUE = "currentValue"; + @SerializedName(SERIALIZED_NAME_CURRENT_VALUE) + private String currentValue; + + public static final String SERIALIZED_NAME_CHANGE_VALUE = "changeValue"; + @SerializedName(SERIALIZED_NAME_CHANGE_VALUE) + private String changeValue; + + public ChangeDetailsV1() { + } + + public ChangeDetailsV1 previousValue(String previousValue) { + + this.previousValue = previousValue; + return this; + } + + /** + * Previous value of a property of the insertion order. + * @return previousValue + **/ + @javax.annotation.Nullable + + public String getPreviousValue() { + return previousValue; + } + + + public void setPreviousValue(String previousValue) { + this.previousValue = previousValue; + } + + + public ChangeDetailsV1 currentValue(String currentValue) { + + this.currentValue = currentValue; + return this; + } + + /** + * Current value of a property of the insertion order. + * @return currentValue + **/ + @javax.annotation.Nullable + + public String getCurrentValue() { + return currentValue; + } + + + public void setCurrentValue(String currentValue) { + this.currentValue = currentValue; + } + + + public ChangeDetailsV1 changeValue(String changeValue) { + + this.changeValue = changeValue; + return this; + } + + /** + * Change detail of a property of the insertion order. + * @return changeValue + **/ + @javax.annotation.Nullable + + public String getChangeValue() { + return changeValue; + } + + + public void setChangeValue(String changeValue) { + this.changeValue = changeValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChangeDetailsV1 changeDetailsV1 = (ChangeDetailsV1) o; + return Objects.equals(this.previousValue, changeDetailsV1.previousValue) && + Objects.equals(this.currentValue, changeDetailsV1.currentValue) && + Objects.equals(this.changeValue, changeDetailsV1.changeValue); + } + + @Override + public int hashCode() { + return Objects.hash(previousValue, currentValue, changeValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChangeDetailsV1 {\n"); + sb.append(" previousValue: ").append(toIndentedString(previousValue)).append("\n"); + sb.append(" currentValue: ").append(toIndentedString(currentValue)).append("\n"); + sb.append(" changeValue: ").append(toIndentedString(changeValue)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("previousValue"); + openapiFields.add("currentValue"); + openapiFields.add("changeValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("previousValue"); + openapiRequiredFields.add("currentValue"); + openapiRequiredFields.add("changeValue"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ChangeDetailsV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ChangeDetailsV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ChangeDetailsV1 is not found in the empty JSON string", ChangeDetailsV1.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!ChangeDetailsV1.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChangeDetailsV1` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ChangeDetailsV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("previousValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `previousValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previousValue").toString())); + } + if (!jsonObj.get("currentValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currentValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currentValue").toString())); + } + if (!jsonObj.get("changeValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `changeValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("changeValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChangeDetailsV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChangeDetailsV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ChangeDetailsV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ChangeDetailsV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ChangeDetailsV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ChangeDetailsV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ChangeDetailsV1 + * @throws IOException if the JSON string is invalid with respect to ChangeDetailsV1 + */ + public static ChangeDetailsV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChangeDetailsV1.class); + } + + /** + * Convert an instance of ChangeDetailsV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDetails.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDetailsV2.java similarity index 80% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDetails.java rename to sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDetailsV2.java index 7cf0ae19..c91a4f01 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDetails.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ChangeDetailsV2.java @@ -47,7 +47,7 @@ * Change details of a property of the insertion order. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ChangeDetails { +public class ChangeDetailsV2 { public static final String SERIALIZED_NAME_PREVIOUS_VALUE = "previousValue"; @SerializedName(SERIALIZED_NAME_PREVIOUS_VALUE) private String previousValue; @@ -60,10 +60,10 @@ public class ChangeDetails { @SerializedName(SERIALIZED_NAME_CHANGE_VALUE) private String changeValue; - public ChangeDetails() { + public ChangeDetailsV2() { } - public ChangeDetails previousValue(String previousValue) { + public ChangeDetailsV2 previousValue(String previousValue) { this.previousValue = previousValue; return this; @@ -85,7 +85,7 @@ public void setPreviousValue(String previousValue) { } - public ChangeDetails currentValue(String currentValue) { + public ChangeDetailsV2 currentValue(String currentValue) { this.currentValue = currentValue; return this; @@ -107,7 +107,7 @@ public void setCurrentValue(String currentValue) { } - public ChangeDetails changeValue(String changeValue) { + public ChangeDetailsV2 changeValue(String changeValue) { this.changeValue = changeValue; return this; @@ -138,10 +138,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ChangeDetails changeDetails = (ChangeDetails) o; - return Objects.equals(this.previousValue, changeDetails.previousValue) && - Objects.equals(this.currentValue, changeDetails.currentValue) && - Objects.equals(this.changeValue, changeDetails.changeValue); + ChangeDetailsV2 changeDetailsV2 = (ChangeDetailsV2) o; + return Objects.equals(this.previousValue, changeDetailsV2.previousValue) && + Objects.equals(this.currentValue, changeDetailsV2.currentValue) && + Objects.equals(this.changeValue, changeDetailsV2.changeValue); } @Override @@ -152,7 +152,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ChangeDetails {\n"); + sb.append("class ChangeDetailsV2 {\n"); sb.append(" previousValue: ").append(toIndentedString(previousValue)).append("\n"); sb.append(" currentValue: ").append(toIndentedString(currentValue)).append("\n"); sb.append(" changeValue: ").append(toIndentedString(changeValue)).append("\n"); @@ -193,25 +193,25 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ChangeDetails + * @throws IOException if the JSON Object is invalid with respect to ChangeDetailsV2 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!ChangeDetails.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ChangeDetails is not found in the empty JSON string", ChangeDetails.openapiRequiredFields.toString())); + if (!ChangeDetailsV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ChangeDetailsV2 is not found in the empty JSON string", ChangeDetailsV2.openapiRequiredFields.toString())); } } Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { - if (!ChangeDetails.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChangeDetails` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + if (!ChangeDetailsV2.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ChangeDetailsV2` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ChangeDetails.openapiRequiredFields) { + for (String requiredField : ChangeDetailsV2.openapiRequiredFields) { if (jsonObj.get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } @@ -231,22 +231,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ChangeDetails.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ChangeDetails' and its subtypes + if (!ChangeDetailsV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ChangeDetailsV2' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ChangeDetails.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ChangeDetailsV2.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ChangeDetails value) throws IOException { + public void write(JsonWriter out, ChangeDetailsV2 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public ChangeDetails read(JsonReader in) throws IOException { + public ChangeDetailsV2 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); return thisAdapter.fromJsonTree(jsonObj); @@ -257,18 +257,18 @@ public ChangeDetails read(JsonReader in) throws IOException { } /** - * Create an instance of ChangeDetails given an JSON string + * Create an instance of ChangeDetailsV2 given an JSON string * * @param jsonString JSON string - * @return An instance of ChangeDetails - * @throws IOException if the JSON string is invalid with respect to ChangeDetails + * @return An instance of ChangeDetailsV2 + * @throws IOException if the JSON string is invalid with respect to ChangeDetailsV2 */ - public static ChangeDetails fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ChangeDetails.class); + public static ChangeDetailsV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ChangeDetailsV2.class); } /** - * Convert an instance of ChangeDetails to an JSON string + * Convert an instance of ChangeDetailsV2 to an JSON string * * @return JSON string */ diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/CommonProblem.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/CommonProblem.java index 491986b3..bbbe75ea 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/CommonProblem.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/CommonProblem.java @@ -47,7 +47,7 @@ import com.criteo.api.retailmedia.preview.JSON; /** - * Common problem object. Can be specialized as needed. + * Common problem object. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class CommonProblem { @@ -222,7 +222,7 @@ public CommonProblem code(String code) { } /** - * A machine-readable error code, expressed as a string value. + * A machine-readable error code, expressed as a string value. * @return code **/ @javax.annotation.Nullable diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/CreateBalanceV2.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/CreateBalanceV2.java new file mode 100644 index 00000000..2482f5f7 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/CreateBalanceV2.java @@ -0,0 +1,541 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * An object that represents the available options to set when creating a Retail Media Balance + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class CreateBalanceV2 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_PO_NUMBER = "poNumber"; + @SerializedName(SERIALIZED_NAME_PO_NUMBER) + private String poNumber; + + public static final String SERIALIZED_NAME_DEPOSITED = "deposited"; + @SerializedName(SERIALIZED_NAME_DEPOSITED) + private BigDecimal deposited; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private String endDate; + + /** + * Type of the balance spend. + */ + @JsonAdapter(SpendTypeEnum.Adapter.class) + public enum SpendTypeEnum { + ONSITE("Onsite"), + + OFFSITE("Offsite"), + + OFFSITEAWARENESS("OffsiteAwareness"); + + private String value; + + SpendTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SpendTypeEnum fromValue(String value) { + for (SpendTypeEnum b : SpendTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SpendTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SpendTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SpendTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_SPEND_TYPE = "spendType"; + @SerializedName(SERIALIZED_NAME_SPEND_TYPE) + private SpendTypeEnum spendType; + + public static final String SERIALIZED_NAME_MEMO = "memo"; + @SerializedName(SERIALIZED_NAME_MEMO) + private String memo; + + public CreateBalanceV2() { + } + + public CreateBalanceV2 name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the balance. + * @return name + **/ + @javax.annotation.Nonnull + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public CreateBalanceV2 poNumber(String poNumber) { + + this.poNumber = poNumber; + return this; + } + + /** + * Purchase Order number. + * @return poNumber + **/ + @javax.annotation.Nullable + + public String getPoNumber() { + return poNumber; + } + + + public void setPoNumber(String poNumber) { + this.poNumber = poNumber; + } + + + public CreateBalanceV2 deposited(BigDecimal deposited) { + + this.deposited = deposited; + return this; + } + + /** + * Amount of billable funds allotted to the balance. + * @return deposited + **/ + @javax.annotation.Nullable + + public BigDecimal getDeposited() { + return deposited; + } + + + public void setDeposited(BigDecimal deposited) { + this.deposited = deposited; + } + + + public CreateBalanceV2 startDate(String startDate) { + + this.startDate = startDate; + return this; + } + + /** + * Start date of the balance in the format YYYY-MM-DD. + * @return startDate + **/ + @javax.annotation.Nonnull + + public String getStartDate() { + return startDate; + } + + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + + public CreateBalanceV2 endDate(String endDate) { + + this.endDate = endDate; + return this; + } + + /** + * End date of the balance in the format YYYY-MM-DD. + * @return endDate + **/ + @javax.annotation.Nullable + + public String getEndDate() { + return endDate; + } + + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + + public CreateBalanceV2 spendType(SpendTypeEnum spendType) { + + this.spendType = spendType; + return this; + } + + /** + * Type of the balance spend. + * @return spendType + **/ + @javax.annotation.Nonnull + + public SpendTypeEnum getSpendType() { + return spendType; + } + + + public void setSpendType(SpendTypeEnum spendType) { + this.spendType = spendType; + } + + + public CreateBalanceV2 memo(String memo) { + + this.memo = memo; + return this; + } + + /** + * Memo + * @return memo + **/ + @javax.annotation.Nullable + + public String getMemo() { + return memo; + } + + + public void setMemo(String memo) { + this.memo = memo; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateBalanceV2 instance itself + */ + public CreateBalanceV2 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBalanceV2 createBalanceV2 = (CreateBalanceV2) o; + return Objects.equals(this.name, createBalanceV2.name) && + Objects.equals(this.poNumber, createBalanceV2.poNumber) && + Objects.equals(this.deposited, createBalanceV2.deposited) && + Objects.equals(this.startDate, createBalanceV2.startDate) && + Objects.equals(this.endDate, createBalanceV2.endDate) && + Objects.equals(this.spendType, createBalanceV2.spendType) && + Objects.equals(this.memo, createBalanceV2.memo)&& + Objects.equals(this.additionalProperties, createBalanceV2.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, poNumber, deposited, startDate, endDate, spendType, memo, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateBalanceV2 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" poNumber: ").append(toIndentedString(poNumber)).append("\n"); + sb.append(" deposited: ").append(toIndentedString(deposited)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" spendType: ").append(toIndentedString(spendType)).append("\n"); + sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("poNumber"); + openapiFields.add("deposited"); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + openapiFields.add("spendType"); + openapiFields.add("memo"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("startDate"); + openapiRequiredFields.add("spendType"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to CreateBalanceV2 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!CreateBalanceV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBalanceV2 is not found in the empty JSON string", CreateBalanceV2.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateBalanceV2.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("poNumber") != null && !jsonObj.get("poNumber").isJsonNull()) && !jsonObj.get("poNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `poNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("poNumber").toString())); + } + if (!jsonObj.get("startDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `startDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("startDate").toString())); + } + if ((jsonObj.get("endDate") != null && !jsonObj.get("endDate").isJsonNull()) && !jsonObj.get("endDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); + } + if (!jsonObj.get("spendType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `spendType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("spendType").toString())); + } + if ((jsonObj.get("memo") != null && !jsonObj.get("memo").isJsonNull()) && !jsonObj.get("memo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateBalanceV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateBalanceV2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateBalanceV2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateBalanceV2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateBalanceV2 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + CreateBalanceV2 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateBalanceV2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateBalanceV2 + * @throws IOException if the JSON string is invalid with respect to CreateBalanceV2 + */ + public static CreateBalanceV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateBalanceV2.class); + } + + /** + * Convert an instance of CreateBalanceV2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudienceRequest.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/CreateBalanceV2Request.java similarity index 74% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudienceRequest.java rename to sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/CreateBalanceV2Request.java index d96278cf..4aaf0c47 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/ReplaceAudienceRequest.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/CreateBalanceV2Request.java @@ -1,8 +1,8 @@ /* * Criteo API - * Criteo API - MarketingSolutions + * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: Preview * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.retailmedia.preview.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.ReplaceAudience; +import com.criteo.api.retailmedia.preview.model.ResourceOfCreateBalanceV2; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,21 +42,21 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.retailmedia.preview.JSON; /** - * Request to replace an audience + * A top-level object that encapsulates a Criteo API request for a single entity */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReplaceAudienceRequest { +public class CreateBalanceV2Request { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private ReplaceAudience data; + private ResourceOfCreateBalanceV2 data; - public ReplaceAudienceRequest() { + public CreateBalanceV2Request() { } - public ReplaceAudienceRequest data(ReplaceAudience data) { + public CreateBalanceV2Request data(ResourceOfCreateBalanceV2 data) { this.data = data; return this; @@ -66,14 +66,14 @@ public ReplaceAudienceRequest data(ReplaceAudience data) { * Get data * @return data **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable - public ReplaceAudience getData() { + public ResourceOfCreateBalanceV2 getData() { return data; } - public void setData(ReplaceAudience data) { + public void setData(ResourceOfCreateBalanceV2 data) { this.data = data; } @@ -90,9 +90,9 @@ public void setData(ReplaceAudience data) { * * @param key name of the property * @param value value of the property - * @return the ReplaceAudienceRequest instance itself + * @return the CreateBalanceV2Request instance itself */ - public ReplaceAudienceRequest putAdditionalProperty(String key, Object value) { + public CreateBalanceV2Request putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -131,9 +131,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReplaceAudienceRequest replaceAudienceRequest = (ReplaceAudienceRequest) o; - return Objects.equals(this.data, replaceAudienceRequest.data)&& - Objects.equals(this.additionalProperties, replaceAudienceRequest.additionalProperties); + CreateBalanceV2Request createBalanceV2Request = (CreateBalanceV2Request) o; + return Objects.equals(this.data, createBalanceV2Request.data)&& + Objects.equals(this.additionalProperties, createBalanceV2Request.additionalProperties); } @Override @@ -144,7 +144,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ReplaceAudienceRequest {\n"); + sb.append("class CreateBalanceV2Request {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -173,46 +173,40 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); } /** * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ReplaceAudienceRequest + * @throws IOException if the JSON Object is invalid with respect to CreateBalanceV2Request */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!ReplaceAudienceRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReplaceAudienceRequest is not found in the empty JSON string", ReplaceAudienceRequest.openapiRequiredFields.toString())); + if (!CreateBalanceV2Request.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateBalanceV2Request is not found in the empty JSON string", CreateBalanceV2Request.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ReplaceAudienceRequest.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); - } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ResourceOfCreateBalanceV2.validateJsonObject(jsonObj.getAsJsonObject("data")); } - // validate the required field `data` - ReplaceAudience.validateJsonObject(jsonObj.getAsJsonObject("data")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReplaceAudienceRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReplaceAudienceRequest' and its subtypes + if (!CreateBalanceV2Request.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateBalanceV2Request' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReplaceAudienceRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateBalanceV2Request.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ReplaceAudienceRequest value) throws IOException { + public void write(JsonWriter out, CreateBalanceV2Request value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -235,11 +229,11 @@ else if (entry.getValue() instanceof Character) } @Override - public ReplaceAudienceRequest read(JsonReader in) throws IOException { + public CreateBalanceV2Request read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - ReplaceAudienceRequest instance = thisAdapter.fromJsonTree(jsonObj); + CreateBalanceV2Request instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -266,18 +260,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ReplaceAudienceRequest given an JSON string + * Create an instance of CreateBalanceV2Request given an JSON string * * @param jsonString JSON string - * @return An instance of ReplaceAudienceRequest - * @throws IOException if the JSON string is invalid with respect to ReplaceAudienceRequest + * @return An instance of CreateBalanceV2Request + * @throws IOException if the JSON string is invalid with respect to CreateBalanceV2Request */ - public static ReplaceAudienceRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReplaceAudienceRequest.class); + public static CreateBalanceV2Request fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateBalanceV2Request.class); } /** - * Convert an instance of ReplaceAudienceRequest to an JSON string + * Convert an instance of CreateBalanceV2Request to an JSON string * * @return JSON string */ diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ExternalCatalogStatus.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ExternalCatalogStatus.java new file mode 100644 index 00000000..5b902321 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ExternalCatalogStatus.java @@ -0,0 +1,531 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * The status of an asynchronous request to generate a catalog + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExternalCatalogStatus { + /** + * An enumeration of the status of the catalog. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + UNKNOWN("unknown"), + + PENDING("pending"), + + SUCCESS("success"), + + FAILURE("failure"), + + EXPIRED("expired"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + public static final String SERIALIZED_NAME_CURRENCY = "currency"; + @SerializedName(SERIALIZED_NAME_CURRENCY) + private String currency; + + public static final String SERIALIZED_NAME_ROW_COUNT = "rowCount"; + @SerializedName(SERIALIZED_NAME_ROW_COUNT) + private Integer rowCount; + + public static final String SERIALIZED_NAME_FILE_SIZE_BYTES = "fileSizeBytes"; + @SerializedName(SERIALIZED_NAME_FILE_SIZE_BYTES) + private Integer fileSizeBytes; + + public static final String SERIALIZED_NAME_MD5_CHECKSUM = "md5Checksum"; + @SerializedName(SERIALIZED_NAME_MD5_CHECKSUM) + private String md5Checksum; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public ExternalCatalogStatus() { + } + + public ExternalCatalogStatus status(StatusEnum status) { + + this.status = status; + return this; + } + + /** + * An enumeration of the status of the catalog. + * @return status + **/ + @javax.annotation.Nonnull + + public StatusEnum getStatus() { + return status; + } + + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public ExternalCatalogStatus currency(String currency) { + + this.currency = currency; + return this; + } + + /** + * An ISO4217 representation of the currency products are listed under in this catalog. + * @return currency + **/ + @javax.annotation.Nonnull + + public String getCurrency() { + return currency; + } + + + public void setCurrency(String currency) { + this.currency = currency; + } + + + public ExternalCatalogStatus rowCount(Integer rowCount) { + + this.rowCount = rowCount; + return this; + } + + /** + * An indication of the number of products contained in this catalog. Available when this catalog reaches a success status. + * @return rowCount + **/ + @javax.annotation.Nullable + + public Integer getRowCount() { + return rowCount; + } + + + public void setRowCount(Integer rowCount) { + this.rowCount = rowCount; + } + + + public ExternalCatalogStatus fileSizeBytes(Integer fileSizeBytes) { + + this.fileSizeBytes = fileSizeBytes; + return this; + } + + /** + * The size of this catalog in bytes. Available when this catalog reaches a success status. + * @return fileSizeBytes + **/ + @javax.annotation.Nullable + + public Integer getFileSizeBytes() { + return fileSizeBytes; + } + + + public void setFileSizeBytes(Integer fileSizeBytes) { + this.fileSizeBytes = fileSizeBytes; + } + + + public ExternalCatalogStatus md5Checksum(String md5Checksum) { + + this.md5Checksum = md5Checksum; + return this; + } + + /** + * An MD5 checksum of the catalog for use in confirming complete and uncorrupted retrieval. Available when this catalog reaches a success status. + * @return md5Checksum + **/ + @javax.annotation.Nullable + + public String getMd5Checksum() { + return md5Checksum; + } + + + public void setMd5Checksum(String md5Checksum) { + this.md5Checksum = md5Checksum; + } + + + public ExternalCatalogStatus createdAt(OffsetDateTime createdAt) { + + this.createdAt = createdAt; + return this; + } + + /** + * The time this catalog was created. Represented as a UTC ISO8601 string. + * @return createdAt + **/ + @javax.annotation.Nonnull + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public ExternalCatalogStatus message(String message) { + + this.message = message; + return this; + } + + /** + * An optional information message intended for developer consumption. + * @return message + **/ + @javax.annotation.Nullable + + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ExternalCatalogStatus instance itself + */ + public ExternalCatalogStatus putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExternalCatalogStatus externalCatalogStatus = (ExternalCatalogStatus) o; + return Objects.equals(this.status, externalCatalogStatus.status) && + Objects.equals(this.currency, externalCatalogStatus.currency) && + Objects.equals(this.rowCount, externalCatalogStatus.rowCount) && + Objects.equals(this.fileSizeBytes, externalCatalogStatus.fileSizeBytes) && + Objects.equals(this.md5Checksum, externalCatalogStatus.md5Checksum) && + Objects.equals(this.createdAt, externalCatalogStatus.createdAt) && + Objects.equals(this.message, externalCatalogStatus.message)&& + Objects.equals(this.additionalProperties, externalCatalogStatus.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(status, currency, rowCount, fileSizeBytes, md5Checksum, createdAt, message, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalCatalogStatus {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" rowCount: ").append(toIndentedString(rowCount)).append("\n"); + sb.append(" fileSizeBytes: ").append(toIndentedString(fileSizeBytes)).append("\n"); + sb.append(" md5Checksum: ").append(toIndentedString(md5Checksum)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + openapiFields.add("currency"); + openapiFields.add("rowCount"); + openapiFields.add("fileSizeBytes"); + openapiFields.add("md5Checksum"); + openapiFields.add("createdAt"); + openapiFields.add("message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("currency"); + openapiRequiredFields.add("rowCount"); + openapiRequiredFields.add("fileSizeBytes"); + openapiRequiredFields.add("md5Checksum"); + openapiRequiredFields.add("createdAt"); + openapiRequiredFields.add("message"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ExternalCatalogStatus + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ExternalCatalogStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExternalCatalogStatus is not found in the empty JSON string", ExternalCatalogStatus.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExternalCatalogStatus.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (!jsonObj.get("currency").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `currency` to be a primitive type in the JSON string but got `%s`", jsonObj.get("currency").toString())); + } + if (!jsonObj.get("md5Checksum").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `md5Checksum` to be a primitive type in the JSON string but got `%s`", jsonObj.get("md5Checksum").toString())); + } + if (!jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExternalCatalogStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExternalCatalogStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExternalCatalogStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExternalCatalogStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ExternalCatalogStatus read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ExternalCatalogStatus instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExternalCatalogStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExternalCatalogStatus + * @throws IOException if the JSON string is invalid with respect to ExternalCatalogStatus + */ + public static ExternalCatalogStatus fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExternalCatalogStatus.class); + } + + /** + * Convert an instance of ExternalCatalogStatus to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/GrantConsentInput.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/GrantConsentInput.java index 92eefbd4..22ae315e 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/GrantConsentInput.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/GrantConsentInput.java @@ -45,7 +45,7 @@ import com.criteo.api.retailmedia.preview.JSON; /** - * A top-level object that encapsulates a Criteo API request for a single value. + * An object that encapsulates GrantConsentModel */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class GrantConsentInput { diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/GrantConsentModel.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/GrantConsentModel.java index da3888b4..24098cd5 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/GrantConsentModel.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/GrantConsentModel.java @@ -45,7 +45,7 @@ import com.criteo.api.retailmedia.preview.JSON; /** - * An object that represents the required (ClientId and CallbackUrl) and optional (CallbackState) parameters when granting consents on behalf of a Private Market demand account. + * An object that represents the required (ClientId and CallbackUrl) and optional (CallbackState) parameters when granting consents on behalf of a Private Market demand account */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class GrantConsentModel { diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/GrantConsentModelValueResource.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/GrantConsentModelValueResource.java index cf853396..30002675 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/GrantConsentModelValueResource.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/GrantConsentModelValueResource.java @@ -46,7 +46,7 @@ import com.criteo.api.retailmedia.preview.JSON; /** - * A top-level object that encapsulates a Criteo API response for a single value. + * A top-level object that encapsulates a Criteo API response for a single value */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class GrantConsentModelValueResource { diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/InsertionOrderHistoryChangeDataCapture.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/InsertionOrderHistoryChangeDataCaptureV2.java similarity index 81% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/InsertionOrderHistoryChangeDataCapture.java rename to sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/InsertionOrderHistoryChangeDataCaptureV2.java index caf326dc..7032d9d9 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/InsertionOrderHistoryChangeDataCapture.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/InsertionOrderHistoryChangeDataCaptureV2.java @@ -15,7 +15,7 @@ import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.ChangeDetails; +import com.criteo.api.retailmedia.preview.model.ChangeDetailsV2; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -50,7 +50,7 @@ * Data model represents the data change capture of insertion order history. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class InsertionOrderHistoryChangeDataCapture { +public class InsertionOrderHistoryChangeDataCaptureV2 { public static final String SERIALIZED_NAME_DATE_OF_MODIFICATION = "dateOfModification"; @SerializedName(SERIALIZED_NAME_DATE_OF_MODIFICATION) private OffsetDateTime dateOfModification; @@ -84,7 +84,7 @@ public enum ChangeTypeEnum { VALUEADD("ValueAdd"), - SALESFORCEID("SalesforceId"); + UNKNOWN("Unknown"); private String value; @@ -130,16 +130,16 @@ public ChangeTypeEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_CHANGE_DETAILS = "changeDetails"; @SerializedName(SERIALIZED_NAME_CHANGE_DETAILS) - private ChangeDetails changeDetails; + private ChangeDetailsV2 changeDetails; public static final String SERIALIZED_NAME_MEMO = "memo"; @SerializedName(SERIALIZED_NAME_MEMO) private String memo; - public InsertionOrderHistoryChangeDataCapture() { + public InsertionOrderHistoryChangeDataCaptureV2() { } - public InsertionOrderHistoryChangeDataCapture dateOfModification(OffsetDateTime dateOfModification) { + public InsertionOrderHistoryChangeDataCaptureV2 dateOfModification(OffsetDateTime dateOfModification) { this.dateOfModification = dateOfModification; return this; @@ -161,14 +161,14 @@ public void setDateOfModification(OffsetDateTime dateOfModification) { } - public InsertionOrderHistoryChangeDataCapture modifiedByUser(String modifiedByUser) { + public InsertionOrderHistoryChangeDataCaptureV2 modifiedByUser(String modifiedByUser) { this.modifiedByUser = modifiedByUser; return this; } /** - * User name who modified the insertion order. + * Username who modified the insertion order. * @return modifiedByUser **/ @javax.annotation.Nonnull @@ -183,7 +183,7 @@ public void setModifiedByUser(String modifiedByUser) { } - public InsertionOrderHistoryChangeDataCapture changeType(ChangeTypeEnum changeType) { + public InsertionOrderHistoryChangeDataCaptureV2 changeType(ChangeTypeEnum changeType) { this.changeType = changeType; return this; @@ -205,7 +205,7 @@ public void setChangeType(ChangeTypeEnum changeType) { } - public InsertionOrderHistoryChangeDataCapture changeDetails(ChangeDetails changeDetails) { + public InsertionOrderHistoryChangeDataCaptureV2 changeDetails(ChangeDetailsV2 changeDetails) { this.changeDetails = changeDetails; return this; @@ -217,17 +217,17 @@ public InsertionOrderHistoryChangeDataCapture changeDetails(ChangeDetails change **/ @javax.annotation.Nonnull - public ChangeDetails getChangeDetails() { + public ChangeDetailsV2 getChangeDetails() { return changeDetails; } - public void setChangeDetails(ChangeDetails changeDetails) { + public void setChangeDetails(ChangeDetailsV2 changeDetails) { this.changeDetails = changeDetails; } - public InsertionOrderHistoryChangeDataCapture memo(String memo) { + public InsertionOrderHistoryChangeDataCaptureV2 memo(String memo) { this.memo = memo; return this; @@ -258,12 +258,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - InsertionOrderHistoryChangeDataCapture insertionOrderHistoryChangeDataCapture = (InsertionOrderHistoryChangeDataCapture) o; - return Objects.equals(this.dateOfModification, insertionOrderHistoryChangeDataCapture.dateOfModification) && - Objects.equals(this.modifiedByUser, insertionOrderHistoryChangeDataCapture.modifiedByUser) && - Objects.equals(this.changeType, insertionOrderHistoryChangeDataCapture.changeType) && - Objects.equals(this.changeDetails, insertionOrderHistoryChangeDataCapture.changeDetails) && - Objects.equals(this.memo, insertionOrderHistoryChangeDataCapture.memo); + InsertionOrderHistoryChangeDataCaptureV2 insertionOrderHistoryChangeDataCaptureV2 = (InsertionOrderHistoryChangeDataCaptureV2) o; + return Objects.equals(this.dateOfModification, insertionOrderHistoryChangeDataCaptureV2.dateOfModification) && + Objects.equals(this.modifiedByUser, insertionOrderHistoryChangeDataCaptureV2.modifiedByUser) && + Objects.equals(this.changeType, insertionOrderHistoryChangeDataCaptureV2.changeType) && + Objects.equals(this.changeDetails, insertionOrderHistoryChangeDataCaptureV2.changeDetails) && + Objects.equals(this.memo, insertionOrderHistoryChangeDataCaptureV2.memo); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -285,7 +285,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class InsertionOrderHistoryChangeDataCapture {\n"); + sb.append("class InsertionOrderHistoryChangeDataCaptureV2 {\n"); sb.append(" dateOfModification: ").append(toIndentedString(dateOfModification)).append("\n"); sb.append(" modifiedByUser: ").append(toIndentedString(modifiedByUser)).append("\n"); sb.append(" changeType: ").append(toIndentedString(changeType)).append("\n"); @@ -331,25 +331,25 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to InsertionOrderHistoryChangeDataCapture + * @throws IOException if the JSON Object is invalid with respect to InsertionOrderHistoryChangeDataCaptureV2 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!InsertionOrderHistoryChangeDataCapture.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InsertionOrderHistoryChangeDataCapture is not found in the empty JSON string", InsertionOrderHistoryChangeDataCapture.openapiRequiredFields.toString())); + if (!InsertionOrderHistoryChangeDataCaptureV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in InsertionOrderHistoryChangeDataCaptureV2 is not found in the empty JSON string", InsertionOrderHistoryChangeDataCaptureV2.openapiRequiredFields.toString())); } } Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { - if (!InsertionOrderHistoryChangeDataCapture.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InsertionOrderHistoryChangeDataCapture` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + if (!InsertionOrderHistoryChangeDataCaptureV2.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `InsertionOrderHistoryChangeDataCaptureV2` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : InsertionOrderHistoryChangeDataCapture.openapiRequiredFields) { + for (String requiredField : InsertionOrderHistoryChangeDataCaptureV2.openapiRequiredFields) { if (jsonObj.get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } @@ -361,7 +361,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("Expected the field `changeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("changeType").toString())); } // validate the required field `changeDetails` - ChangeDetails.validateJsonObject(jsonObj.getAsJsonObject("changeDetails")); + ChangeDetailsV2.validateJsonObject(jsonObj.getAsJsonObject("changeDetails")); if ((jsonObj.get("memo") != null && !jsonObj.get("memo").isJsonNull()) && !jsonObj.get("memo").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); } @@ -371,22 +371,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!InsertionOrderHistoryChangeDataCapture.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'InsertionOrderHistoryChangeDataCapture' and its subtypes + if (!InsertionOrderHistoryChangeDataCaptureV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'InsertionOrderHistoryChangeDataCaptureV2' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(InsertionOrderHistoryChangeDataCapture.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(InsertionOrderHistoryChangeDataCaptureV2.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, InsertionOrderHistoryChangeDataCapture value) throws IOException { + public void write(JsonWriter out, InsertionOrderHistoryChangeDataCaptureV2 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public InsertionOrderHistoryChangeDataCapture read(JsonReader in) throws IOException { + public InsertionOrderHistoryChangeDataCaptureV2 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); return thisAdapter.fromJsonTree(jsonObj); @@ -397,18 +397,18 @@ public InsertionOrderHistoryChangeDataCapture read(JsonReader in) throws IOExcep } /** - * Create an instance of InsertionOrderHistoryChangeDataCapture given an JSON string + * Create an instance of InsertionOrderHistoryChangeDataCaptureV2 given an JSON string * * @param jsonString JSON string - * @return An instance of InsertionOrderHistoryChangeDataCapture - * @throws IOException if the JSON string is invalid with respect to InsertionOrderHistoryChangeDataCapture + * @return An instance of InsertionOrderHistoryChangeDataCaptureV2 + * @throws IOException if the JSON string is invalid with respect to InsertionOrderHistoryChangeDataCaptureV2 */ - public static InsertionOrderHistoryChangeDataCapture fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, InsertionOrderHistoryChangeDataCapture.class); + public static InsertionOrderHistoryChangeDataCaptureV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, InsertionOrderHistoryChangeDataCaptureV2.class); } /** - * Convert an instance of InsertionOrderHistoryChangeDataCapture to an JSON string + * Convert an instance of InsertionOrderHistoryChangeDataCaptureV2 to an JSON string * * @return JSON string */ diff --git a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/Audience.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java similarity index 68% rename from sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/Audience.java rename to sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java index fa9a6391..8f600291 100644 --- a/sdks/marketingsolutions_2023-04/src/main/java/com/criteo/api/marketingsolutions/v2023_04/model/Audience.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.java @@ -1,8 +1,8 @@ /* * Criteo API - * Criteo API - MarketingSolutions + * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: Preview * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.marketingsolutions.v2023_04.model; +package com.criteo.api.retailmedia.preview.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.marketingsolutions.v2023_04.model.AudienceAttributes; +import com.criteo.api.retailmedia.preview.model.ExternalCatalogStatus; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,73 +42,73 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.marketingsolutions.v2023_04.JSON; +import com.criteo.api.retailmedia.preview.JSON; /** - * Definition of an audience and all its information + * A JSON:API wrapper class to format a <typeparamref name=\"TAttributes\" /> with external Id, Type, and Attributes properties */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Audience { - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - +public class JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) private String id; + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private AudienceAttributes attributes; + private ExternalCatalogStatus attributes; - public Audience() { + public JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus() { } - public Audience type(String type) { + public JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus id(String id) { - this.type = type; + this.id = id; return this; } /** - * the name of the entity type - * @return type + * Get id + * @return id **/ @javax.annotation.Nonnull - public String getType() { - return type; + public String getId() { + return id; } - public void setType(String type) { - this.type = type; + public void setId(String id) { + this.id = id; } - public Audience id(String id) { + public JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus type(String type) { - this.id = id; + this.type = type; return this; } /** - * id of the Audience - * @return id + * Get type + * @return type **/ @javax.annotation.Nonnull - public String getId() { - return id; + public String getType() { + return type; } - public void setId(String id) { - this.id = id; + public void setType(String type) { + this.type = type; } - public Audience attributes(AudienceAttributes attributes) { + public JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus attributes(ExternalCatalogStatus attributes) { this.attributes = attributes; return this; @@ -118,14 +118,14 @@ public Audience attributes(AudienceAttributes attributes) { * Get attributes * @return attributes **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable - public AudienceAttributes getAttributes() { + public ExternalCatalogStatus getAttributes() { return attributes; } - public void setAttributes(AudienceAttributes attributes) { + public void setAttributes(ExternalCatalogStatus attributes) { this.attributes = attributes; } @@ -142,9 +142,9 @@ public void setAttributes(AudienceAttributes attributes) { * * @param key name of the property * @param value value of the property - * @return the Audience instance itself + * @return the JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus instance itself */ - public Audience putAdditionalProperty(String key, Object value) { + public JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -183,24 +183,24 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Audience audience = (Audience) o; - return Objects.equals(this.type, audience.type) && - Objects.equals(this.id, audience.id) && - Objects.equals(this.attributes, audience.attributes)&& - Objects.equals(this.additionalProperties, audience.additionalProperties); + JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus jsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus = (JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus) o; + return Objects.equals(this.id, jsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.id) && + Objects.equals(this.type, jsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.type) && + Objects.equals(this.attributes, jsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.attributes)&& + Objects.equals(this.additionalProperties, jsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.additionalProperties); } @Override public int hashCode() { - return Objects.hash(type, id, attributes, additionalProperties); + return Objects.hash(id, type, attributes, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Audience {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("class JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -225,60 +225,61 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("type"); openapiFields.add("id"); + openapiFields.add("type"); openapiFields.add("attributes"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); openapiRequiredFields.add("id"); - openapiRequiredFields.add("attributes"); + openapiRequiredFields.add("type"); } /** * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to Audience + * @throws IOException if the JSON Object is invalid with respect to JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!Audience.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Audience is not found in the empty JSON string", Audience.openapiRequiredFields.toString())); + if (!JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus is not found in the empty JSON string", JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : Audience.openapiRequiredFields) { + for (String requiredField : JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.openapiRequiredFields) { if (jsonObj.get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } } + if (!jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + ExternalCatalogStatus.validateJsonObject(jsonObj.getAsJsonObject("attributes")); } - // validate the required field `attributes` - AudienceAttributes.validateJsonObject(jsonObj.getAsJsonObject("attributes")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!Audience.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Audience' and its subtypes + if (!JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Audience.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, Audience value) throws IOException { + public void write(JsonWriter out, JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -301,11 +302,11 @@ else if (entry.getValue() instanceof Character) } @Override - public Audience read(JsonReader in) throws IOException { + public JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - Audience instance = thisAdapter.fromJsonTree(jsonObj); + JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -332,18 +333,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of Audience given an JSON string + * Create an instance of JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus given an JSON string * * @param jsonString JSON string - * @return An instance of Audience - * @throws IOException if the JSON string is invalid with respect to Audience + * @return An instance of JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus + * @throws IOException if the JSON string is invalid with respect to JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus */ - public static Audience fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Audience.class); + public static JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.class); } /** - * Convert an instance of Audience to an JSON string + * Convert an instance of JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus to an JSON string * * @return JSON string */ diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.java new file mode 100644 index 00000000..81b60295 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.java @@ -0,0 +1,322 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.SellerCatalogRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A JSON:API wrapper class to format a <typeparamref name=\"TAttributes\" /> with Type, and Attributes properties + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private SellerCatalogRequest attributes; + + public JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest() { + } + + public JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nonnull + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest attributes(SellerCatalogRequest attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public SellerCatalogRequest getAttributes() { + return attributes; + } + + + public void setAttributes(SellerCatalogRequest attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest instance itself + */ + public JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest jsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest = (JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest) o; + return Objects.equals(this.type, jsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.type) && + Objects.equals(this.attributes, jsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.attributes)&& + Objects.equals(this.additionalProperties, jsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest is not found in the empty JSON string", JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + SellerCatalogRequest.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest + * @throws IOException if the JSON string is invalid with respect to JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest + */ + public static JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.class); + } + + /** + * Convert an instance of JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfAccount.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfAccount.java index 68f036cf..f20eac62 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfAccount.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfAccount.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfAccount metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfBrand.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfBrand.java index b587e836..1e891d30 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfBrand.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfBrand.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfBrand metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfRetailer.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfRetailer.java index 9ce6722e..96d15c76 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfRetailer.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiPageResponseOfRetailer.java @@ -143,7 +143,7 @@ public JsonApiPageResponseOfRetailer metadata(PageMetadata metadata) { * Get metadata * @return metadata **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public PageMetadata getMetadata() { return metadata; @@ -286,6 +286,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("metadata"); openapiRequiredFields.add("data"); } @@ -336,10 +337,8 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } - // validate the optional field `metadata` - if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { - PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); - } + // validate the required field `metadata` + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiRequestOfSellerCatalogRequest.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiRequestOfSellerCatalogRequest.java new file mode 100644 index 00000000..98aef51f --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiRequestOfSellerCatalogRequest.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A JSON:API wrapper class to format a <typeparamref name=\"TAttributes\" /> with Type, and Attributes properties + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class JsonApiRequestOfSellerCatalogRequest { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest data; + + public JsonApiRequestOfSellerCatalogRequest() { + } + + public JsonApiRequestOfSellerCatalogRequest data(JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest getData() { + return data; + } + + + public void setData(JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the JsonApiRequestOfSellerCatalogRequest instance itself + */ + public JsonApiRequestOfSellerCatalogRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JsonApiRequestOfSellerCatalogRequest jsonApiRequestOfSellerCatalogRequest = (JsonApiRequestOfSellerCatalogRequest) o; + return Objects.equals(this.data, jsonApiRequestOfSellerCatalogRequest.data)&& + Objects.equals(this.additionalProperties, jsonApiRequestOfSellerCatalogRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JsonApiRequestOfSellerCatalogRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to JsonApiRequestOfSellerCatalogRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!JsonApiRequestOfSellerCatalogRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in JsonApiRequestOfSellerCatalogRequest is not found in the empty JSON string", JsonApiRequestOfSellerCatalogRequest.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonApiBodyWithoutIdOfSellerCatalogRequestAndSellerCatalogRequest.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JsonApiRequestOfSellerCatalogRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JsonApiRequestOfSellerCatalogRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JsonApiRequestOfSellerCatalogRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JsonApiRequestOfSellerCatalogRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public JsonApiRequestOfSellerCatalogRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + JsonApiRequestOfSellerCatalogRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of JsonApiRequestOfSellerCatalogRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of JsonApiRequestOfSellerCatalogRequest + * @throws IOException if the JSON string is invalid with respect to JsonApiRequestOfSellerCatalogRequest + */ + public static JsonApiRequestOfSellerCatalogRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JsonApiRequestOfSellerCatalogRequest.class); + } + + /** + * Convert an instance of JsonApiRequestOfSellerCatalogRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiSingleResponseOfCatalogStatus.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiSingleResponseOfCatalogStatus.java new file mode 100644 index 00000000..9bfbed22 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/JsonApiSingleResponseOfCatalogStatus.java @@ -0,0 +1,394 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.CommonError; +import com.criteo.api.retailmedia.preview.model.CommonWarning; +import com.criteo.api.retailmedia.preview.model.JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A JSON:API wrapper class to add one JSON:API <typeparamref name=\"T\" /> within a data property + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class JsonApiSingleResponseOfCatalogStatus { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus data; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public JsonApiSingleResponseOfCatalogStatus() { + } + + public JsonApiSingleResponseOfCatalogStatus data(JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nonnull + + public JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus getData() { + return data; + } + + + public void setData(JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus data) { + this.data = data; + } + + + public JsonApiSingleResponseOfCatalogStatus errors(List errors) { + + this.errors = errors; + return this; + } + + public JsonApiSingleResponseOfCatalogStatus addErrorsItem(CommonError errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + public void setErrors(List errors) { + this.errors = errors; + } + + + public JsonApiSingleResponseOfCatalogStatus warnings(List warnings) { + + this.warnings = warnings; + return this; + } + + public JsonApiSingleResponseOfCatalogStatus addWarningsItem(CommonWarning warningsItem) { + if (this.warnings == null) { + this.warnings = new ArrayList<>(); + } + this.warnings.add(warningsItem); + return this; + } + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + public void setWarnings(List warnings) { + this.warnings = warnings; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the JsonApiSingleResponseOfCatalogStatus instance itself + */ + public JsonApiSingleResponseOfCatalogStatus putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JsonApiSingleResponseOfCatalogStatus jsonApiSingleResponseOfCatalogStatus = (JsonApiSingleResponseOfCatalogStatus) o; + return Objects.equals(this.data, jsonApiSingleResponseOfCatalogStatus.data) && + Objects.equals(this.errors, jsonApiSingleResponseOfCatalogStatus.errors) && + Objects.equals(this.warnings, jsonApiSingleResponseOfCatalogStatus.warnings)&& + Objects.equals(this.additionalProperties, jsonApiSingleResponseOfCatalogStatus.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, errors, warnings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JsonApiSingleResponseOfCatalogStatus {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("errors"); + openapiFields.add("warnings"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to JsonApiSingleResponseOfCatalogStatus + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!JsonApiSingleResponseOfCatalogStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in JsonApiSingleResponseOfCatalogStatus is not found in the empty JSON string", JsonApiSingleResponseOfCatalogStatus.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : JsonApiSingleResponseOfCatalogStatus.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // validate the required field `data` + JsonApiBodyWithIdOfInt64AndCatalogStatusAndCatalogStatus.validateJsonObject(jsonObj.getAsJsonObject("data")); + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonError.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonWarning.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JsonApiSingleResponseOfCatalogStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JsonApiSingleResponseOfCatalogStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JsonApiSingleResponseOfCatalogStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JsonApiSingleResponseOfCatalogStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public JsonApiSingleResponseOfCatalogStatus read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + JsonApiSingleResponseOfCatalogStatus instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of JsonApiSingleResponseOfCatalogStatus given an JSON string + * + * @param jsonString JSON string + * @return An instance of JsonApiSingleResponseOfCatalogStatus + * @throws IOException if the JSON string is invalid with respect to JsonApiSingleResponseOfCatalogStatus + */ + public static JsonApiSingleResponseOfCatalogStatus fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JsonApiSingleResponseOfCatalogStatus.class); + } + + /** + * Convert an instance of JsonApiSingleResponseOfCatalogStatus to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/NillableString.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/NillableString.java new file mode 100644 index 00000000..bb60e067 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/NillableString.java @@ -0,0 +1,292 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Placeholder object for string value for which \"null\" is a valid business value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NillableString { + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public NillableString() { + } + + public NillableString value(String value) { + + this.value = value; + return this; + } + + /** + * The string's value. If missing or null the string's value is set to \"null\" + * @return value + **/ + @javax.annotation.Nullable + + public String getValue() { + return value; + } + + + public void setValue(String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the NillableString instance itself + */ + public NillableString putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NillableString nillableString = (NillableString) o; + return Objects.equals(this.value, nillableString.value)&& + Objects.equals(this.additionalProperties, nillableString.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(value, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NillableString {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to NillableString + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!NillableString.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in NillableString is not found in the empty JSON string", NillableString.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NillableString.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NillableString' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NillableString.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NillableString value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public NillableString read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + NillableString instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NillableString given an JSON string + * + * @param jsonString JSON string + * @return An instance of NillableString + * @throws IOException if the JSON string is invalid with respect to NillableString + */ + public static NillableString fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NillableString.class); + } + + /** + * Convert an instance of NillableString to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PageOfBalanceHistoryChangeDataCaptureV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PageOfBalanceHistoryChangeDataCaptureV1.java new file mode 100644 index 00000000..d383ad42 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PageOfBalanceHistoryChangeDataCaptureV1.java @@ -0,0 +1,261 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.BalanceHistoryChangeDataCaptureV1; +import com.criteo.api.retailmedia.preview.model.Metadata; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A wrapper class to return a single page of items with metadata. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PageOfBalanceHistoryChangeDataCaptureV1 { + public static final String SERIALIZED_NAME_META = "meta"; + @SerializedName(SERIALIZED_NAME_META) + private Metadata meta; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = new ArrayList<>(); + + public PageOfBalanceHistoryChangeDataCaptureV1() { + } + + public PageOfBalanceHistoryChangeDataCaptureV1 meta(Metadata meta) { + + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nonnull + + public Metadata getMeta() { + return meta; + } + + + public void setMeta(Metadata meta) { + this.meta = meta; + } + + + public PageOfBalanceHistoryChangeDataCaptureV1 data(List data) { + + this.data = data; + return this; + } + + public PageOfBalanceHistoryChangeDataCaptureV1 addDataItem(BalanceHistoryChangeDataCaptureV1 dataItem) { + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nonnull + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PageOfBalanceHistoryChangeDataCaptureV1 pageOfBalanceHistoryChangeDataCaptureV1 = (PageOfBalanceHistoryChangeDataCaptureV1) o; + return Objects.equals(this.meta, pageOfBalanceHistoryChangeDataCaptureV1.meta) && + Objects.equals(this.data, pageOfBalanceHistoryChangeDataCaptureV1.data); + } + + @Override + public int hashCode() { + return Objects.hash(meta, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PageOfBalanceHistoryChangeDataCaptureV1 {\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("meta"); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("meta"); + openapiRequiredFields.add("data"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to PageOfBalanceHistoryChangeDataCaptureV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!PageOfBalanceHistoryChangeDataCaptureV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PageOfBalanceHistoryChangeDataCaptureV1 is not found in the empty JSON string", PageOfBalanceHistoryChangeDataCaptureV1.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!PageOfBalanceHistoryChangeDataCaptureV1.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PageOfBalanceHistoryChangeDataCaptureV1` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PageOfBalanceHistoryChangeDataCaptureV1.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + // validate the required field `meta` + Metadata.validateJsonObject(jsonObj.getAsJsonObject("meta")); + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + // validate the required field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + BalanceHistoryChangeDataCaptureV1.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PageOfBalanceHistoryChangeDataCaptureV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PageOfBalanceHistoryChangeDataCaptureV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PageOfBalanceHistoryChangeDataCaptureV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PageOfBalanceHistoryChangeDataCaptureV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PageOfBalanceHistoryChangeDataCaptureV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PageOfBalanceHistoryChangeDataCaptureV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of PageOfBalanceHistoryChangeDataCaptureV1 + * @throws IOException if the JSON string is invalid with respect to PageOfBalanceHistoryChangeDataCaptureV1 + */ + public static PageOfBalanceHistoryChangeDataCaptureV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PageOfBalanceHistoryChangeDataCaptureV1.class); + } + + /** + * Convert an instance of PageOfBalanceHistoryChangeDataCaptureV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PageOfInsertionOrderHistoryChangeDataCapture.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PageOfInsertionOrderHistoryChangeDataCaptureV2.java similarity index 75% rename from sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PageOfInsertionOrderHistoryChangeDataCapture.java rename to sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PageOfInsertionOrderHistoryChangeDataCaptureV2.java index 7c3cc12d..2b599498 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PageOfInsertionOrderHistoryChangeDataCapture.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PageOfInsertionOrderHistoryChangeDataCaptureV2.java @@ -15,7 +15,7 @@ import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.preview.model.InsertionOrderHistoryChangeDataCapture; +import com.criteo.api.retailmedia.preview.model.InsertionOrderHistoryChangeDataCaptureV2; import com.criteo.api.retailmedia.preview.model.Metadata; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -51,19 +51,19 @@ * A wrapper class to return a single page of items with metadata. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PageOfInsertionOrderHistoryChangeDataCapture { +public class PageOfInsertionOrderHistoryChangeDataCaptureV2 { public static final String SERIALIZED_NAME_META = "meta"; @SerializedName(SERIALIZED_NAME_META) private Metadata meta; public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data = new ArrayList<>(); - public PageOfInsertionOrderHistoryChangeDataCapture() { + public PageOfInsertionOrderHistoryChangeDataCaptureV2() { } - public PageOfInsertionOrderHistoryChangeDataCapture meta(Metadata meta) { + public PageOfInsertionOrderHistoryChangeDataCaptureV2 meta(Metadata meta) { this.meta = meta; return this; @@ -85,13 +85,13 @@ public void setMeta(Metadata meta) { } - public PageOfInsertionOrderHistoryChangeDataCapture data(List data) { + public PageOfInsertionOrderHistoryChangeDataCaptureV2 data(List data) { this.data = data; return this; } - public PageOfInsertionOrderHistoryChangeDataCapture addDataItem(InsertionOrderHistoryChangeDataCapture dataItem) { + public PageOfInsertionOrderHistoryChangeDataCaptureV2 addDataItem(InsertionOrderHistoryChangeDataCaptureV2 dataItem) { this.data.add(dataItem); return this; } @@ -102,12 +102,12 @@ public PageOfInsertionOrderHistoryChangeDataCapture addDataItem(InsertionOrderHi **/ @javax.annotation.Nonnull - public List getData() { + public List getData() { return data; } - public void setData(List data) { + public void setData(List data) { this.data = data; } @@ -121,9 +121,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PageOfInsertionOrderHistoryChangeDataCapture pageOfInsertionOrderHistoryChangeDataCapture = (PageOfInsertionOrderHistoryChangeDataCapture) o; - return Objects.equals(this.meta, pageOfInsertionOrderHistoryChangeDataCapture.meta) && - Objects.equals(this.data, pageOfInsertionOrderHistoryChangeDataCapture.data); + PageOfInsertionOrderHistoryChangeDataCaptureV2 pageOfInsertionOrderHistoryChangeDataCaptureV2 = (PageOfInsertionOrderHistoryChangeDataCaptureV2) o; + return Objects.equals(this.meta, pageOfInsertionOrderHistoryChangeDataCaptureV2.meta) && + Objects.equals(this.data, pageOfInsertionOrderHistoryChangeDataCaptureV2.data); } @Override @@ -134,7 +134,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PageOfInsertionOrderHistoryChangeDataCapture {\n"); + sb.append("class PageOfInsertionOrderHistoryChangeDataCaptureV2 {\n"); sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); @@ -172,25 +172,25 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to PageOfInsertionOrderHistoryChangeDataCapture + * @throws IOException if the JSON Object is invalid with respect to PageOfInsertionOrderHistoryChangeDataCaptureV2 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!PageOfInsertionOrderHistoryChangeDataCapture.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PageOfInsertionOrderHistoryChangeDataCapture is not found in the empty JSON string", PageOfInsertionOrderHistoryChangeDataCapture.openapiRequiredFields.toString())); + if (!PageOfInsertionOrderHistoryChangeDataCaptureV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PageOfInsertionOrderHistoryChangeDataCaptureV2 is not found in the empty JSON string", PageOfInsertionOrderHistoryChangeDataCaptureV2.openapiRequiredFields.toString())); } } Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { - if (!PageOfInsertionOrderHistoryChangeDataCapture.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PageOfInsertionOrderHistoryChangeDataCapture` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + if (!PageOfInsertionOrderHistoryChangeDataCaptureV2.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PageOfInsertionOrderHistoryChangeDataCaptureV2` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : PageOfInsertionOrderHistoryChangeDataCapture.openapiRequiredFields) { + for (String requiredField : PageOfInsertionOrderHistoryChangeDataCaptureV2.openapiRequiredFields) { if (jsonObj.get(requiredField) == null) { throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); } @@ -205,7 +205,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); // validate the required field `data` (array) for (int i = 0; i < jsonArraydata.size(); i++) { - InsertionOrderHistoryChangeDataCapture.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + InsertionOrderHistoryChangeDataCaptureV2.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); }; } @@ -213,22 +213,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!PageOfInsertionOrderHistoryChangeDataCapture.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'PageOfInsertionOrderHistoryChangeDataCapture' and its subtypes + if (!PageOfInsertionOrderHistoryChangeDataCaptureV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PageOfInsertionOrderHistoryChangeDataCaptureV2' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(PageOfInsertionOrderHistoryChangeDataCapture.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PageOfInsertionOrderHistoryChangeDataCaptureV2.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, PageOfInsertionOrderHistoryChangeDataCapture value) throws IOException { + public void write(JsonWriter out, PageOfInsertionOrderHistoryChangeDataCaptureV2 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public PageOfInsertionOrderHistoryChangeDataCapture read(JsonReader in) throws IOException { + public PageOfInsertionOrderHistoryChangeDataCaptureV2 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); return thisAdapter.fromJsonTree(jsonObj); @@ -239,18 +239,18 @@ public PageOfInsertionOrderHistoryChangeDataCapture read(JsonReader in) throws I } /** - * Create an instance of PageOfInsertionOrderHistoryChangeDataCapture given an JSON string + * Create an instance of PageOfInsertionOrderHistoryChangeDataCaptureV2 given an JSON string * * @param jsonString JSON string - * @return An instance of PageOfInsertionOrderHistoryChangeDataCapture - * @throws IOException if the JSON string is invalid with respect to PageOfInsertionOrderHistoryChangeDataCapture + * @return An instance of PageOfInsertionOrderHistoryChangeDataCaptureV2 + * @throws IOException if the JSON string is invalid with respect to PageOfInsertionOrderHistoryChangeDataCaptureV2 */ - public static PageOfInsertionOrderHistoryChangeDataCapture fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, PageOfInsertionOrderHistoryChangeDataCapture.class); + public static PageOfInsertionOrderHistoryChangeDataCaptureV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PageOfInsertionOrderHistoryChangeDataCaptureV2.class); } /** - * Convert an instance of PageOfInsertionOrderHistoryChangeDataCapture to an JSON string + * Convert an instance of PageOfInsertionOrderHistoryChangeDataCaptureV2 to an JSON string * * @return JSON string */ diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PagedResourceCollectionOutcomeOfBalanceResponseV2.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PagedResourceCollectionOutcomeOfBalanceResponseV2.java new file mode 100644 index 00000000..fa587869 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/PagedResourceCollectionOutcomeOfBalanceResponseV2.java @@ -0,0 +1,415 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.CommonProblem; +import com.criteo.api.retailmedia.preview.model.PageMetadata; +import com.criteo.api.retailmedia.preview.model.ResourceOfBalanceResponseV2; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Data model for a paged list of response resources + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PagedResourceCollectionOutcomeOfBalanceResponseV2 { + public static final String SERIALIZED_NAME_METADATA = "metadata"; + @SerializedName(SERIALIZED_NAME_METADATA) + private PageMetadata metadata; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public PagedResourceCollectionOutcomeOfBalanceResponseV2() { + } + + + public PagedResourceCollectionOutcomeOfBalanceResponseV2( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public PagedResourceCollectionOutcomeOfBalanceResponseV2 metadata(PageMetadata metadata) { + + this.metadata = metadata; + return this; + } + + /** + * Get metadata + * @return metadata + **/ + @javax.annotation.Nullable + + public PageMetadata getMetadata() { + return metadata; + } + + + public void setMetadata(PageMetadata metadata) { + this.metadata = metadata; + } + + + public PagedResourceCollectionOutcomeOfBalanceResponseV2 data(List data) { + + this.data = data; + return this; + } + + public PagedResourceCollectionOutcomeOfBalanceResponseV2 addDataItem(ResourceOfBalanceResponseV2 dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PagedResourceCollectionOutcomeOfBalanceResponseV2 instance itself + */ + public PagedResourceCollectionOutcomeOfBalanceResponseV2 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PagedResourceCollectionOutcomeOfBalanceResponseV2 pagedResourceCollectionOutcomeOfBalanceResponseV2 = (PagedResourceCollectionOutcomeOfBalanceResponseV2) o; + return Objects.equals(this.metadata, pagedResourceCollectionOutcomeOfBalanceResponseV2.metadata) && + Objects.equals(this.data, pagedResourceCollectionOutcomeOfBalanceResponseV2.data) && + Objects.equals(this.warnings, pagedResourceCollectionOutcomeOfBalanceResponseV2.warnings) && + Objects.equals(this.errors, pagedResourceCollectionOutcomeOfBalanceResponseV2.errors)&& + Objects.equals(this.additionalProperties, pagedResourceCollectionOutcomeOfBalanceResponseV2.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, data, warnings, errors, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PagedResourceCollectionOutcomeOfBalanceResponseV2 {\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("metadata"); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to PagedResourceCollectionOutcomeOfBalanceResponseV2 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!PagedResourceCollectionOutcomeOfBalanceResponseV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PagedResourceCollectionOutcomeOfBalanceResponseV2 is not found in the empty JSON string", PagedResourceCollectionOutcomeOfBalanceResponseV2.openapiRequiredFields.toString())); + } + } + // validate the optional field `metadata` + if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) { + PageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + ResourceOfBalanceResponseV2.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PagedResourceCollectionOutcomeOfBalanceResponseV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PagedResourceCollectionOutcomeOfBalanceResponseV2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PagedResourceCollectionOutcomeOfBalanceResponseV2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PagedResourceCollectionOutcomeOfBalanceResponseV2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PagedResourceCollectionOutcomeOfBalanceResponseV2 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + PagedResourceCollectionOutcomeOfBalanceResponseV2 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PagedResourceCollectionOutcomeOfBalanceResponseV2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of PagedResourceCollectionOutcomeOfBalanceResponseV2 + * @throws IOException if the JSON string is invalid with respect to PagedResourceCollectionOutcomeOfBalanceResponseV2 + */ + public static PagedResourceCollectionOutcomeOfBalanceResponseV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PagedResourceCollectionOutcomeOfBalanceResponseV2.class); + } + + /** + * Convert an instance of PagedResourceCollectionOutcomeOfBalanceResponseV2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfAddFundsToBalanceV2.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfAddFundsToBalanceV2.java new file mode 100644 index 00000000..29919e8a --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfAddFundsToBalanceV2.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.AddFundsToBalanceV2; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResourceOfAddFundsToBalanceV2 { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private AddFundsToBalanceV2 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public ResourceOfAddFundsToBalanceV2() { + } + + public ResourceOfAddFundsToBalanceV2 attributes(AddFundsToBalanceV2 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public AddFundsToBalanceV2 getAttributes() { + return attributes; + } + + + public void setAttributes(AddFundsToBalanceV2 attributes) { + this.attributes = attributes; + } + + + public ResourceOfAddFundsToBalanceV2 id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public ResourceOfAddFundsToBalanceV2 type(String type) { + + this.type = type; + return this; + } + + /** + * Canonical type name of the entity + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResourceOfAddFundsToBalanceV2 instance itself + */ + public ResourceOfAddFundsToBalanceV2 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceOfAddFundsToBalanceV2 resourceOfAddFundsToBalanceV2 = (ResourceOfAddFundsToBalanceV2) o; + return Objects.equals(this.attributes, resourceOfAddFundsToBalanceV2.attributes) && + Objects.equals(this.id, resourceOfAddFundsToBalanceV2.id) && + Objects.equals(this.type, resourceOfAddFundsToBalanceV2.type)&& + Objects.equals(this.additionalProperties, resourceOfAddFundsToBalanceV2.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceOfAddFundsToBalanceV2 {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ResourceOfAddFundsToBalanceV2 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ResourceOfAddFundsToBalanceV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceOfAddFundsToBalanceV2 is not found in the empty JSON string", ResourceOfAddFundsToBalanceV2.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + AddFundsToBalanceV2.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResourceOfAddFundsToBalanceV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceOfAddFundsToBalanceV2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceOfAddFundsToBalanceV2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResourceOfAddFundsToBalanceV2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResourceOfAddFundsToBalanceV2 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ResourceOfAddFundsToBalanceV2 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResourceOfAddFundsToBalanceV2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResourceOfAddFundsToBalanceV2 + * @throws IOException if the JSON string is invalid with respect to ResourceOfAddFundsToBalanceV2 + */ + public static ResourceOfAddFundsToBalanceV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceOfAddFundsToBalanceV2.class); + } + + /** + * Convert an instance of ResourceOfAddFundsToBalanceV2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfBalance202110.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfBalanceResponseV2.java similarity index 80% rename from sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfBalance202110.java rename to sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfBalanceResponseV2.java index 66ef9e75..1cff6c27 100644 --- a/sdks/retailmedia_2023-04/src/main/java/com/criteo/api/retailmedia/v2023_04/model/ResourceOfBalance202110.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfBalanceResponseV2.java @@ -2,7 +2,7 @@ * Criteo API * Criteo API - RetailMedia * - * The version of the OpenAPI document: 2023-04 + * The version of the OpenAPI document: Preview * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -11,11 +11,11 @@ */ -package com.criteo.api.retailmedia.v2023_04.model; +package com.criteo.api.retailmedia.preview.model; import java.util.Objects; import java.util.Arrays; -import com.criteo.api.retailmedia.v2023_04.model.ExternalBalance202110; +import com.criteo.api.retailmedia.preview.model.BalanceResponseV2; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +43,17 @@ import java.util.Map.Entry; import java.util.Set; -import com.criteo.api.retailmedia.v2023_04.JSON; +import com.criteo.api.retailmedia.preview.JSON; /** - * A class that represents an entity in a guild compliant way + * A class that represents a domain entity exposed by an API */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ResourceOfBalance202110 { +public class ResourceOfBalanceResponseV2 { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private BalanceResponseV2 attributes; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) private String id; @@ -58,14 +62,32 @@ public class ResourceOfBalance202110 { @SerializedName(SERIALIZED_NAME_TYPE) private String type; - public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; - @SerializedName(SERIALIZED_NAME_ATTRIBUTES) - private ExternalBalance202110 attributes; + public ResourceOfBalanceResponseV2() { + } + + public ResourceOfBalanceResponseV2 attributes(BalanceResponseV2 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable - public ResourceOfBalance202110() { + public BalanceResponseV2 getAttributes() { + return attributes; } - public ResourceOfBalance202110 id(String id) { + + public void setAttributes(BalanceResponseV2 attributes) { + this.attributes = attributes; + } + + + public ResourceOfBalanceResponseV2 id(String id) { this.id = id; return this; @@ -87,7 +109,7 @@ public void setId(String id) { } - public ResourceOfBalance202110 type(String type) { + public ResourceOfBalanceResponseV2 type(String type) { this.type = type; return this; @@ -108,28 +130,6 @@ public void setType(String type) { this.type = type; } - - public ResourceOfBalance202110 attributes(ExternalBalance202110 attributes) { - - this.attributes = attributes; - return this; - } - - /** - * Get attributes - * @return attributes - **/ - @javax.annotation.Nullable - - public ExternalBalance202110 getAttributes() { - return attributes; - } - - - public void setAttributes(ExternalBalance202110 attributes) { - this.attributes = attributes; - } - /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -143,9 +143,9 @@ public void setAttributes(ExternalBalance202110 attributes) { * * @param key name of the property * @param value value of the property - * @return the ResourceOfBalance202110 instance itself + * @return the ResourceOfBalanceResponseV2 instance itself */ - public ResourceOfBalance202110 putAdditionalProperty(String key, Object value) { + public ResourceOfBalanceResponseV2 putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -184,11 +184,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ResourceOfBalance202110 resourceOfBalance202110 = (ResourceOfBalance202110) o; - return Objects.equals(this.id, resourceOfBalance202110.id) && - Objects.equals(this.type, resourceOfBalance202110.type) && - Objects.equals(this.attributes, resourceOfBalance202110.attributes)&& - Objects.equals(this.additionalProperties, resourceOfBalance202110.additionalProperties); + ResourceOfBalanceResponseV2 resourceOfBalanceResponseV2 = (ResourceOfBalanceResponseV2) o; + return Objects.equals(this.attributes, resourceOfBalanceResponseV2.attributes) && + Objects.equals(this.id, resourceOfBalanceResponseV2.id) && + Objects.equals(this.type, resourceOfBalanceResponseV2.type)&& + Objects.equals(this.additionalProperties, resourceOfBalanceResponseV2.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -197,7 +197,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, type, attributes, additionalProperties); + return Objects.hash(attributes, id, type, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -210,10 +210,10 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ResourceOfBalance202110 {\n"); + sb.append("class ResourceOfBalanceResponseV2 {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -237,9 +237,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("attributes"); openapiFields.add("id"); openapiFields.add("type"); - openapiFields.add("attributes"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -249,40 +249,40 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ResourceOfBalance202110 + * @throws IOException if the JSON Object is invalid with respect to ResourceOfBalanceResponseV2 */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!ResourceOfBalance202110.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceOfBalance202110 is not found in the empty JSON string", ResourceOfBalance202110.openapiRequiredFields.toString())); + if (!ResourceOfBalanceResponseV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceOfBalanceResponseV2 is not found in the empty JSON string", ResourceOfBalanceResponseV2.openapiRequiredFields.toString())); } } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + BalanceResponseV2.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - // validate the optional field `attributes` - if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { - ExternalBalance202110.validateJsonObject(jsonObj.getAsJsonObject("attributes")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!ResourceOfBalance202110.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ResourceOfBalance202110' and its subtypes + if (!ResourceOfBalanceResponseV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceOfBalanceResponseV2' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ResourceOfBalance202110.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceOfBalanceResponseV2.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, ResourceOfBalance202110 value) throws IOException { + public void write(JsonWriter out, ResourceOfBalanceResponseV2 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -305,11 +305,11 @@ else if (entry.getValue() instanceof Character) } @Override - public ResourceOfBalance202110 read(JsonReader in) throws IOException { + public ResourceOfBalanceResponseV2 read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); // store additional fields in the deserialized instance - ResourceOfBalance202110 instance = thisAdapter.fromJsonTree(jsonObj); + ResourceOfBalanceResponseV2 instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -336,18 +336,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of ResourceOfBalance202110 given an JSON string + * Create an instance of ResourceOfBalanceResponseV2 given an JSON string * * @param jsonString JSON string - * @return An instance of ResourceOfBalance202110 - * @throws IOException if the JSON string is invalid with respect to ResourceOfBalance202110 + * @return An instance of ResourceOfBalanceResponseV2 + * @throws IOException if the JSON string is invalid with respect to ResourceOfBalanceResponseV2 */ - public static ResourceOfBalance202110 fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ResourceOfBalance202110.class); + public static ResourceOfBalanceResponseV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceOfBalanceResponseV2.class); } /** - * Convert an instance of ResourceOfBalance202110 to an JSON string + * Convert an instance of ResourceOfBalanceResponseV2 to an JSON string * * @return JSON string */ diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfChangeDatesOfBalanceV2.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfChangeDatesOfBalanceV2.java new file mode 100644 index 00000000..535d444e --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfChangeDatesOfBalanceV2.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.ChangeDatesOfBalanceV2; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResourceOfChangeDatesOfBalanceV2 { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private ChangeDatesOfBalanceV2 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public ResourceOfChangeDatesOfBalanceV2() { + } + + public ResourceOfChangeDatesOfBalanceV2 attributes(ChangeDatesOfBalanceV2 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public ChangeDatesOfBalanceV2 getAttributes() { + return attributes; + } + + + public void setAttributes(ChangeDatesOfBalanceV2 attributes) { + this.attributes = attributes; + } + + + public ResourceOfChangeDatesOfBalanceV2 id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public ResourceOfChangeDatesOfBalanceV2 type(String type) { + + this.type = type; + return this; + } + + /** + * Canonical type name of the entity + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResourceOfChangeDatesOfBalanceV2 instance itself + */ + public ResourceOfChangeDatesOfBalanceV2 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceOfChangeDatesOfBalanceV2 resourceOfChangeDatesOfBalanceV2 = (ResourceOfChangeDatesOfBalanceV2) o; + return Objects.equals(this.attributes, resourceOfChangeDatesOfBalanceV2.attributes) && + Objects.equals(this.id, resourceOfChangeDatesOfBalanceV2.id) && + Objects.equals(this.type, resourceOfChangeDatesOfBalanceV2.type)&& + Objects.equals(this.additionalProperties, resourceOfChangeDatesOfBalanceV2.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceOfChangeDatesOfBalanceV2 {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ResourceOfChangeDatesOfBalanceV2 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ResourceOfChangeDatesOfBalanceV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceOfChangeDatesOfBalanceV2 is not found in the empty JSON string", ResourceOfChangeDatesOfBalanceV2.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + ChangeDatesOfBalanceV2.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResourceOfChangeDatesOfBalanceV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceOfChangeDatesOfBalanceV2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceOfChangeDatesOfBalanceV2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResourceOfChangeDatesOfBalanceV2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResourceOfChangeDatesOfBalanceV2 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ResourceOfChangeDatesOfBalanceV2 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResourceOfChangeDatesOfBalanceV2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResourceOfChangeDatesOfBalanceV2 + * @throws IOException if the JSON string is invalid with respect to ResourceOfChangeDatesOfBalanceV2 + */ + public static ResourceOfChangeDatesOfBalanceV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceOfChangeDatesOfBalanceV2.class); + } + + /** + * Convert an instance of ResourceOfChangeDatesOfBalanceV2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfCreateBalanceV2.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfCreateBalanceV2.java new file mode 100644 index 00000000..67bbacba --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfCreateBalanceV2.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.CreateBalanceV2; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResourceOfCreateBalanceV2 { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private CreateBalanceV2 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public ResourceOfCreateBalanceV2() { + } + + public ResourceOfCreateBalanceV2 attributes(CreateBalanceV2 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public CreateBalanceV2 getAttributes() { + return attributes; + } + + + public void setAttributes(CreateBalanceV2 attributes) { + this.attributes = attributes; + } + + + public ResourceOfCreateBalanceV2 id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public ResourceOfCreateBalanceV2 type(String type) { + + this.type = type; + return this; + } + + /** + * Canonical type name of the entity + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResourceOfCreateBalanceV2 instance itself + */ + public ResourceOfCreateBalanceV2 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceOfCreateBalanceV2 resourceOfCreateBalanceV2 = (ResourceOfCreateBalanceV2) o; + return Objects.equals(this.attributes, resourceOfCreateBalanceV2.attributes) && + Objects.equals(this.id, resourceOfCreateBalanceV2.id) && + Objects.equals(this.type, resourceOfCreateBalanceV2.type)&& + Objects.equals(this.additionalProperties, resourceOfCreateBalanceV2.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceOfCreateBalanceV2 {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ResourceOfCreateBalanceV2 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ResourceOfCreateBalanceV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceOfCreateBalanceV2 is not found in the empty JSON string", ResourceOfCreateBalanceV2.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + CreateBalanceV2.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResourceOfCreateBalanceV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceOfCreateBalanceV2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceOfCreateBalanceV2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResourceOfCreateBalanceV2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResourceOfCreateBalanceV2 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ResourceOfCreateBalanceV2 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResourceOfCreateBalanceV2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResourceOfCreateBalanceV2 + * @throws IOException if the JSON string is invalid with respect to ResourceOfCreateBalanceV2 + */ + public static ResourceOfCreateBalanceV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceOfCreateBalanceV2.class); + } + + /** + * Convert an instance of ResourceOfCreateBalanceV2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfUpdateBalanceModelV2.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfUpdateBalanceModelV2.java new file mode 100644 index 00000000..e9f7e53d --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/ResourceOfUpdateBalanceModelV2.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.UpdateBalanceModelV2; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResourceOfUpdateBalanceModelV2 { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private UpdateBalanceModelV2 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public ResourceOfUpdateBalanceModelV2() { + } + + public ResourceOfUpdateBalanceModelV2 attributes(UpdateBalanceModelV2 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public UpdateBalanceModelV2 getAttributes() { + return attributes; + } + + + public void setAttributes(UpdateBalanceModelV2 attributes) { + this.attributes = attributes; + } + + + public ResourceOfUpdateBalanceModelV2 id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public ResourceOfUpdateBalanceModelV2 type(String type) { + + this.type = type; + return this; + } + + /** + * Canonical type name of the entity + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ResourceOfUpdateBalanceModelV2 instance itself + */ + public ResourceOfUpdateBalanceModelV2 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceOfUpdateBalanceModelV2 resourceOfUpdateBalanceModelV2 = (ResourceOfUpdateBalanceModelV2) o; + return Objects.equals(this.attributes, resourceOfUpdateBalanceModelV2.attributes) && + Objects.equals(this.id, resourceOfUpdateBalanceModelV2.id) && + Objects.equals(this.type, resourceOfUpdateBalanceModelV2.type)&& + Objects.equals(this.additionalProperties, resourceOfUpdateBalanceModelV2.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceOfUpdateBalanceModelV2 {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to ResourceOfUpdateBalanceModelV2 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ResourceOfUpdateBalanceModelV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResourceOfUpdateBalanceModelV2 is not found in the empty JSON string", ResourceOfUpdateBalanceModelV2.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + UpdateBalanceModelV2.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ResourceOfUpdateBalanceModelV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResourceOfUpdateBalanceModelV2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResourceOfUpdateBalanceModelV2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResourceOfUpdateBalanceModelV2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ResourceOfUpdateBalanceModelV2 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + ResourceOfUpdateBalanceModelV2 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResourceOfUpdateBalanceModelV2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResourceOfUpdateBalanceModelV2 + * @throws IOException if the JSON string is invalid with respect to ResourceOfUpdateBalanceModelV2 + */ + public static ResourceOfUpdateBalanceModelV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResourceOfUpdateBalanceModelV2.class); + } + + /** + * Convert an instance of ResourceOfUpdateBalanceModelV2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaContactlistAmendmentAttributes.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaContactlistAmendmentAttributes.java index 218afb43..a5ef7350 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaContactlistAmendmentAttributes.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RetailMediaContactlistAmendmentAttributes.java @@ -107,17 +107,17 @@ public OperationEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(IdentifierTypeEnum.Adapter.class) public enum IdentifierTypeEnum { - EMAIL("email"), + EMAIL("Email"), - MADID("madid"), + USERIDENTIFIER("UserIdentifier"), - IDENTITYLINK("identityLink"), + IDENTITYLINK("IdentityLink"), - GUM("gum"), + GUM("Gum"), - CUSTOMERID("customerid"), + CUSTOMERID("CustomerId"), - PHONENUMBER("phoneNumber"); + PHONENUMBER("PhoneNumber"); private String value; diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkCreateInputV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkCreateInputV1.java new file mode 100644 index 00000000..ee7e6b59 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkCreateInputV1.java @@ -0,0 +1,314 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentCreateEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Input to create one or more audience segments. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentBulkCreateInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public RmAudienceSegmentBulkCreateInputV1() { + } + + public RmAudienceSegmentBulkCreateInputV1 data(List data) { + + this.data = data; + return this; + } + + public RmAudienceSegmentBulkCreateInputV1 addDataItem(RmAudienceSegmentCreateEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentBulkCreateInputV1 instance itself + */ + public RmAudienceSegmentBulkCreateInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentBulkCreateInputV1 rmAudienceSegmentBulkCreateInputV1 = (RmAudienceSegmentBulkCreateInputV1) o; + return Objects.equals(this.data, rmAudienceSegmentBulkCreateInputV1.data)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentBulkCreateInputV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentBulkCreateInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentBulkCreateInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentBulkCreateInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentBulkCreateInputV1 is not found in the empty JSON string", RmAudienceSegmentBulkCreateInputV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + RmAudienceSegmentCreateEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentBulkCreateInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentBulkCreateInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentBulkCreateInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentBulkCreateInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentBulkCreateInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentBulkCreateInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentBulkCreateInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentBulkCreateInputV1 + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentBulkCreateInputV1 + */ + public static RmAudienceSegmentBulkCreateInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentBulkCreateInputV1.class); + } + + /** + * Convert an instance of RmAudienceSegmentBulkCreateInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkDeleteInputV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkDeleteInputV1.java new file mode 100644 index 00000000..7b1051bd --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkDeleteInputV1.java @@ -0,0 +1,314 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentDeleteEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Input to delete one or more segments. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentBulkDeleteInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public RmAudienceSegmentBulkDeleteInputV1() { + } + + public RmAudienceSegmentBulkDeleteInputV1 data(List data) { + + this.data = data; + return this; + } + + public RmAudienceSegmentBulkDeleteInputV1 addDataItem(RmAudienceSegmentDeleteEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentBulkDeleteInputV1 instance itself + */ + public RmAudienceSegmentBulkDeleteInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentBulkDeleteInputV1 rmAudienceSegmentBulkDeleteInputV1 = (RmAudienceSegmentBulkDeleteInputV1) o; + return Objects.equals(this.data, rmAudienceSegmentBulkDeleteInputV1.data)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentBulkDeleteInputV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentBulkDeleteInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentBulkDeleteInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentBulkDeleteInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentBulkDeleteInputV1 is not found in the empty JSON string", RmAudienceSegmentBulkDeleteInputV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + RmAudienceSegmentDeleteEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentBulkDeleteInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentBulkDeleteInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentBulkDeleteInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentBulkDeleteInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentBulkDeleteInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentBulkDeleteInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentBulkDeleteInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentBulkDeleteInputV1 + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentBulkDeleteInputV1 + */ + public static RmAudienceSegmentBulkDeleteInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentBulkDeleteInputV1.class); + } + + /** + * Convert an instance of RmAudienceSegmentBulkDeleteInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkUpdateInputV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkUpdateInputV1.java new file mode 100644 index 00000000..8f26e0d4 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentBulkUpdateInputV1.java @@ -0,0 +1,314 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentUpdateEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Input to update one or more segments. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentBulkUpdateInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public RmAudienceSegmentBulkUpdateInputV1() { + } + + public RmAudienceSegmentBulkUpdateInputV1 data(List data) { + + this.data = data; + return this; + } + + public RmAudienceSegmentBulkUpdateInputV1 addDataItem(RmAudienceSegmentUpdateEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentBulkUpdateInputV1 instance itself + */ + public RmAudienceSegmentBulkUpdateInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentBulkUpdateInputV1 rmAudienceSegmentBulkUpdateInputV1 = (RmAudienceSegmentBulkUpdateInputV1) o; + return Objects.equals(this.data, rmAudienceSegmentBulkUpdateInputV1.data)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentBulkUpdateInputV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentBulkUpdateInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentBulkUpdateInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentBulkUpdateInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentBulkUpdateInputV1 is not found in the empty JSON string", RmAudienceSegmentBulkUpdateInputV1.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + RmAudienceSegmentUpdateEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentBulkUpdateInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentBulkUpdateInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentBulkUpdateInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentBulkUpdateInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentBulkUpdateInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentBulkUpdateInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentBulkUpdateInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentBulkUpdateInputV1 + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentBulkUpdateInputV1 + */ + public static RmAudienceSegmentBulkUpdateInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentBulkUpdateInputV1.class); + } + + /** + * Convert an instance of RmAudienceSegmentBulkUpdateInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentCreateEntityV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentCreateEntityV1.java new file mode 100644 index 00000000..2f811bee --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentCreateEntityV1.java @@ -0,0 +1,390 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.RmContactListCreateV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Set of rules that defines specific people to target. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentCreateEntityV1 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_RETAILER_ID = "retailerId"; + @SerializedName(SERIALIZED_NAME_RETAILER_ID) + private String retailerId; + + public static final String SERIALIZED_NAME_CONTACT_LIST = "contactList"; + @SerializedName(SERIALIZED_NAME_CONTACT_LIST) + private RmContactListCreateV1 contactList; + + public RmAudienceSegmentCreateEntityV1() { + } + + public RmAudienceSegmentCreateEntityV1 name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the segment + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public RmAudienceSegmentCreateEntityV1 description(String description) { + + this.description = description; + return this; + } + + /** + * Description of the segment + * @return description + **/ + @javax.annotation.Nullable + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public RmAudienceSegmentCreateEntityV1 retailerId(String retailerId) { + + this.retailerId = retailerId; + return this; + } + + /** + * Retailer associated to the segment + * @return retailerId + **/ + @javax.annotation.Nullable + + public String getRetailerId() { + return retailerId; + } + + + public void setRetailerId(String retailerId) { + this.retailerId = retailerId; + } + + + public RmAudienceSegmentCreateEntityV1 contactList(RmContactListCreateV1 contactList) { + + this.contactList = contactList; + return this; + } + + /** + * Get contactList + * @return contactList + **/ + @javax.annotation.Nullable + + public RmContactListCreateV1 getContactList() { + return contactList; + } + + + public void setContactList(RmContactListCreateV1 contactList) { + this.contactList = contactList; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentCreateEntityV1 instance itself + */ + public RmAudienceSegmentCreateEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentCreateEntityV1 rmAudienceSegmentCreateEntityV1 = (RmAudienceSegmentCreateEntityV1) o; + return Objects.equals(this.name, rmAudienceSegmentCreateEntityV1.name) && + Objects.equals(this.description, rmAudienceSegmentCreateEntityV1.description) && + Objects.equals(this.retailerId, rmAudienceSegmentCreateEntityV1.retailerId) && + Objects.equals(this.contactList, rmAudienceSegmentCreateEntityV1.contactList)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentCreateEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, retailerId, contactList, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentCreateEntityV1 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" retailerId: ").append(toIndentedString(retailerId)).append("\n"); + sb.append(" contactList: ").append(toIndentedString(contactList)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("retailerId"); + openapiFields.add("contactList"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentCreateEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentCreateEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentCreateEntityV1 is not found in the empty JSON string", RmAudienceSegmentCreateEntityV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("retailerId") != null && !jsonObj.get("retailerId").isJsonNull()) && !jsonObj.get("retailerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `retailerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("retailerId").toString())); + } + // validate the optional field `contactList` + if (jsonObj.get("contactList") != null && !jsonObj.get("contactList").isJsonNull()) { + RmContactListCreateV1.validateJsonObject(jsonObj.getAsJsonObject("contactList")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentCreateEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentCreateEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentCreateEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentCreateEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentCreateEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentCreateEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentCreateEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentCreateEntityV1 + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentCreateEntityV1 + */ + public static RmAudienceSegmentCreateEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentCreateEntityV1.class); + } + + /** + * Convert an instance of RmAudienceSegmentCreateEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentCreateEntityV1Resource.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentCreateEntityV1Resource.java new file mode 100644 index 00000000..a9670bc2 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentCreateEntityV1Resource.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentCreateEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentCreateEntityV1Resource { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private RmAudienceSegmentCreateEntityV1 attributes; + + public RmAudienceSegmentCreateEntityV1Resource() { + } + + public RmAudienceSegmentCreateEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public RmAudienceSegmentCreateEntityV1Resource attributes(RmAudienceSegmentCreateEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public RmAudienceSegmentCreateEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(RmAudienceSegmentCreateEntityV1 attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentCreateEntityV1Resource instance itself + */ + public RmAudienceSegmentCreateEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentCreateEntityV1Resource rmAudienceSegmentCreateEntityV1Resource = (RmAudienceSegmentCreateEntityV1Resource) o; + return Objects.equals(this.type, rmAudienceSegmentCreateEntityV1Resource.type) && + Objects.equals(this.attributes, rmAudienceSegmentCreateEntityV1Resource.attributes)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentCreateEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentCreateEntityV1Resource {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentCreateEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentCreateEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentCreateEntityV1Resource is not found in the empty JSON string", RmAudienceSegmentCreateEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + RmAudienceSegmentCreateEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentCreateEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentCreateEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentCreateEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentCreateEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentCreateEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentCreateEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentCreateEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentCreateEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentCreateEntityV1Resource + */ + public static RmAudienceSegmentCreateEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentCreateEntityV1Resource.class); + } + + /** + * Convert an instance of RmAudienceSegmentCreateEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentDeleteEntityV1Resource.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentDeleteEntityV1Resource.java new file mode 100644 index 00000000..154025d7 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentDeleteEntityV1Resource.java @@ -0,0 +1,353 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentDeleteEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private Object attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public RmAudienceSegmentDeleteEntityV1Resource() { + } + + public RmAudienceSegmentDeleteEntityV1Resource attributes(Object attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Segment to delete + * @return attributes + **/ + @javax.annotation.Nullable + + public Object getAttributes() { + return attributes; + } + + + public void setAttributes(Object attributes) { + this.attributes = attributes; + } + + + public RmAudienceSegmentDeleteEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public RmAudienceSegmentDeleteEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentDeleteEntityV1Resource instance itself + */ + public RmAudienceSegmentDeleteEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentDeleteEntityV1Resource rmAudienceSegmentDeleteEntityV1Resource = (RmAudienceSegmentDeleteEntityV1Resource) o; + return Objects.equals(this.attributes, rmAudienceSegmentDeleteEntityV1Resource.attributes) && + Objects.equals(this.id, rmAudienceSegmentDeleteEntityV1Resource.id) && + Objects.equals(this.type, rmAudienceSegmentDeleteEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentDeleteEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentDeleteEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentDeleteEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentDeleteEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentDeleteEntityV1Resource is not found in the empty JSON string", RmAudienceSegmentDeleteEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentDeleteEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentDeleteEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentDeleteEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentDeleteEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentDeleteEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentDeleteEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentDeleteEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentDeleteEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentDeleteEntityV1Resource + */ + public static RmAudienceSegmentDeleteEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentDeleteEntityV1Resource.class); + } + + /** + * Convert an instance of RmAudienceSegmentDeleteEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1.java new file mode 100644 index 00000000..4b5f9707 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1.java @@ -0,0 +1,652 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.RmContactListV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Set of rules that defines specific people to target. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentEntityV1 { + public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) + private String accountId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_RETAILER_ID = "retailerId"; + @SerializedName(SERIALIZED_NAME_RETAILER_ID) + private String retailerId; + + /** + * Type of segment (read-only) + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + UNKNOWN("Unknown"), + + CONTACTLIST("ContactList"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; + + public static final String SERIALIZED_NAME_CONTACT_LIST = "contactList"; + @SerializedName(SERIALIZED_NAME_CONTACT_LIST) + private RmContactListV1 contactList; + + /** + * Gets or Sets channels + */ + @JsonAdapter(ChannelsEnum.Adapter.class) + public enum ChannelsEnum { + UNKNOWN("Unknown"), + + ONSITE("Onsite"), + + OFFSITE("Offsite"); + + private String value; + + ChannelsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ChannelsEnum fromValue(String value) { + for (ChannelsEnum b : ChannelsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ChannelsEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ChannelsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ChannelsEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_CHANNELS = "channels"; + @SerializedName(SERIALIZED_NAME_CHANNELS) + private List channels = null; + + public RmAudienceSegmentEntityV1() { + } + + public RmAudienceSegmentEntityV1 accountId(String accountId) { + + this.accountId = accountId; + return this; + } + + /** + * Account associated to the segment + * @return accountId + **/ + @javax.annotation.Nullable + + public String getAccountId() { + return accountId; + } + + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + + public RmAudienceSegmentEntityV1 name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the segment + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public RmAudienceSegmentEntityV1 description(String description) { + + this.description = description; + return this; + } + + /** + * Description of the segment + * @return description + **/ + @javax.annotation.Nullable + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public RmAudienceSegmentEntityV1 retailerId(String retailerId) { + + this.retailerId = retailerId; + return this; + } + + /** + * Retailer associated to the segment + * @return retailerId + **/ + @javax.annotation.Nullable + + public String getRetailerId() { + return retailerId; + } + + + public void setRetailerId(String retailerId) { + this.retailerId = retailerId; + } + + + public RmAudienceSegmentEntityV1 type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Type of segment (read-only) + * @return type + **/ + @javax.annotation.Nullable + + public TypeEnum getType() { + return type; + } + + + public void setType(TypeEnum type) { + this.type = type; + } + + + public RmAudienceSegmentEntityV1 createdAt(OffsetDateTime createdAt) { + + this.createdAt = createdAt; + return this; + } + + /** + * ISO-8601 timestamp in UTC of segment creation (read-only) + * @return createdAt + **/ + @javax.annotation.Nullable + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public RmAudienceSegmentEntityV1 updatedAt(OffsetDateTime updatedAt) { + + this.updatedAt = updatedAt; + return this; + } + + /** + * ISO-8601 timestamp in UTC of segment update (read-only) + * @return updatedAt + **/ + @javax.annotation.Nullable + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public RmAudienceSegmentEntityV1 contactList(RmContactListV1 contactList) { + + this.contactList = contactList; + return this; + } + + /** + * Get contactList + * @return contactList + **/ + @javax.annotation.Nullable + + public RmContactListV1 getContactList() { + return contactList; + } + + + public void setContactList(RmContactListV1 contactList) { + this.contactList = contactList; + } + + + public RmAudienceSegmentEntityV1 channels(List channels) { + + this.channels = channels; + return this; + } + + public RmAudienceSegmentEntityV1 addChannelsItem(ChannelsEnum channelsItem) { + if (this.channels == null) { + this.channels = null; + } + this.channels.add(channelsItem); + return this; + } + + /** + * Channels associated to the segment (read-only) + * @return channels + **/ + @javax.annotation.Nullable + + public List getChannels() { + return channels; + } + + + public void setChannels(List channels) { + this.channels = channels; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentEntityV1 instance itself + */ + public RmAudienceSegmentEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentEntityV1 rmAudienceSegmentEntityV1 = (RmAudienceSegmentEntityV1) o; + return Objects.equals(this.accountId, rmAudienceSegmentEntityV1.accountId) && + Objects.equals(this.name, rmAudienceSegmentEntityV1.name) && + Objects.equals(this.description, rmAudienceSegmentEntityV1.description) && + Objects.equals(this.retailerId, rmAudienceSegmentEntityV1.retailerId) && + Objects.equals(this.type, rmAudienceSegmentEntityV1.type) && + Objects.equals(this.createdAt, rmAudienceSegmentEntityV1.createdAt) && + Objects.equals(this.updatedAt, rmAudienceSegmentEntityV1.updatedAt) && + Objects.equals(this.contactList, rmAudienceSegmentEntityV1.contactList) && + Objects.equals(this.channels, rmAudienceSegmentEntityV1.channels)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, name, description, retailerId, type, createdAt, updatedAt, contactList, channels, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentEntityV1 {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" retailerId: ").append(toIndentedString(retailerId)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" contactList: ").append(toIndentedString(contactList)).append("\n"); + sb.append(" channels: ").append(toIndentedString(channels)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("accountId"); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("retailerId"); + openapiFields.add("type"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("contactList"); + openapiFields.add("channels"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentEntityV1 is not found in the empty JSON string", RmAudienceSegmentEntityV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + if ((jsonObj.get("retailerId") != null && !jsonObj.get("retailerId").isJsonNull()) && !jsonObj.get("retailerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `retailerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("retailerId").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `contactList` + if (jsonObj.get("contactList") != null && !jsonObj.get("contactList").isJsonNull()) { + RmContactListV1.validateJsonObject(jsonObj.getAsJsonObject("contactList")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("channels") != null && !jsonObj.get("channels").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `channels` to be an array in the JSON string but got `%s`", jsonObj.get("channels").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentEntityV1 + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentEntityV1 + */ + public static RmAudienceSegmentEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentEntityV1.class); + } + + /** + * Convert an instance of RmAudienceSegmentEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1ListResponse.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1ListResponse.java new file mode 100644 index 00000000..715a7044 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1ListResponse.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.CommonProblem; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several entities + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentEntityV1ListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public RmAudienceSegmentEntityV1ListResponse() { + } + + + public RmAudienceSegmentEntityV1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public RmAudienceSegmentEntityV1ListResponse data(List data) { + + this.data = data; + return this; + } + + public RmAudienceSegmentEntityV1ListResponse addDataItem(RmAudienceSegmentEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentEntityV1ListResponse instance itself + */ + public RmAudienceSegmentEntityV1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentEntityV1ListResponse rmAudienceSegmentEntityV1ListResponse = (RmAudienceSegmentEntityV1ListResponse) o; + return Objects.equals(this.data, rmAudienceSegmentEntityV1ListResponse.data) && + Objects.equals(this.warnings, rmAudienceSegmentEntityV1ListResponse.warnings) && + Objects.equals(this.errors, rmAudienceSegmentEntityV1ListResponse.errors)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentEntityV1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentEntityV1ListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentEntityV1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentEntityV1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentEntityV1ListResponse is not found in the empty JSON string", RmAudienceSegmentEntityV1ListResponse.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + RmAudienceSegmentEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentEntityV1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentEntityV1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentEntityV1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentEntityV1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentEntityV1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentEntityV1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentEntityV1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentEntityV1ListResponse + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentEntityV1ListResponse + */ + public static RmAudienceSegmentEntityV1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentEntityV1ListResponse.class); + } + + /** + * Convert an instance of RmAudienceSegmentEntityV1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1Resource.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1Resource.java new file mode 100644 index 00000000..cb852cce --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private RmAudienceSegmentEntityV1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public RmAudienceSegmentEntityV1Resource() { + } + + public RmAudienceSegmentEntityV1Resource attributes(RmAudienceSegmentEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public RmAudienceSegmentEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(RmAudienceSegmentEntityV1 attributes) { + this.attributes = attributes; + } + + + public RmAudienceSegmentEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public RmAudienceSegmentEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentEntityV1Resource instance itself + */ + public RmAudienceSegmentEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentEntityV1Resource rmAudienceSegmentEntityV1Resource = (RmAudienceSegmentEntityV1Resource) o; + return Objects.equals(this.attributes, rmAudienceSegmentEntityV1Resource.attributes) && + Objects.equals(this.id, rmAudienceSegmentEntityV1Resource.id) && + Objects.equals(this.type, rmAudienceSegmentEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentEntityV1Resource is not found in the empty JSON string", RmAudienceSegmentEntityV1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + RmAudienceSegmentEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentEntityV1Resource + */ + public static RmAudienceSegmentEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentEntityV1Resource.class); + } + + /** + * Convert an instance of RmAudienceSegmentEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.java new file mode 100644 index 00000000..a3808210 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.java @@ -0,0 +1,427 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.CommonProblem; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentEntityV1Resource; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentSearchMetadataV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several entities and metadata + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse { + public static final String SERIALIZED_NAME_META = "meta"; + @SerializedName(SERIALIZED_NAME_META) + private RmAudienceSegmentSearchMetadataV1 meta; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse() { + } + + + public RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse meta(RmAudienceSegmentSearchMetadataV1 meta) { + + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + **/ + @javax.annotation.Nullable + + public RmAudienceSegmentSearchMetadataV1 getMeta() { + return meta; + } + + + public void setMeta(RmAudienceSegmentSearchMetadataV1 meta) { + this.meta = meta; + } + + + public RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse data(List data) { + + this.data = data; + return this; + } + + public RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse addDataItem(RmAudienceSegmentEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse instance itself + */ + public RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse rmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse = (RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse) o; + return Objects.equals(this.meta, rmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.meta) && + Objects.equals(this.data, rmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.data) && + Objects.equals(this.warnings, rmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.warnings) && + Objects.equals(this.errors, rmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.errors)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(meta, data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse {\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("meta"); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse is not found in the empty JSON string", RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.openapiRequiredFields.toString())); + } + } + // validate the optional field `meta` + if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { + RmAudienceSegmentSearchMetadataV1.validateJsonObject(jsonObj.getAsJsonObject("meta")); + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + RmAudienceSegmentEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse + */ + public static RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse.class); + } + + /** + * Convert an instance of RmAudienceSegmentEntityV1RmAudienceSegmentSearchMetadataV1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentIdEntityV1ListResponse.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentIdEntityV1ListResponse.java new file mode 100644 index 00000000..f040a65a --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentIdEntityV1ListResponse.java @@ -0,0 +1,393 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.CommonProblem; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentIdEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for several entities + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentIdEntityV1ListResponse { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private List data = null; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public RmAudienceSegmentIdEntityV1ListResponse() { + } + + + public RmAudienceSegmentIdEntityV1ListResponse( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public RmAudienceSegmentIdEntityV1ListResponse data(List data) { + + this.data = data; + return this; + } + + public RmAudienceSegmentIdEntityV1ListResponse addDataItem(RmAudienceSegmentIdEntityV1Resource dataItem) { + if (this.data == null) { + this.data = null; + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public List getData() { + return data; + } + + + public void setData(List data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentIdEntityV1ListResponse instance itself + */ + public RmAudienceSegmentIdEntityV1ListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentIdEntityV1ListResponse rmAudienceSegmentIdEntityV1ListResponse = (RmAudienceSegmentIdEntityV1ListResponse) o; + return Objects.equals(this.data, rmAudienceSegmentIdEntityV1ListResponse.data) && + Objects.equals(this.warnings, rmAudienceSegmentIdEntityV1ListResponse.warnings) && + Objects.equals(this.errors, rmAudienceSegmentIdEntityV1ListResponse.errors)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentIdEntityV1ListResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentIdEntityV1ListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentIdEntityV1ListResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentIdEntityV1ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentIdEntityV1ListResponse is not found in the empty JSON string", RmAudienceSegmentIdEntityV1ListResponse.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); + if (jsonArraydata != null) { + // ensure the json data is an array + if (!jsonObj.get("data").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + } + + // validate the optional field `data` (array) + for (int i = 0; i < jsonArraydata.size(); i++) { + RmAudienceSegmentIdEntityV1Resource.validateJsonObject(jsonArraydata.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentIdEntityV1ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentIdEntityV1ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentIdEntityV1ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentIdEntityV1ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentIdEntityV1ListResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentIdEntityV1ListResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentIdEntityV1ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentIdEntityV1ListResponse + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentIdEntityV1ListResponse + */ + public static RmAudienceSegmentIdEntityV1ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentIdEntityV1ListResponse.class); + } + + /** + * Convert an instance of RmAudienceSegmentIdEntityV1ListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentIdEntityV1Resource.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentIdEntityV1Resource.java new file mode 100644 index 00000000..9fba90ce --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentIdEntityV1Resource.java @@ -0,0 +1,353 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentIdEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private Object attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public RmAudienceSegmentIdEntityV1Resource() { + } + + public RmAudienceSegmentIdEntityV1Resource attributes(Object attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Audience Segment entity only with its ID + * @return attributes + **/ + @javax.annotation.Nullable + + public Object getAttributes() { + return attributes; + } + + + public void setAttributes(Object attributes) { + this.attributes = attributes; + } + + + public RmAudienceSegmentIdEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public RmAudienceSegmentIdEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentIdEntityV1Resource instance itself + */ + public RmAudienceSegmentIdEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentIdEntityV1Resource rmAudienceSegmentIdEntityV1Resource = (RmAudienceSegmentIdEntityV1Resource) o; + return Objects.equals(this.attributes, rmAudienceSegmentIdEntityV1Resource.attributes) && + Objects.equals(this.id, rmAudienceSegmentIdEntityV1Resource.id) && + Objects.equals(this.type, rmAudienceSegmentIdEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentIdEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentIdEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentIdEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentIdEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentIdEntityV1Resource is not found in the empty JSON string", RmAudienceSegmentIdEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentIdEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentIdEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentIdEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentIdEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentIdEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentIdEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentIdEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentIdEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentIdEntityV1Resource + */ + public static RmAudienceSegmentIdEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentIdEntityV1Resource.class); + } + + /** + * Convert an instance of RmAudienceSegmentIdEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchEntityV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchEntityV1.java new file mode 100644 index 00000000..fd444126 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchEntityV1.java @@ -0,0 +1,344 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Available filters to perform a search on audience segments. If present, the filters are AND'ed together when applied. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentSearchEntityV1 { + public static final String SERIALIZED_NAME_AUDIENCE_SEGMENT_IDS = "audienceSegmentIds"; + @SerializedName(SERIALIZED_NAME_AUDIENCE_SEGMENT_IDS) + private List audienceSegmentIds = null; + + public static final String SERIALIZED_NAME_RETAILER_IDS = "retailerIds"; + @SerializedName(SERIALIZED_NAME_RETAILER_IDS) + private List retailerIds = null; + + public RmAudienceSegmentSearchEntityV1() { + } + + public RmAudienceSegmentSearchEntityV1 audienceSegmentIds(List audienceSegmentIds) { + + this.audienceSegmentIds = audienceSegmentIds; + return this; + } + + public RmAudienceSegmentSearchEntityV1 addAudienceSegmentIdsItem(String audienceSegmentIdsItem) { + if (this.audienceSegmentIds == null) { + this.audienceSegmentIds = null; + } + this.audienceSegmentIds.add(audienceSegmentIdsItem); + return this; + } + + /** + * List of segment ids + * @return audienceSegmentIds + **/ + @javax.annotation.Nullable + + public List getAudienceSegmentIds() { + return audienceSegmentIds; + } + + + public void setAudienceSegmentIds(List audienceSegmentIds) { + this.audienceSegmentIds = audienceSegmentIds; + } + + + public RmAudienceSegmentSearchEntityV1 retailerIds(List retailerIds) { + + this.retailerIds = retailerIds; + return this; + } + + public RmAudienceSegmentSearchEntityV1 addRetailerIdsItem(String retailerIdsItem) { + if (this.retailerIds == null) { + this.retailerIds = null; + } + this.retailerIds.add(retailerIdsItem); + return this; + } + + /** + * List of retailer ids + * @return retailerIds + **/ + @javax.annotation.Nullable + + public List getRetailerIds() { + return retailerIds; + } + + + public void setRetailerIds(List retailerIds) { + this.retailerIds = retailerIds; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentSearchEntityV1 instance itself + */ + public RmAudienceSegmentSearchEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentSearchEntityV1 rmAudienceSegmentSearchEntityV1 = (RmAudienceSegmentSearchEntityV1) o; + return Objects.equals(this.audienceSegmentIds, rmAudienceSegmentSearchEntityV1.audienceSegmentIds) && + Objects.equals(this.retailerIds, rmAudienceSegmentSearchEntityV1.retailerIds)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentSearchEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(audienceSegmentIds, retailerIds, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentSearchEntityV1 {\n"); + sb.append(" audienceSegmentIds: ").append(toIndentedString(audienceSegmentIds)).append("\n"); + sb.append(" retailerIds: ").append(toIndentedString(retailerIds)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("audienceSegmentIds"); + openapiFields.add("retailerIds"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentSearchEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentSearchEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentSearchEntityV1 is not found in the empty JSON string", RmAudienceSegmentSearchEntityV1.openapiRequiredFields.toString())); + } + } + // ensure the optional json data is an array if present + if (jsonObj.get("audienceSegmentIds") != null && !jsonObj.get("audienceSegmentIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `audienceSegmentIds` to be an array in the JSON string but got `%s`", jsonObj.get("audienceSegmentIds").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("retailerIds") != null && !jsonObj.get("retailerIds").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `retailerIds` to be an array in the JSON string but got `%s`", jsonObj.get("retailerIds").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentSearchEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentSearchEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentSearchEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentSearchEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentSearchEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentSearchEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentSearchEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentSearchEntityV1 + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentSearchEntityV1 + */ + public static RmAudienceSegmentSearchEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentSearchEntityV1.class); + } + + /** + * Convert an instance of RmAudienceSegmentSearchEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchEntityV1Resource.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchEntityV1Resource.java new file mode 100644 index 00000000..e9174871 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchEntityV1Resource.java @@ -0,0 +1,326 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentSearchEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single value + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentSearchEntityV1Resource { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private RmAudienceSegmentSearchEntityV1 attributes; + + public RmAudienceSegmentSearchEntityV1Resource() { + } + + public RmAudienceSegmentSearchEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public RmAudienceSegmentSearchEntityV1Resource attributes(RmAudienceSegmentSearchEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public RmAudienceSegmentSearchEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(RmAudienceSegmentSearchEntityV1 attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentSearchEntityV1Resource instance itself + */ + public RmAudienceSegmentSearchEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentSearchEntityV1Resource rmAudienceSegmentSearchEntityV1Resource = (RmAudienceSegmentSearchEntityV1Resource) o; + return Objects.equals(this.type, rmAudienceSegmentSearchEntityV1Resource.type) && + Objects.equals(this.attributes, rmAudienceSegmentSearchEntityV1Resource.attributes)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentSearchEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, attributes, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentSearchEntityV1Resource {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("attributes"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentSearchEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentSearchEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentSearchEntityV1Resource is not found in the empty JSON string", RmAudienceSegmentSearchEntityV1Resource.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + RmAudienceSegmentSearchEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentSearchEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentSearchEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentSearchEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentSearchEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentSearchEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentSearchEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentSearchEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentSearchEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentSearchEntityV1Resource + */ + public static RmAudienceSegmentSearchEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentSearchEntityV1Resource.class); + } + + /** + * Convert an instance of RmAudienceSegmentSearchEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchInputV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchInputV1.java new file mode 100644 index 00000000..dc282daa --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchInputV1.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentSearchEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Audience segment search parameter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentSearchInputV1 { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private RmAudienceSegmentSearchEntityV1Resource data; + + public RmAudienceSegmentSearchInputV1() { + } + + public RmAudienceSegmentSearchInputV1 data(RmAudienceSegmentSearchEntityV1Resource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public RmAudienceSegmentSearchEntityV1Resource getData() { + return data; + } + + + public void setData(RmAudienceSegmentSearchEntityV1Resource data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentSearchInputV1 instance itself + */ + public RmAudienceSegmentSearchInputV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentSearchInputV1 rmAudienceSegmentSearchInputV1 = (RmAudienceSegmentSearchInputV1) o; + return Objects.equals(this.data, rmAudienceSegmentSearchInputV1.data)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentSearchInputV1.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentSearchInputV1 {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentSearchInputV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentSearchInputV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentSearchInputV1 is not found in the empty JSON string", RmAudienceSegmentSearchInputV1.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + RmAudienceSegmentSearchEntityV1Resource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentSearchInputV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentSearchInputV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentSearchInputV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentSearchInputV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentSearchInputV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentSearchInputV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentSearchInputV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentSearchInputV1 + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentSearchInputV1 + */ + public static RmAudienceSegmentSearchInputV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentSearchInputV1.class); + } + + /** + * Convert an instance of RmAudienceSegmentSearchInputV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchMetadataV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchMetadataV1.java new file mode 100644 index 00000000..862009fa --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentSearchMetadataV1.java @@ -0,0 +1,347 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Metadata for the audience segment search response. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentSearchMetadataV1 { + public static final String SERIALIZED_NAME_TOTAL_ITEMS = "totalItems"; + @SerializedName(SERIALIZED_NAME_TOTAL_ITEMS) + private Integer totalItems; + + public static final String SERIALIZED_NAME_LIMIT = "limit"; + @SerializedName(SERIALIZED_NAME_LIMIT) + private Integer limit; + + public static final String SERIALIZED_NAME_OFFSET = "offset"; + @SerializedName(SERIALIZED_NAME_OFFSET) + private Integer offset; + + public RmAudienceSegmentSearchMetadataV1() { + } + + public RmAudienceSegmentSearchMetadataV1 totalItems(Integer totalItems) { + + this.totalItems = totalItems; + return this; + } + + /** + * Total number of items + * @return totalItems + **/ + @javax.annotation.Nullable + + public Integer getTotalItems() { + return totalItems; + } + + + public void setTotalItems(Integer totalItems) { + this.totalItems = totalItems; + } + + + public RmAudienceSegmentSearchMetadataV1 limit(Integer limit) { + + this.limit = limit; + return this; + } + + /** + * Max item of the current page + * @return limit + **/ + @javax.annotation.Nullable + + public Integer getLimit() { + return limit; + } + + + public void setLimit(Integer limit) { + this.limit = limit; + } + + + public RmAudienceSegmentSearchMetadataV1 offset(Integer offset) { + + this.offset = offset; + return this; + } + + /** + * Number of item to skip + * @return offset + **/ + @javax.annotation.Nullable + + public Integer getOffset() { + return offset; + } + + + public void setOffset(Integer offset) { + this.offset = offset; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentSearchMetadataV1 instance itself + */ + public RmAudienceSegmentSearchMetadataV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentSearchMetadataV1 rmAudienceSegmentSearchMetadataV1 = (RmAudienceSegmentSearchMetadataV1) o; + return Objects.equals(this.totalItems, rmAudienceSegmentSearchMetadataV1.totalItems) && + Objects.equals(this.limit, rmAudienceSegmentSearchMetadataV1.limit) && + Objects.equals(this.offset, rmAudienceSegmentSearchMetadataV1.offset)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentSearchMetadataV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(totalItems, limit, offset, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentSearchMetadataV1 {\n"); + sb.append(" totalItems: ").append(toIndentedString(totalItems)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" offset: ").append(toIndentedString(offset)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("totalItems"); + openapiFields.add("limit"); + openapiFields.add("offset"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentSearchMetadataV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentSearchMetadataV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentSearchMetadataV1 is not found in the empty JSON string", RmAudienceSegmentSearchMetadataV1.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentSearchMetadataV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentSearchMetadataV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentSearchMetadataV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentSearchMetadataV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentSearchMetadataV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentSearchMetadataV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentSearchMetadataV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentSearchMetadataV1 + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentSearchMetadataV1 + */ + public static RmAudienceSegmentSearchMetadataV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentSearchMetadataV1.class); + } + + /** + * Convert an instance of RmAudienceSegmentSearchMetadataV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentUpdateEntityV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentUpdateEntityV1.java new file mode 100644 index 00000000..c12443d5 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentUpdateEntityV1.java @@ -0,0 +1,355 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.NillableString; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Set of rules that defines specific people to target. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentUpdateEntityV1 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private NillableString description; + + public static final String SERIALIZED_NAME_CONTACT_LIST = "contactList"; + @SerializedName(SERIALIZED_NAME_CONTACT_LIST) + private Object contactList; + + public RmAudienceSegmentUpdateEntityV1() { + } + + public RmAudienceSegmentUpdateEntityV1 name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the segment + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public RmAudienceSegmentUpdateEntityV1 description(NillableString description) { + + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + + public NillableString getDescription() { + return description; + } + + + public void setDescription(NillableString description) { + this.description = description; + } + + + public RmAudienceSegmentUpdateEntityV1 contactList(Object contactList) { + + this.contactList = contactList; + return this; + } + + /** + * Settings to update the contact list of the segment + * @return contactList + **/ + @javax.annotation.Nullable + + public Object getContactList() { + return contactList; + } + + + public void setContactList(Object contactList) { + this.contactList = contactList; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentUpdateEntityV1 instance itself + */ + public RmAudienceSegmentUpdateEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentUpdateEntityV1 rmAudienceSegmentUpdateEntityV1 = (RmAudienceSegmentUpdateEntityV1) o; + return Objects.equals(this.name, rmAudienceSegmentUpdateEntityV1.name) && + Objects.equals(this.description, rmAudienceSegmentUpdateEntityV1.description) && + Objects.equals(this.contactList, rmAudienceSegmentUpdateEntityV1.contactList)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentUpdateEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, contactList, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentUpdateEntityV1 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" contactList: ").append(toIndentedString(contactList)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("description"); + openapiFields.add("contactList"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentUpdateEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentUpdateEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentUpdateEntityV1 is not found in the empty JSON string", RmAudienceSegmentUpdateEntityV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // validate the optional field `description` + if (jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) { + NillableString.validateJsonObject(jsonObj.getAsJsonObject("description")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentUpdateEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentUpdateEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentUpdateEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentUpdateEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentUpdateEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentUpdateEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentUpdateEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentUpdateEntityV1 + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentUpdateEntityV1 + */ + public static RmAudienceSegmentUpdateEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentUpdateEntityV1.class); + } + + /** + * Convert an instance of RmAudienceSegmentUpdateEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentUpdateEntityV1Resource.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentUpdateEntityV1Resource.java new file mode 100644 index 00000000..89ae540d --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmAudienceSegmentUpdateEntityV1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.RmAudienceSegmentUpdateEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmAudienceSegmentUpdateEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private RmAudienceSegmentUpdateEntityV1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public RmAudienceSegmentUpdateEntityV1Resource() { + } + + public RmAudienceSegmentUpdateEntityV1Resource attributes(RmAudienceSegmentUpdateEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public RmAudienceSegmentUpdateEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(RmAudienceSegmentUpdateEntityV1 attributes) { + this.attributes = attributes; + } + + + public RmAudienceSegmentUpdateEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public RmAudienceSegmentUpdateEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmAudienceSegmentUpdateEntityV1Resource instance itself + */ + public RmAudienceSegmentUpdateEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmAudienceSegmentUpdateEntityV1Resource rmAudienceSegmentUpdateEntityV1Resource = (RmAudienceSegmentUpdateEntityV1Resource) o; + return Objects.equals(this.attributes, rmAudienceSegmentUpdateEntityV1Resource.attributes) && + Objects.equals(this.id, rmAudienceSegmentUpdateEntityV1Resource.id) && + Objects.equals(this.type, rmAudienceSegmentUpdateEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, rmAudienceSegmentUpdateEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmAudienceSegmentUpdateEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmAudienceSegmentUpdateEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmAudienceSegmentUpdateEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmAudienceSegmentUpdateEntityV1Resource is not found in the empty JSON string", RmAudienceSegmentUpdateEntityV1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + RmAudienceSegmentUpdateEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmAudienceSegmentUpdateEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmAudienceSegmentUpdateEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmAudienceSegmentUpdateEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmAudienceSegmentUpdateEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmAudienceSegmentUpdateEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmAudienceSegmentUpdateEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmAudienceSegmentUpdateEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmAudienceSegmentUpdateEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to RmAudienceSegmentUpdateEntityV1Resource + */ + public static RmAudienceSegmentUpdateEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmAudienceSegmentUpdateEntityV1Resource.class); + } + + /** + * Convert an instance of RmAudienceSegmentUpdateEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListCreateV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListCreateV1.java new file mode 100644 index 00000000..56a6cc57 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListCreateV1.java @@ -0,0 +1,343 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Settings to target users with your contact lists. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmContactListCreateV1 { + /** + * Indicates contact list type + */ + @JsonAdapter(IdentifierTypeEnum.Adapter.class) + public enum IdentifierTypeEnum { + EMAIL("Email"), + + USERIDENTIFIER("UserIdentifier"), + + IDENTITYLINK("IdentityLink"), + + CUSTOMERID("CustomerId"); + + private String value; + + IdentifierTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IdentifierTypeEnum fromValue(String value) { + for (IdentifierTypeEnum b : IdentifierTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final IdentifierTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IdentifierTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IdentifierTypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_IDENTIFIER_TYPE = "identifierType"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER_TYPE) + private IdentifierTypeEnum identifierType; + + public RmContactListCreateV1() { + } + + public RmContactListCreateV1 identifierType(IdentifierTypeEnum identifierType) { + + this.identifierType = identifierType; + return this; + } + + /** + * Indicates contact list type + * @return identifierType + **/ + @javax.annotation.Nullable + + public IdentifierTypeEnum getIdentifierType() { + return identifierType; + } + + + public void setIdentifierType(IdentifierTypeEnum identifierType) { + this.identifierType = identifierType; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmContactListCreateV1 instance itself + */ + public RmContactListCreateV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmContactListCreateV1 rmContactListCreateV1 = (RmContactListCreateV1) o; + return Objects.equals(this.identifierType, rmContactListCreateV1.identifierType)&& + Objects.equals(this.additionalProperties, rmContactListCreateV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(identifierType, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmContactListCreateV1 {\n"); + sb.append(" identifierType: ").append(toIndentedString(identifierType)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("identifierType"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmContactListCreateV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmContactListCreateV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmContactListCreateV1 is not found in the empty JSON string", RmContactListCreateV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("identifierType") != null && !jsonObj.get("identifierType").isJsonNull()) && !jsonObj.get("identifierType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifierType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifierType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmContactListCreateV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmContactListCreateV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmContactListCreateV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmContactListCreateV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmContactListCreateV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmContactListCreateV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmContactListCreateV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmContactListCreateV1 + * @throws IOException if the JSON string is invalid with respect to RmContactListCreateV1 + */ + public static RmContactListCreateV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmContactListCreateV1.class); + } + + /** + * Convert an instance of RmContactListCreateV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1.java new file mode 100644 index 00000000..24309f88 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1.java @@ -0,0 +1,347 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Contact list statistics. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmContactListStatisticsEntityV1 { + public static final String SERIALIZED_NAME_NUMBER_OF_IDENTIFIERS = "numberOfIdentifiers"; + @SerializedName(SERIALIZED_NAME_NUMBER_OF_IDENTIFIERS) + private Integer numberOfIdentifiers; + + public static final String SERIALIZED_NAME_NUMBER_OF_MATCHES = "numberOfMatches"; + @SerializedName(SERIALIZED_NAME_NUMBER_OF_MATCHES) + private Integer numberOfMatches; + + public static final String SERIALIZED_NAME_MATCH_RATE = "matchRate"; + @SerializedName(SERIALIZED_NAME_MATCH_RATE) + private Double matchRate; + + public RmContactListStatisticsEntityV1() { + } + + public RmContactListStatisticsEntityV1 numberOfIdentifiers(Integer numberOfIdentifiers) { + + this.numberOfIdentifiers = numberOfIdentifiers; + return this; + } + + /** + * Number of identifiers in the contact list. + * @return numberOfIdentifiers + **/ + @javax.annotation.Nullable + + public Integer getNumberOfIdentifiers() { + return numberOfIdentifiers; + } + + + public void setNumberOfIdentifiers(Integer numberOfIdentifiers) { + this.numberOfIdentifiers = numberOfIdentifiers; + } + + + public RmContactListStatisticsEntityV1 numberOfMatches(Integer numberOfMatches) { + + this.numberOfMatches = numberOfMatches; + return this; + } + + /** + * Number of matched identifiers in the contact list. + * @return numberOfMatches + **/ + @javax.annotation.Nullable + + public Integer getNumberOfMatches() { + return numberOfMatches; + } + + + public void setNumberOfMatches(Integer numberOfMatches) { + this.numberOfMatches = numberOfMatches; + } + + + public RmContactListStatisticsEntityV1 matchRate(Double matchRate) { + + this.matchRate = matchRate; + return this; + } + + /** + * Percentage of matched identifiers in the contact list. Can differ from matches/identifiers depending on the contact list type. + * @return matchRate + **/ + @javax.annotation.Nullable + + public Double getMatchRate() { + return matchRate; + } + + + public void setMatchRate(Double matchRate) { + this.matchRate = matchRate; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmContactListStatisticsEntityV1 instance itself + */ + public RmContactListStatisticsEntityV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmContactListStatisticsEntityV1 rmContactListStatisticsEntityV1 = (RmContactListStatisticsEntityV1) o; + return Objects.equals(this.numberOfIdentifiers, rmContactListStatisticsEntityV1.numberOfIdentifiers) && + Objects.equals(this.numberOfMatches, rmContactListStatisticsEntityV1.numberOfMatches) && + Objects.equals(this.matchRate, rmContactListStatisticsEntityV1.matchRate)&& + Objects.equals(this.additionalProperties, rmContactListStatisticsEntityV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(numberOfIdentifiers, numberOfMatches, matchRate, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmContactListStatisticsEntityV1 {\n"); + sb.append(" numberOfIdentifiers: ").append(toIndentedString(numberOfIdentifiers)).append("\n"); + sb.append(" numberOfMatches: ").append(toIndentedString(numberOfMatches)).append("\n"); + sb.append(" matchRate: ").append(toIndentedString(matchRate)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("numberOfIdentifiers"); + openapiFields.add("numberOfMatches"); + openapiFields.add("matchRate"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmContactListStatisticsEntityV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmContactListStatisticsEntityV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmContactListStatisticsEntityV1 is not found in the empty JSON string", RmContactListStatisticsEntityV1.openapiRequiredFields.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmContactListStatisticsEntityV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmContactListStatisticsEntityV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmContactListStatisticsEntityV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmContactListStatisticsEntityV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmContactListStatisticsEntityV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmContactListStatisticsEntityV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmContactListStatisticsEntityV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmContactListStatisticsEntityV1 + * @throws IOException if the JSON string is invalid with respect to RmContactListStatisticsEntityV1 + */ + public static RmContactListStatisticsEntityV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmContactListStatisticsEntityV1.class); + } + + /** + * Convert an instance of RmContactListStatisticsEntityV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1Resource.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1Resource.java new file mode 100644 index 00000000..b60489c5 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1Resource.java @@ -0,0 +1,358 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.RmContactListStatisticsEntityV1; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A class that represents a domain entity exposed by an API + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmContactListStatisticsEntityV1Resource { + public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes"; + @SerializedName(SERIALIZED_NAME_ATTRIBUTES) + private RmContactListStatisticsEntityV1 attributes; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public RmContactListStatisticsEntityV1Resource() { + } + + public RmContactListStatisticsEntityV1Resource attributes(RmContactListStatisticsEntityV1 attributes) { + + this.attributes = attributes; + return this; + } + + /** + * Get attributes + * @return attributes + **/ + @javax.annotation.Nullable + + public RmContactListStatisticsEntityV1 getAttributes() { + return attributes; + } + + + public void setAttributes(RmContactListStatisticsEntityV1 attributes) { + this.attributes = attributes; + } + + + public RmContactListStatisticsEntityV1Resource id(String id) { + + this.id = id; + return this; + } + + /** + * Id of the entity + * @return id + **/ + @javax.annotation.Nullable + + public String getId() { + return id; + } + + + public void setId(String id) { + this.id = id; + } + + + public RmContactListStatisticsEntityV1Resource type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmContactListStatisticsEntityV1Resource instance itself + */ + public RmContactListStatisticsEntityV1Resource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmContactListStatisticsEntityV1Resource rmContactListStatisticsEntityV1Resource = (RmContactListStatisticsEntityV1Resource) o; + return Objects.equals(this.attributes, rmContactListStatisticsEntityV1Resource.attributes) && + Objects.equals(this.id, rmContactListStatisticsEntityV1Resource.id) && + Objects.equals(this.type, rmContactListStatisticsEntityV1Resource.type)&& + Objects.equals(this.additionalProperties, rmContactListStatisticsEntityV1Resource.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmContactListStatisticsEntityV1Resource {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("attributes"); + openapiFields.add("id"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmContactListStatisticsEntityV1Resource + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmContactListStatisticsEntityV1Resource.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmContactListStatisticsEntityV1Resource is not found in the empty JSON string", RmContactListStatisticsEntityV1Resource.openapiRequiredFields.toString())); + } + } + // validate the optional field `attributes` + if (jsonObj.get("attributes") != null && !jsonObj.get("attributes").isJsonNull()) { + RmContactListStatisticsEntityV1.validateJsonObject(jsonObj.getAsJsonObject("attributes")); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmContactListStatisticsEntityV1Resource.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmContactListStatisticsEntityV1Resource' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmContactListStatisticsEntityV1Resource.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmContactListStatisticsEntityV1Resource value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmContactListStatisticsEntityV1Resource read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmContactListStatisticsEntityV1Resource instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmContactListStatisticsEntityV1Resource given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmContactListStatisticsEntityV1Resource + * @throws IOException if the JSON string is invalid with respect to RmContactListStatisticsEntityV1Resource + */ + public static RmContactListStatisticsEntityV1Resource fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmContactListStatisticsEntityV1Resource.class); + } + + /** + * Convert an instance of RmContactListStatisticsEntityV1Resource to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1Response.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1Response.java new file mode 100644 index 00000000..83d860c6 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListStatisticsEntityV1Response.java @@ -0,0 +1,375 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.CommonProblem; +import com.criteo.api.retailmedia.preview.model.RmContactListStatisticsEntityV1Resource; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API response for a single entity + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmContactListStatisticsEntityV1Response { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private RmContactListStatisticsEntityV1Resource data; + + public static final String SERIALIZED_NAME_WARNINGS = "warnings"; + @SerializedName(SERIALIZED_NAME_WARNINGS) + private List warnings = null; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors = null; + + public RmContactListStatisticsEntityV1Response() { + } + + + public RmContactListStatisticsEntityV1Response( + List warnings, + List errors + ) { + this(); + this.warnings = warnings; + this.errors = errors; + } + + public RmContactListStatisticsEntityV1Response data(RmContactListStatisticsEntityV1Resource data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public RmContactListStatisticsEntityV1Resource getData() { + return data; + } + + + public void setData(RmContactListStatisticsEntityV1Resource data) { + this.data = data; + } + + + /** + * Get warnings + * @return warnings + **/ + @javax.annotation.Nullable + + public List getWarnings() { + return warnings; + } + + + + + /** + * Get errors + * @return errors + **/ + @javax.annotation.Nullable + + public List getErrors() { + return errors; + } + + + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmContactListStatisticsEntityV1Response instance itself + */ + public RmContactListStatisticsEntityV1Response putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmContactListStatisticsEntityV1Response rmContactListStatisticsEntityV1Response = (RmContactListStatisticsEntityV1Response) o; + return Objects.equals(this.data, rmContactListStatisticsEntityV1Response.data) && + Objects.equals(this.warnings, rmContactListStatisticsEntityV1Response.warnings) && + Objects.equals(this.errors, rmContactListStatisticsEntityV1Response.errors)&& + Objects.equals(this.additionalProperties, rmContactListStatisticsEntityV1Response.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(data, warnings, errors, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmContactListStatisticsEntityV1Response {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + openapiFields.add("warnings"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmContactListStatisticsEntityV1Response + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmContactListStatisticsEntityV1Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmContactListStatisticsEntityV1Response is not found in the empty JSON string", RmContactListStatisticsEntityV1Response.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + RmContactListStatisticsEntityV1Resource.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + if (jsonObj.get("warnings") != null && !jsonObj.get("warnings").isJsonNull()) { + JsonArray jsonArraywarnings = jsonObj.getAsJsonArray("warnings"); + if (jsonArraywarnings != null) { + // ensure the json data is an array + if (!jsonObj.get("warnings").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `warnings` to be an array in the JSON string but got `%s`", jsonObj.get("warnings").toString())); + } + + // validate the optional field `warnings` (array) + for (int i = 0; i < jsonArraywarnings.size(); i++) { + CommonProblem.validateJsonObject(jsonArraywarnings.get(i).getAsJsonObject()); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + CommonProblem.validateJsonObject(jsonArrayerrors.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmContactListStatisticsEntityV1Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmContactListStatisticsEntityV1Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmContactListStatisticsEntityV1Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmContactListStatisticsEntityV1Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmContactListStatisticsEntityV1Response read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmContactListStatisticsEntityV1Response instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmContactListStatisticsEntityV1Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmContactListStatisticsEntityV1Response + * @throws IOException if the JSON string is invalid with respect to RmContactListStatisticsEntityV1Response + */ + public static RmContactListStatisticsEntityV1Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmContactListStatisticsEntityV1Response.class); + } + + /** + * Convert an instance of RmContactListStatisticsEntityV1Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListV1.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListV1.java new file mode 100644 index 00000000..7ee56ceb --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/RmContactListV1.java @@ -0,0 +1,374 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Settings to target users with your contact lists. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class RmContactListV1 { + public static final String SERIALIZED_NAME_IS_READ_ONLY = "isReadOnly"; + @SerializedName(SERIALIZED_NAME_IS_READ_ONLY) + private Boolean isReadOnly; + + /** + * Indicates contact list type + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + UNKNOWN("Unknown"), + + EMAIL("Email"), + + USERIDENTIFIER("UserIdentifier"), + + IDENTITYLINK("IdentityLink"), + + CUSTOMERID("CustomerId"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public RmContactListV1() { + } + + public RmContactListV1 isReadOnly(Boolean isReadOnly) { + + this.isReadOnly = isReadOnly; + return this; + } + + /** + * Is the segment read-only + * @return isReadOnly + **/ + @javax.annotation.Nullable + + public Boolean getIsReadOnly() { + return isReadOnly; + } + + + public void setIsReadOnly(Boolean isReadOnly) { + this.isReadOnly = isReadOnly; + } + + + public RmContactListV1 type(TypeEnum type) { + + this.type = type; + return this; + } + + /** + * Indicates contact list type + * @return type + **/ + @javax.annotation.Nullable + + public TypeEnum getType() { + return type; + } + + + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the RmContactListV1 instance itself + */ + public RmContactListV1 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RmContactListV1 rmContactListV1 = (RmContactListV1) o; + return Objects.equals(this.isReadOnly, rmContactListV1.isReadOnly) && + Objects.equals(this.type, rmContactListV1.type)&& + Objects.equals(this.additionalProperties, rmContactListV1.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(isReadOnly, type, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RmContactListV1 {\n"); + sb.append(" isReadOnly: ").append(toIndentedString(isReadOnly)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("isReadOnly"); + openapiFields.add("type"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to RmContactListV1 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!RmContactListV1.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RmContactListV1 is not found in the empty JSON string", RmContactListV1.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RmContactListV1.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RmContactListV1' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RmContactListV1.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RmContactListV1 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public RmContactListV1 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + RmContactListV1 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RmContactListV1 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RmContactListV1 + * @throws IOException if the JSON string is invalid with respect to RmContactListV1 + */ + public static RmContactListV1 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RmContactListV1.class); + } + + /** + * Convert an instance of RmContactListV1 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SellerCatalogRequest.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SellerCatalogRequest.java new file mode 100644 index 00000000..f2fd4f15 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SellerCatalogRequest.java @@ -0,0 +1,314 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.SellerIdentifier; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Used to requst a catalog of seller SKUs + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SellerCatalogRequest { + public static final String SERIALIZED_NAME_SELLERS = "sellers"; + @SerializedName(SERIALIZED_NAME_SELLERS) + private List sellers = null; + + public SellerCatalogRequest() { + } + + public SellerCatalogRequest sellers(List sellers) { + + this.sellers = sellers; + return this; + } + + public SellerCatalogRequest addSellersItem(SellerIdentifier sellersItem) { + if (this.sellers == null) { + this.sellers = null; + } + this.sellers.add(sellersItem); + return this; + } + + /** + * A list of sellers to restict the catalog to. + * @return sellers + **/ + @javax.annotation.Nullable + + public List getSellers() { + return sellers; + } + + + public void setSellers(List sellers) { + this.sellers = sellers; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SellerCatalogRequest instance itself + */ + public SellerCatalogRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SellerCatalogRequest sellerCatalogRequest = (SellerCatalogRequest) o; + return Objects.equals(this.sellers, sellerCatalogRequest.sellers)&& + Objects.equals(this.additionalProperties, sellerCatalogRequest.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(sellers, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SellerCatalogRequest {\n"); + sb.append(" sellers: ").append(toIndentedString(sellers)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("sellers"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to SellerCatalogRequest + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!SellerCatalogRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SellerCatalogRequest is not found in the empty JSON string", SellerCatalogRequest.openapiRequiredFields.toString())); + } + } + if (jsonObj.get("sellers") != null && !jsonObj.get("sellers").isJsonNull()) { + JsonArray jsonArraysellers = jsonObj.getAsJsonArray("sellers"); + if (jsonArraysellers != null) { + // ensure the json data is an array + if (!jsonObj.get("sellers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `sellers` to be an array in the JSON string but got `%s`", jsonObj.get("sellers").toString())); + } + + // validate the optional field `sellers` (array) + for (int i = 0; i < jsonArraysellers.size(); i++) { + SellerIdentifier.validateJsonObject(jsonArraysellers.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SellerCatalogRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SellerCatalogRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SellerCatalogRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SellerCatalogRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SellerCatalogRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + SellerCatalogRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SellerCatalogRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SellerCatalogRequest + * @throws IOException if the JSON string is invalid with respect to SellerCatalogRequest + */ + public static SellerCatalogRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SellerCatalogRequest.class); + } + + /** + * Convert an instance of SellerCatalogRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SellerIdentifier.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SellerIdentifier.java new file mode 100644 index 00000000..61a74042 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SellerIdentifier.java @@ -0,0 +1,321 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * Identifies a Unique Seller + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class SellerIdentifier { + public static final String SERIALIZED_NAME_RETAILER_ID = "retailerId"; + @SerializedName(SERIALIZED_NAME_RETAILER_ID) + private String retailerId; + + public static final String SERIALIZED_NAME_SELLER_ID = "sellerId"; + @SerializedName(SERIALIZED_NAME_SELLER_ID) + private String sellerId; + + public SellerIdentifier() { + } + + public SellerIdentifier retailerId(String retailerId) { + + this.retailerId = retailerId; + return this; + } + + /** + * The retailer Id that the seller operates under + * @return retailerId + **/ + @javax.annotation.Nonnull + + public String getRetailerId() { + return retailerId; + } + + + public void setRetailerId(String retailerId) { + this.retailerId = retailerId; + } + + + public SellerIdentifier sellerId(String sellerId) { + + this.sellerId = sellerId; + return this; + } + + /** + * The id for the seller based on the corresponding retailer + * @return sellerId + **/ + @javax.annotation.Nonnull + + public String getSellerId() { + return sellerId; + } + + + public void setSellerId(String sellerId) { + this.sellerId = sellerId; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SellerIdentifier instance itself + */ + public SellerIdentifier putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SellerIdentifier sellerIdentifier = (SellerIdentifier) o; + return Objects.equals(this.retailerId, sellerIdentifier.retailerId) && + Objects.equals(this.sellerId, sellerIdentifier.sellerId)&& + Objects.equals(this.additionalProperties, sellerIdentifier.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(retailerId, sellerId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SellerIdentifier {\n"); + sb.append(" retailerId: ").append(toIndentedString(retailerId)).append("\n"); + sb.append(" sellerId: ").append(toIndentedString(sellerId)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("retailerId"); + openapiFields.add("sellerId"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("retailerId"); + openapiRequiredFields.add("sellerId"); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to SellerIdentifier + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!SellerIdentifier.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SellerIdentifier is not found in the empty JSON string", SellerIdentifier.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SellerIdentifier.openapiRequiredFields) { + if (jsonObj.get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); + } + } + if (!jsonObj.get("retailerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `retailerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("retailerId").toString())); + } + if (!jsonObj.get("sellerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sellerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sellerId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SellerIdentifier.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SellerIdentifier' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SellerIdentifier.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SellerIdentifier value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SellerIdentifier read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + SellerIdentifier instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SellerIdentifier given an JSON string + * + * @param jsonString JSON string + * @return An instance of SellerIdentifier + * @throws IOException if the JSON string is invalid with respect to SellerIdentifier + */ + public static SellerIdentifier fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SellerIdentifier.class); + } + + /** + * Convert an instance of SellerIdentifier to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SkuDataPreview.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SkuDataPreview.java index 717ee032..89820b54 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SkuDataPreview.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SkuDataPreview.java @@ -216,7 +216,7 @@ public SkuDataPreview categoryId(String categoryId) { * The category Id. * @return categoryId **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCategoryId() { return categoryId; @@ -783,6 +783,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("skuKey"); + openapiRequiredFields.add("categoryId"); openapiRequiredFields.add("brandId"); openapiRequiredFields.add("brandName"); openapiRequiredFields.add("retailerId"); @@ -820,7 +821,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if ((jsonObj.get("categoryId") != null && !jsonObj.get("categoryId").isJsonNull()) && !jsonObj.get("categoryId").isJsonPrimitive()) { + if (!jsonObj.get("categoryId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `categoryId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("categoryId").toString())); } if ((jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) && !jsonObj.get("category").isJsonPrimitive()) { diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SkuSlimDataPreview.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SkuSlimDataPreview.java index b1d9242d..bf026236 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SkuSlimDataPreview.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SkuSlimDataPreview.java @@ -140,7 +140,7 @@ public SkuSlimDataPreview categoryId(String categoryId) { * The category Id. * @return categoryId **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCategoryId() { return categoryId; @@ -550,6 +550,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("categoryId"); openapiRequiredFields.add("globalBrandId"); openapiRequiredFields.add("globalBrandName"); openapiRequiredFields.add("price"); @@ -579,7 +580,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - if ((jsonObj.get("categoryId") != null && !jsonObj.get("categoryId").isJsonNull()) && !jsonObj.get("categoryId").isJsonPrimitive()) { + if (!jsonObj.get("categoryId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `categoryId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("categoryId").toString())); } if ((jsonObj.get("globalCategoryId") != null && !jsonObj.get("globalCategoryId").isJsonNull()) && !jsonObj.get("globalCategoryId").isJsonPrimitive()) { diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SyncCampaignsReport.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SyncCampaignsReport.java index 64321572..2a0bcce1 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SyncCampaignsReport.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SyncCampaignsReport.java @@ -382,6 +382,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SyncLineItemsReport.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SyncLineItemsReport.java index 25ac1870..41aa93f8 100644 --- a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SyncLineItemsReport.java +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/SyncLineItemsReport.java @@ -386,6 +386,10 @@ public enum DimensionsEnum { PAGETYPENAME("pageTypeName"), + PAGECATEGORY("pageCategory"), + + TAXONOMYBREADCRUMB("taxonomyBreadcrumb"), + KEYWORD("keyword"), SEARCHTERM("searchTerm"); diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/UpdateBalanceModelV2.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/UpdateBalanceModelV2.java new file mode 100644 index 00000000..fb809ec1 --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/UpdateBalanceModelV2.java @@ -0,0 +1,420 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * An object that represents the available options to set when updating a Retail Media Balance. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateBalanceModelV2 { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_PO_NUMBER = "poNumber"; + @SerializedName(SERIALIZED_NAME_PO_NUMBER) + private String poNumber; + + public static final String SERIALIZED_NAME_START_DATE = "startDate"; + @SerializedName(SERIALIZED_NAME_START_DATE) + private String startDate; + + public static final String SERIALIZED_NAME_END_DATE = "endDate"; + @SerializedName(SERIALIZED_NAME_END_DATE) + private String endDate; + + public static final String SERIALIZED_NAME_MEMO = "memo"; + @SerializedName(SERIALIZED_NAME_MEMO) + private String memo; + + public UpdateBalanceModelV2() { + } + + public UpdateBalanceModelV2 name(String name) { + + this.name = name; + return this; + } + + /** + * Name of the balance. + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public UpdateBalanceModelV2 poNumber(String poNumber) { + + this.poNumber = poNumber; + return this; + } + + /** + * Purchase Order number. + * @return poNumber + **/ + @javax.annotation.Nullable + + public String getPoNumber() { + return poNumber; + } + + + public void setPoNumber(String poNumber) { + this.poNumber = poNumber; + } + + + public UpdateBalanceModelV2 startDate(String startDate) { + + this.startDate = startDate; + return this; + } + + /** + * Start date of the balance in the format YYYY-MM-DD. + * @return startDate + **/ + @javax.annotation.Nullable + + public String getStartDate() { + return startDate; + } + + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + + public UpdateBalanceModelV2 endDate(String endDate) { + + this.endDate = endDate; + return this; + } + + /** + * End date of the balance in the format YYYY-MM-DD. + * @return endDate + **/ + @javax.annotation.Nullable + + public String getEndDate() { + return endDate; + } + + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + + public UpdateBalanceModelV2 memo(String memo) { + + this.memo = memo; + return this; + } + + /** + * Memo. + * @return memo + **/ + @javax.annotation.Nullable + + public String getMemo() { + return memo; + } + + + public void setMemo(String memo) { + this.memo = memo; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateBalanceModelV2 instance itself + */ + public UpdateBalanceModelV2 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateBalanceModelV2 updateBalanceModelV2 = (UpdateBalanceModelV2) o; + return Objects.equals(this.name, updateBalanceModelV2.name) && + Objects.equals(this.poNumber, updateBalanceModelV2.poNumber) && + Objects.equals(this.startDate, updateBalanceModelV2.startDate) && + Objects.equals(this.endDate, updateBalanceModelV2.endDate) && + Objects.equals(this.memo, updateBalanceModelV2.memo)&& + Objects.equals(this.additionalProperties, updateBalanceModelV2.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, poNumber, startDate, endDate, memo, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateBalanceModelV2 {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" poNumber: ").append(toIndentedString(poNumber)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" memo: ").append(toIndentedString(memo)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("poNumber"); + openapiFields.add("startDate"); + openapiFields.add("endDate"); + openapiFields.add("memo"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to UpdateBalanceModelV2 + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!UpdateBalanceModelV2.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateBalanceModelV2 is not found in the empty JSON string", UpdateBalanceModelV2.openapiRequiredFields.toString())); + } + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("poNumber") != null && !jsonObj.get("poNumber").isJsonNull()) && !jsonObj.get("poNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `poNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("poNumber").toString())); + } + if ((jsonObj.get("startDate") != null && !jsonObj.get("startDate").isJsonNull()) && !jsonObj.get("startDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `startDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("startDate").toString())); + } + if ((jsonObj.get("endDate") != null && !jsonObj.get("endDate").isJsonNull()) && !jsonObj.get("endDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `endDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDate").toString())); + } + if ((jsonObj.get("memo") != null && !jsonObj.get("memo").isJsonNull()) && !jsonObj.get("memo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `memo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memo").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateBalanceModelV2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateBalanceModelV2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateBalanceModelV2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateBalanceModelV2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateBalanceModelV2 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + UpdateBalanceModelV2 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateBalanceModelV2 given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateBalanceModelV2 + * @throws IOException if the JSON string is invalid with respect to UpdateBalanceModelV2 + */ + public static UpdateBalanceModelV2 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateBalanceModelV2.class); + } + + /** + * Convert an instance of UpdateBalanceModelV2 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/UpdateBalanceModelV2Request.java b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/UpdateBalanceModelV2Request.java new file mode 100644 index 00000000..2ef11bcc --- /dev/null +++ b/sdks/retailmedia_preview/src/main/java/com/criteo/api/retailmedia/preview/model/UpdateBalanceModelV2Request.java @@ -0,0 +1,282 @@ +/* + * Criteo API + * Criteo API - RetailMedia + * + * The version of the OpenAPI document: Preview + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.criteo.api.retailmedia.preview.model; + +import java.util.Objects; +import java.util.Arrays; +import com.criteo.api.retailmedia.preview.model.ResourceOfUpdateBalanceModelV2; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import com.criteo.api.retailmedia.preview.JSON; + +/** + * A top-level object that encapsulates a Criteo API request for a single entity + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UpdateBalanceModelV2Request { + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + private ResourceOfUpdateBalanceModelV2 data; + + public UpdateBalanceModelV2Request() { + } + + public UpdateBalanceModelV2Request data(ResourceOfUpdateBalanceModelV2 data) { + + this.data = data; + return this; + } + + /** + * Get data + * @return data + **/ + @javax.annotation.Nullable + + public ResourceOfUpdateBalanceModelV2 getData() { + return data; + } + + + public void setData(ResourceOfUpdateBalanceModelV2 data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the UpdateBalanceModelV2Request instance itself + */ + public UpdateBalanceModelV2Request putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateBalanceModelV2Request updateBalanceModelV2Request = (UpdateBalanceModelV2Request) o; + return Objects.equals(this.data, updateBalanceModelV2Request.data)&& + Objects.equals(this.additionalProperties, updateBalanceModelV2Request.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateBalanceModelV2Request {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("data"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to UpdateBalanceModelV2Request + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!UpdateBalanceModelV2Request.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateBalanceModelV2Request is not found in the empty JSON string", UpdateBalanceModelV2Request.openapiRequiredFields.toString())); + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + ResourceOfUpdateBalanceModelV2.validateJsonObject(jsonObj.getAsJsonObject("data")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateBalanceModelV2Request.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateBalanceModelV2Request' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateBalanceModelV2Request.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateBalanceModelV2Request value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public UpdateBalanceModelV2Request read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + // store additional fields in the deserialized instance + UpdateBalanceModelV2Request instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateBalanceModelV2Request given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateBalanceModelV2Request + * @throws IOException if the JSON string is invalid with respect to UpdateBalanceModelV2Request + */ + public static UpdateBalanceModelV2Request fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateBalanceModelV2Request.class); + } + + /** + * Convert an instance of UpdateBalanceModelV2Request to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} +